Mercurial > repos > tduigou > icfree_sampler
annotate sampler.xml @ 0:a71884785dcc draft
planemo upload for repository https://github.com/brsynth/icfree-ml commit d87d4a4d7c894f2d884a71a2acc35f93bc5bbe4b
| author | tduigou |
|---|---|
| date | Mon, 06 Mar 2023 12:51:20 +0000 |
| parents | |
| children | 80f5b5db4bb0 |
| rev | line source |
|---|---|
|
0
a71884785dcc
planemo upload for repository https://github.com/brsynth/icfree-ml commit d87d4a4d7c894f2d884a71a2acc35f93bc5bbe4b
tduigou
parents:
diff
changeset
|
1 <tool id="icfree_sampler" name="iCFree sampler" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" license="@LICENCE@"> |
|
a71884785dcc
planemo upload for repository https://github.com/brsynth/icfree-ml commit d87d4a4d7c894f2d884a71a2acc35f93bc5bbe4b
tduigou
parents:
diff
changeset
|
2 <description>Generate data points using latin hypercube sampling (LHS)</description> |
|
a71884785dcc
planemo upload for repository https://github.com/brsynth/icfree-ml commit d87d4a4d7c894f2d884a71a2acc35f93bc5bbe4b
tduigou
parents:
diff
changeset
|
3 <macros> |
|
a71884785dcc
planemo upload for repository https://github.com/brsynth/icfree-ml commit d87d4a4d7c894f2d884a71a2acc35f93bc5bbe4b
tduigou
parents:
diff
changeset
|
4 <import>macros.xml</import> |
|
a71884785dcc
planemo upload for repository https://github.com/brsynth/icfree-ml commit d87d4a4d7c894f2d884a71a2acc35f93bc5bbe4b
tduigou
parents:
diff
changeset
|
5 </macros> |
|
a71884785dcc
planemo upload for repository https://github.com/brsynth/icfree-ml commit d87d4a4d7c894f2d884a71a2acc35f93bc5bbe4b
tduigou
parents:
diff
changeset
|
6 <expand macro="requirements"/> |
|
a71884785dcc
planemo upload for repository https://github.com/brsynth/icfree-ml commit d87d4a4d7c894f2d884a71a2acc35f93bc5bbe4b
tduigou
parents:
diff
changeset
|
7 <expand macro="stdio"/> |
|
a71884785dcc
planemo upload for repository https://github.com/brsynth/icfree-ml commit d87d4a4d7c894f2d884a71a2acc35f93bc5bbe4b
tduigou
parents:
diff
changeset
|
8 <command detect_errors="exit_code"><![CDATA[ |
|
a71884785dcc
planemo upload for repository https://github.com/brsynth/icfree-ml commit d87d4a4d7c894f2d884a71a2acc35f93bc5bbe4b
tduigou
parents:
diff
changeset
|
9 #set ratios = [] |
|
a71884785dcc
planemo upload for repository https://github.com/brsynth/icfree-ml commit d87d4a4d7c894f2d884a71a2acc35f93bc5bbe4b
tduigou
parents:
diff
changeset
|
10 #for $x in $adv.rep |
|
a71884785dcc
planemo upload for repository https://github.com/brsynth/icfree-ml commit d87d4a4d7c894f2d884a71a2acc35f93bc5bbe4b
tduigou
parents:
diff
changeset
|
11 #silent ratios.append($x.ratio) |
|
a71884785dcc
planemo upload for repository https://github.com/brsynth/icfree-ml commit d87d4a4d7c894f2d884a71a2acc35f93bc5bbe4b
tduigou
parents:
diff
changeset
|
12 #end for |
|
a71884785dcc
planemo upload for repository https://github.com/brsynth/icfree-ml commit d87d4a4d7c894f2d884a71a2acc35f93bc5bbe4b
tduigou
parents:
diff
changeset
|
13 #set sratios = ' '.join($ratios) |
|
a71884785dcc
planemo upload for repository https://github.com/brsynth/icfree-ml commit d87d4a4d7c894f2d884a71a2acc35f93bc5bbe4b
tduigou
parents:
diff
changeset
|
14 echo "${sratios}" && |
|
a71884785dcc
planemo upload for repository https://github.com/brsynth/icfree-ml commit d87d4a4d7c894f2d884a71a2acc35f93bc5bbe4b
tduigou
parents:
diff
changeset
|
15 python -m icfree.sampler |
|
a71884785dcc
planemo upload for repository https://github.com/brsynth/icfree-ml commit d87d4a4d7c894f2d884a71a2acc35f93bc5bbe4b
tduigou
parents:
diff
changeset
|
16 '$cfps_file' |
|
a71884785dcc
planemo upload for repository https://github.com/brsynth/icfree-ml commit d87d4a4d7c894f2d884a71a2acc35f93bc5bbe4b
tduigou
parents:
diff
changeset
|
17 #if len(ratios) >0 |
|
a71884785dcc
planemo upload for repository https://github.com/brsynth/icfree-ml commit d87d4a4d7c894f2d884a71a2acc35f93bc5bbe4b
tduigou
parents:
diff
changeset
|
18 --sampling-ratios "${sratios}" |
|
a71884785dcc
planemo upload for repository https://github.com/brsynth/icfree-ml commit d87d4a4d7c894f2d884a71a2acc35f93bc5bbe4b
tduigou
parents:
diff
changeset
|
19 #end if |
|
a71884785dcc
planemo upload for repository https://github.com/brsynth/icfree-ml commit d87d4a4d7c894f2d884a71a2acc35f93bc5bbe4b
tduigou
parents:
diff
changeset
|
20 --nb-sampling-steps '$adv.nb_sampling_steps' |
|
a71884785dcc
planemo upload for repository https://github.com/brsynth/icfree-ml commit d87d4a4d7c894f2d884a71a2acc35f93bc5bbe4b
tduigou
parents:
diff
changeset
|
21 --nb-samples '$adv.nb_samples' |
|
a71884785dcc
planemo upload for repository https://github.com/brsynth/icfree-ml commit d87d4a4d7c894f2d884a71a2acc35f93bc5bbe4b
tduigou
parents:
diff
changeset
|
22 --seed '0' |
|
a71884785dcc
planemo upload for repository https://github.com/brsynth/icfree-ml commit d87d4a4d7c894f2d884a71a2acc35f93bc5bbe4b
tduigou
parents:
diff
changeset
|
23 --output-format 'tsv' |
|
a71884785dcc
planemo upload for repository https://github.com/brsynth/icfree-ml commit d87d4a4d7c894f2d884a71a2acc35f93bc5bbe4b
tduigou
parents:
diff
changeset
|
24 --output-folder . && ls |
|
a71884785dcc
planemo upload for repository https://github.com/brsynth/icfree-ml commit d87d4a4d7c894f2d884a71a2acc35f93bc5bbe4b
tduigou
parents:
diff
changeset
|
25 ]]></command> |
|
a71884785dcc
planemo upload for repository https://github.com/brsynth/icfree-ml commit d87d4a4d7c894f2d884a71a2acc35f93bc5bbe4b
tduigou
parents:
diff
changeset
|
26 <inputs> |
|
a71884785dcc
planemo upload for repository https://github.com/brsynth/icfree-ml commit d87d4a4d7c894f2d884a71a2acc35f93bc5bbe4b
tduigou
parents:
diff
changeset
|
27 <param name="cfps_file" type="data" format="tabular" label="CFPS parameters and features" /> |
|
a71884785dcc
planemo upload for repository https://github.com/brsynth/icfree-ml commit d87d4a4d7c894f2d884a71a2acc35f93bc5bbe4b
tduigou
parents:
diff
changeset
|
28 <section name="adv" title="Advanced Options" expanded="false"> |
|
a71884785dcc
planemo upload for repository https://github.com/brsynth/icfree-ml commit d87d4a4d7c894f2d884a71a2acc35f93bc5bbe4b
tduigou
parents:
diff
changeset
|
29 <param argument="nb_sampling_steps" type="integer" value="5" min="1" max="10" label="Number of values for all factors when performing the sampling" /> |
|
a71884785dcc
planemo upload for repository https://github.com/brsynth/icfree-ml commit d87d4a4d7c894f2d884a71a2acc35f93bc5bbe4b
tduigou
parents:
diff
changeset
|
30 <param argument="nb_samples" type="integer" value="99" min="1" max="198" label="Number of samples to generate" /> |
|
a71884785dcc
planemo upload for repository https://github.com/brsynth/icfree-ml commit d87d4a4d7c894f2d884a71a2acc35f93bc5bbe4b
tduigou
parents:
diff
changeset
|
31 <repeat name="rep" title="Sampling ratios" min="0"> |
|
a71884785dcc
planemo upload for repository https://github.com/brsynth/icfree-ml commit d87d4a4d7c894f2d884a71a2acc35f93bc5bbe4b
tduigou
parents:
diff
changeset
|
32 <param name="ratio" type="float" value="0.1" min="0.0" max="1.0" label="Ratio associated to each factor" /> |
|
a71884785dcc
planemo upload for repository https://github.com/brsynth/icfree-ml commit d87d4a4d7c894f2d884a71a2acc35f93bc5bbe4b
tduigou
parents:
diff
changeset
|
33 </repeat> |
|
a71884785dcc
planemo upload for repository https://github.com/brsynth/icfree-ml commit d87d4a4d7c894f2d884a71a2acc35f93bc5bbe4b
tduigou
parents:
diff
changeset
|
34 </section> |
|
a71884785dcc
planemo upload for repository https://github.com/brsynth/icfree-ml commit d87d4a4d7c894f2d884a71a2acc35f93bc5bbe4b
tduigou
parents:
diff
changeset
|
35 </inputs> |
|
a71884785dcc
planemo upload for repository https://github.com/brsynth/icfree-ml commit d87d4a4d7c894f2d884a71a2acc35f93bc5bbe4b
tduigou
parents:
diff
changeset
|
36 <outputs> |
|
a71884785dcc
planemo upload for repository https://github.com/brsynth/icfree-ml commit d87d4a4d7c894f2d884a71a2acc35f93bc5bbe4b
tduigou
parents:
diff
changeset
|
37 <data name="sampling" format="tabular"> |
|
a71884785dcc
planemo upload for repository https://github.com/brsynth/icfree-ml commit d87d4a4d7c894f2d884a71a2acc35f93bc5bbe4b
tduigou
parents:
diff
changeset
|
38 <discover_datasets pattern="__designation__" ext="tabular"/> |
|
a71884785dcc
planemo upload for repository https://github.com/brsynth/icfree-ml commit d87d4a4d7c894f2d884a71a2acc35f93bc5bbe4b
tduigou
parents:
diff
changeset
|
39 </data> |
|
a71884785dcc
planemo upload for repository https://github.com/brsynth/icfree-ml commit d87d4a4d7c894f2d884a71a2acc35f93bc5bbe4b
tduigou
parents:
diff
changeset
|
40 </outputs> |
|
a71884785dcc
planemo upload for repository https://github.com/brsynth/icfree-ml commit d87d4a4d7c894f2d884a71a2acc35f93bc5bbe4b
tduigou
parents:
diff
changeset
|
41 <tests> |
|
a71884785dcc
planemo upload for repository https://github.com/brsynth/icfree-ml commit d87d4a4d7c894f2d884a71a2acc35f93bc5bbe4b
tduigou
parents:
diff
changeset
|
42 <!-- test 1: check if identical outputs are produced with default parameters --> |
|
a71884785dcc
planemo upload for repository https://github.com/brsynth/icfree-ml commit d87d4a4d7c894f2d884a71a2acc35f93bc5bbe4b
tduigou
parents:
diff
changeset
|
43 <test> |
|
a71884785dcc
planemo upload for repository https://github.com/brsynth/icfree-ml commit d87d4a4d7c894f2d884a71a2acc35f93bc5bbe4b
tduigou
parents:
diff
changeset
|
44 <param name="cfps_file" value="converter_proCFPS_parameters.tsv" /> |
|
a71884785dcc
planemo upload for repository https://github.com/brsynth/icfree-ml commit d87d4a4d7c894f2d884a71a2acc35f93bc5bbe4b
tduigou
parents:
diff
changeset
|
45 <output name="sampling" ftype="tabular"> |
|
a71884785dcc
planemo upload for repository https://github.com/brsynth/icfree-ml commit d87d4a4d7c894f2d884a71a2acc35f93bc5bbe4b
tduigou
parents:
diff
changeset
|
46 <discovered_dataset designation="sampling.tsv" ftype="tabular"> |
|
a71884785dcc
planemo upload for repository https://github.com/brsynth/icfree-ml commit d87d4a4d7c894f2d884a71a2acc35f93bc5bbe4b
tduigou
parents:
diff
changeset
|
47 <assert_contents> |
|
a71884785dcc
planemo upload for repository https://github.com/brsynth/icfree-ml commit d87d4a4d7c894f2d884a71a2acc35f93bc5bbe4b
tduigou
parents:
diff
changeset
|
48 <has_n_lines n="100"/> |
|
a71884785dcc
planemo upload for repository https://github.com/brsynth/icfree-ml commit d87d4a4d7c894f2d884a71a2acc35f93bc5bbe4b
tduigou
parents:
diff
changeset
|
49 <has_line_matching expression="^Mg-glutamate\tk-glutamate\tCoA\t3-PGA\tNTP\tNAD\tFolinic acid\tSpermidine\ttRNA\tAmino acids\tCAMP\tExtract\tHEPES\tPEG\tPromoter\tRBS$"/> |
|
a71884785dcc
planemo upload for repository https://github.com/brsynth/icfree-ml commit d87d4a4d7c894f2d884a71a2acc35f93bc5bbe4b
tduigou
parents:
diff
changeset
|
50 </assert_contents> |
|
a71884785dcc
planemo upload for repository https://github.com/brsynth/icfree-ml commit d87d4a4d7c894f2d884a71a2acc35f93bc5bbe4b
tduigou
parents:
diff
changeset
|
51 </discovered_dataset> |
|
a71884785dcc
planemo upload for repository https://github.com/brsynth/icfree-ml commit d87d4a4d7c894f2d884a71a2acc35f93bc5bbe4b
tduigou
parents:
diff
changeset
|
52 </output> |
|
a71884785dcc
planemo upload for repository https://github.com/brsynth/icfree-ml commit d87d4a4d7c894f2d884a71a2acc35f93bc5bbe4b
tduigou
parents:
diff
changeset
|
53 </test> |
|
a71884785dcc
planemo upload for repository https://github.com/brsynth/icfree-ml commit d87d4a4d7c894f2d884a71a2acc35f93bc5bbe4b
tduigou
parents:
diff
changeset
|
54 </tests> |
|
a71884785dcc
planemo upload for repository https://github.com/brsynth/icfree-ml commit d87d4a4d7c894f2d884a71a2acc35f93bc5bbe4b
tduigou
parents:
diff
changeset
|
55 <help><![CDATA[ |
|
a71884785dcc
planemo upload for repository https://github.com/brsynth/icfree-ml commit d87d4a4d7c894f2d884a71a2acc35f93bc5bbe4b
tduigou
parents:
diff
changeset
|
56 Sampler |
|
a71884785dcc
planemo upload for repository https://github.com/brsynth/icfree-ml commit d87d4a4d7c894f2d884a71a2acc35f93bc5bbe4b
tduigou
parents:
diff
changeset
|
57 ======= |
|
a71884785dcc
planemo upload for repository https://github.com/brsynth/icfree-ml commit d87d4a4d7c894f2d884a71a2acc35f93bc5bbe4b
tduigou
parents:
diff
changeset
|
58 |
|
a71884785dcc
planemo upload for repository https://github.com/brsynth/icfree-ml commit d87d4a4d7c894f2d884a71a2acc35f93bc5bbe4b
tduigou
parents:
diff
changeset
|
59 This module generates a list of values for all parameters given in the input file. |
|
a71884785dcc
planemo upload for repository https://github.com/brsynth/icfree-ml commit d87d4a4d7c894f2d884a71a2acc35f93bc5bbe4b
tduigou
parents:
diff
changeset
|
60 The values are generated using a Latin Hypercube Sampling (LHS) method (lhs function from the pyDOE package). |
|
a71884785dcc
planemo upload for repository https://github.com/brsynth/icfree-ml commit d87d4a4d7c894f2d884a71a2acc35f93bc5bbe4b
tduigou
parents:
diff
changeset
|
61 The number of values generated is given by the user and the values are saved in csv or tsv file. |
|
a71884785dcc
planemo upload for repository https://github.com/brsynth/icfree-ml commit d87d4a4d7c894f2d884a71a2acc35f93bc5bbe4b
tduigou
parents:
diff
changeset
|
62 |
|
a71884785dcc
planemo upload for repository https://github.com/brsynth/icfree-ml commit d87d4a4d7c894f2d884a71a2acc35f93bc5bbe4b
tduigou
parents:
diff
changeset
|
63 It is important to note that the user can pass some values that he whishes to combine. In this case, we are dealing with discrete space, and because LHS is working on continuous space the result sampling can contain duplicates. |
|
a71884785dcc
planemo upload for repository https://github.com/brsynth/icfree-ml commit d87d4a4d7c894f2d884a71a2acc35f93bc5bbe4b
tduigou
parents:
diff
changeset
|
64 To avoid this, we have set some filters to select the appropriate sampling method: |
|
a71884785dcc
planemo upload for repository https://github.com/brsynth/icfree-ml commit d87d4a4d7c894f2d884a71a2acc35f93bc5bbe4b
tduigou
parents:
diff
changeset
|
65 |
|
a71884785dcc
planemo upload for repository https://github.com/brsynth/icfree-ml commit d87d4a4d7c894f2d884a71a2acc35f93bc5bbe4b
tduigou
parents:
diff
changeset
|
66 * If the result sampling contain duplicates, then we replace them by random samples. |
|
a71884785dcc
planemo upload for repository https://github.com/brsynth/icfree-ml commit d87d4a4d7c894f2d884a71a2acc35f93bc5bbe4b
tduigou
parents:
diff
changeset
|
67 * Proceed with full random sampling. |
|
a71884785dcc
planemo upload for repository https://github.com/brsynth/icfree-ml commit d87d4a4d7c894f2d884a71a2acc35f93bc5bbe4b
tduigou
parents:
diff
changeset
|
68 * Generate all the combinations. |
|
a71884785dcc
planemo upload for repository https://github.com/brsynth/icfree-ml commit d87d4a4d7c894f2d884a71a2acc35f93bc5bbe4b
tduigou
parents:
diff
changeset
|
69 |
|
a71884785dcc
planemo upload for repository https://github.com/brsynth/icfree-ml commit d87d4a4d7c894f2d884a71a2acc35f93bc5bbe4b
tduigou
parents:
diff
changeset
|
70 Input |
|
a71884785dcc
planemo upload for repository https://github.com/brsynth/icfree-ml commit d87d4a4d7c894f2d884a71a2acc35f93bc5bbe4b
tduigou
parents:
diff
changeset
|
71 ----- |
|
a71884785dcc
planemo upload for repository https://github.com/brsynth/icfree-ml commit d87d4a4d7c894f2d884a71a2acc35f93bc5bbe4b
tduigou
parents:
diff
changeset
|
72 * **CFPS Parameters File**: The first column is the parameter (or factor) names. The second column is the maxValue of the parameter that will be used in the sampling. The third column is the concnetration of the stock. The fourth column is the deadVolume of the parameter. This is used to calculate the volume of the parameter that will not be pipetted by the robot (because of viscosity). The fifth column is the specific ratios we want to have for this parameter. If nothing defined, then take ratios given in program options. If one single number is given, then take this number as a const value. |
|
a71884785dcc
planemo upload for repository https://github.com/brsynth/icfree-ml commit d87d4a4d7c894f2d884a71a2acc35f93bc5bbe4b
tduigou
parents:
diff
changeset
|
73 |
|
a71884785dcc
planemo upload for repository https://github.com/brsynth/icfree-ml commit d87d4a4d7c894f2d884a71a2acc35f93bc5bbe4b
tduigou
parents:
diff
changeset
|
74 Advanced options: |
|
a71884785dcc
planemo upload for repository https://github.com/brsynth/icfree-ml commit d87d4a4d7c894f2d884a71a2acc35f93bc5bbe4b
tduigou
parents:
diff
changeset
|
75 ----------------- |
|
a71884785dcc
planemo upload for repository https://github.com/brsynth/icfree-ml commit d87d4a4d7c894f2d884a71a2acc35f93bc5bbe4b
tduigou
parents:
diff
changeset
|
76 * **Number of sampling steps**: Number of values for all factors when performing the sampling (default: 5) |
|
a71884785dcc
planemo upload for repository https://github.com/brsynth/icfree-ml commit d87d4a4d7c894f2d884a71a2acc35f93bc5bbe4b
tduigou
parents:
diff
changeset
|
77 * **Sampling ratios**: Ratios for all factors when performing the sampling |
|
a71884785dcc
planemo upload for repository https://github.com/brsynth/icfree-ml commit d87d4a4d7c894f2d884a71a2acc35f93bc5bbe4b
tduigou
parents:
diff
changeset
|
78 * **Number of samples**: Number of samples to generate for all factors when performing the sampling (default: 99) |
|
a71884785dcc
planemo upload for repository https://github.com/brsynth/icfree-ml commit d87d4a4d7c894f2d884a71a2acc35f93bc5bbe4b
tduigou
parents:
diff
changeset
|
79 |
|
a71884785dcc
planemo upload for repository https://github.com/brsynth/icfree-ml commit d87d4a4d7c894f2d884a71a2acc35f93bc5bbe4b
tduigou
parents:
diff
changeset
|
80 Output |
|
a71884785dcc
planemo upload for repository https://github.com/brsynth/icfree-ml commit d87d4a4d7c894f2d884a71a2acc35f93bc5bbe4b
tduigou
parents:
diff
changeset
|
81 ------ |
|
a71884785dcc
planemo upload for repository https://github.com/brsynth/icfree-ml commit d87d4a4d7c894f2d884a71a2acc35f93bc5bbe4b
tduigou
parents:
diff
changeset
|
82 * a TSV file with the sampling values for each parameter |
|
a71884785dcc
planemo upload for repository https://github.com/brsynth/icfree-ml commit d87d4a4d7c894f2d884a71a2acc35f93bc5bbe4b
tduigou
parents:
diff
changeset
|
83 ]]></help> |
|
a71884785dcc
planemo upload for repository https://github.com/brsynth/icfree-ml commit d87d4a4d7c894f2d884a71a2acc35f93bc5bbe4b
tduigou
parents:
diff
changeset
|
84 <expand macro="creator"/> |
|
a71884785dcc
planemo upload for repository https://github.com/brsynth/icfree-ml commit d87d4a4d7c894f2d884a71a2acc35f93bc5bbe4b
tduigou
parents:
diff
changeset
|
85 <expand macro="citation"/> |
|
a71884785dcc
planemo upload for repository https://github.com/brsynth/icfree-ml commit d87d4a4d7c894f2d884a71a2acc35f93bc5bbe4b
tduigou
parents:
diff
changeset
|
86 </tool> |
