annotate sampler.xml @ 1:80f5b5db4bb0 draft

planemo upload for repository https://github.com/brsynth/icfree-ml commit 13e7cacbe8d65c6e798625de6bba986e89def461
author tduigou
date Mon, 06 Mar 2023 14:26:48 +0000
parents a71884785dcc
children d919d5c6f458
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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 python -m icfree.sampler
a71884785dcc planemo upload for repository https://github.com/brsynth/icfree-ml commit d87d4a4d7c894f2d884a71a2acc35f93bc5bbe4b
tduigou
parents:
diff changeset
15 '$cfps_file'
1
80f5b5db4bb0 planemo upload for repository https://github.com/brsynth/icfree-ml commit 13e7cacbe8d65c6e798625de6bba986e89def461
tduigou
parents: 0
diff changeset
16 #if len(ratios) > 0
0
a71884785dcc planemo upload for repository https://github.com/brsynth/icfree-ml commit d87d4a4d7c894f2d884a71a2acc35f93bc5bbe4b
tduigou
parents:
diff changeset
17 --sampling-ratios "${sratios}"
a71884785dcc planemo upload for repository https://github.com/brsynth/icfree-ml commit d87d4a4d7c894f2d884a71a2acc35f93bc5bbe4b
tduigou
parents:
diff changeset
18 #end if
a71884785dcc planemo upload for repository https://github.com/brsynth/icfree-ml commit d87d4a4d7c894f2d884a71a2acc35f93bc5bbe4b
tduigou
parents:
diff changeset
19 --nb-sampling-steps '$adv.nb_sampling_steps'
a71884785dcc planemo upload for repository https://github.com/brsynth/icfree-ml commit d87d4a4d7c894f2d884a71a2acc35f93bc5bbe4b
tduigou
parents:
diff changeset
20 --nb-samples '$adv.nb_samples'
a71884785dcc planemo upload for repository https://github.com/brsynth/icfree-ml commit d87d4a4d7c894f2d884a71a2acc35f93bc5bbe4b
tduigou
parents:
diff changeset
21 --seed '0'
a71884785dcc planemo upload for repository https://github.com/brsynth/icfree-ml commit d87d4a4d7c894f2d884a71a2acc35f93bc5bbe4b
tduigou
parents:
diff changeset
22 --output-format 'tsv'
a71884785dcc planemo upload for repository https://github.com/brsynth/icfree-ml commit d87d4a4d7c894f2d884a71a2acc35f93bc5bbe4b
tduigou
parents:
diff changeset
23 --output-folder . && ls
a71884785dcc planemo upload for repository https://github.com/brsynth/icfree-ml commit d87d4a4d7c894f2d884a71a2acc35f93bc5bbe4b
tduigou
parents:
diff changeset
24 ]]></command>
a71884785dcc planemo upload for repository https://github.com/brsynth/icfree-ml commit d87d4a4d7c894f2d884a71a2acc35f93bc5bbe4b
tduigou
parents:
diff changeset
25 <inputs>
a71884785dcc planemo upload for repository https://github.com/brsynth/icfree-ml commit d87d4a4d7c894f2d884a71a2acc35f93bc5bbe4b
tduigou
parents:
diff changeset
26 <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
27 <section name="adv" title="Advanced Options" expanded="false">
1
80f5b5db4bb0 planemo upload for repository https://github.com/brsynth/icfree-ml commit 13e7cacbe8d65c6e798625de6bba986e89def461
tduigou
parents: 0
diff changeset
28 <param name="nb_sampling_steps" type="integer" value="5" min="1" max="10" label="Number of values for all factors when performing the sampling" />
80f5b5db4bb0 planemo upload for repository https://github.com/brsynth/icfree-ml commit 13e7cacbe8d65c6e798625de6bba986e89def461
tduigou
parents: 0
diff changeset
29 <param name="nb_samples" type="integer" value="99" min="1" max="198" label="Number of samples to generate" />
80f5b5db4bb0 planemo upload for repository https://github.com/brsynth/icfree-ml commit 13e7cacbe8d65c6e798625de6bba986e89def461
tduigou
parents: 0
diff changeset
30 <repeat name="rep" title="Sampling ratio" min="0">
0
a71884785dcc planemo upload for repository https://github.com/brsynth/icfree-ml commit d87d4a4d7c894f2d884a71a2acc35f93bc5bbe4b
tduigou
parents:
diff changeset
31 <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
32 </repeat>
a71884785dcc planemo upload for repository https://github.com/brsynth/icfree-ml commit d87d4a4d7c894f2d884a71a2acc35f93bc5bbe4b
tduigou
parents:
diff changeset
33 </section>
a71884785dcc planemo upload for repository https://github.com/brsynth/icfree-ml commit d87d4a4d7c894f2d884a71a2acc35f93bc5bbe4b
tduigou
parents:
diff changeset
34 </inputs>
a71884785dcc planemo upload for repository https://github.com/brsynth/icfree-ml commit d87d4a4d7c894f2d884a71a2acc35f93bc5bbe4b
tduigou
parents:
diff changeset
35 <outputs>
a71884785dcc planemo upload for repository https://github.com/brsynth/icfree-ml commit d87d4a4d7c894f2d884a71a2acc35f93bc5bbe4b
tduigou
parents:
diff changeset
36 <data name="sampling" format="tabular">
a71884785dcc planemo upload for repository https://github.com/brsynth/icfree-ml commit d87d4a4d7c894f2d884a71a2acc35f93bc5bbe4b
tduigou
parents:
diff changeset
37 <discover_datasets pattern="__designation__" ext="tabular"/>
a71884785dcc planemo upload for repository https://github.com/brsynth/icfree-ml commit d87d4a4d7c894f2d884a71a2acc35f93bc5bbe4b
tduigou
parents:
diff changeset
38 </data>
a71884785dcc planemo upload for repository https://github.com/brsynth/icfree-ml commit d87d4a4d7c894f2d884a71a2acc35f93bc5bbe4b
tduigou
parents:
diff changeset
39 </outputs>
a71884785dcc planemo upload for repository https://github.com/brsynth/icfree-ml commit d87d4a4d7c894f2d884a71a2acc35f93bc5bbe4b
tduigou
parents:
diff changeset
40 <tests>
a71884785dcc planemo upload for repository https://github.com/brsynth/icfree-ml commit d87d4a4d7c894f2d884a71a2acc35f93bc5bbe4b
tduigou
parents:
diff changeset
41 <!-- 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
42 <test>
a71884785dcc planemo upload for repository https://github.com/brsynth/icfree-ml commit d87d4a4d7c894f2d884a71a2acc35f93bc5bbe4b
tduigou
parents:
diff changeset
43 <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
44 <output name="sampling" ftype="tabular">
a71884785dcc planemo upload for repository https://github.com/brsynth/icfree-ml commit d87d4a4d7c894f2d884a71a2acc35f93bc5bbe4b
tduigou
parents:
diff changeset
45 <discovered_dataset designation="sampling.tsv" ftype="tabular">
a71884785dcc planemo upload for repository https://github.com/brsynth/icfree-ml commit d87d4a4d7c894f2d884a71a2acc35f93bc5bbe4b
tduigou
parents:
diff changeset
46 <assert_contents>
a71884785dcc planemo upload for repository https://github.com/brsynth/icfree-ml commit d87d4a4d7c894f2d884a71a2acc35f93bc5bbe4b
tduigou
parents:
diff changeset
47 <has_n_lines n="100"/>
a71884785dcc planemo upload for repository https://github.com/brsynth/icfree-ml commit d87d4a4d7c894f2d884a71a2acc35f93bc5bbe4b
tduigou
parents:
diff changeset
48 <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
49 </assert_contents>
a71884785dcc planemo upload for repository https://github.com/brsynth/icfree-ml commit d87d4a4d7c894f2d884a71a2acc35f93bc5bbe4b
tduigou
parents:
diff changeset
50 </discovered_dataset>
a71884785dcc planemo upload for repository https://github.com/brsynth/icfree-ml commit d87d4a4d7c894f2d884a71a2acc35f93bc5bbe4b
tduigou
parents:
diff changeset
51 </output>
a71884785dcc planemo upload for repository https://github.com/brsynth/icfree-ml commit d87d4a4d7c894f2d884a71a2acc35f93bc5bbe4b
tduigou
parents:
diff changeset
52 </test>
a71884785dcc planemo upload for repository https://github.com/brsynth/icfree-ml commit d87d4a4d7c894f2d884a71a2acc35f93bc5bbe4b
tduigou
parents:
diff changeset
53 </tests>
a71884785dcc planemo upload for repository https://github.com/brsynth/icfree-ml commit d87d4a4d7c894f2d884a71a2acc35f93bc5bbe4b
tduigou
parents:
diff changeset
54 <help><![CDATA[
a71884785dcc planemo upload for repository https://github.com/brsynth/icfree-ml commit d87d4a4d7c894f2d884a71a2acc35f93bc5bbe4b
tduigou
parents:
diff changeset
55 Sampler
a71884785dcc planemo upload for repository https://github.com/brsynth/icfree-ml commit d87d4a4d7c894f2d884a71a2acc35f93bc5bbe4b
tduigou
parents:
diff changeset
56 =======
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 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
59 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
60 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
61
a71884785dcc planemo upload for repository https://github.com/brsynth/icfree-ml commit d87d4a4d7c894f2d884a71a2acc35f93bc5bbe4b
tduigou
parents:
diff changeset
62 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
63 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
64
a71884785dcc planemo upload for repository https://github.com/brsynth/icfree-ml commit d87d4a4d7c894f2d884a71a2acc35f93bc5bbe4b
tduigou
parents:
diff changeset
65 * 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
66 * Proceed with full random sampling.
a71884785dcc planemo upload for repository https://github.com/brsynth/icfree-ml commit d87d4a4d7c894f2d884a71a2acc35f93bc5bbe4b
tduigou
parents:
diff changeset
67 * Generate all the combinations.
a71884785dcc planemo upload for repository https://github.com/brsynth/icfree-ml commit d87d4a4d7c894f2d884a71a2acc35f93bc5bbe4b
tduigou
parents:
diff changeset
68
a71884785dcc planemo upload for repository https://github.com/brsynth/icfree-ml commit d87d4a4d7c894f2d884a71a2acc35f93bc5bbe4b
tduigou
parents:
diff changeset
69 Input
a71884785dcc planemo upload for repository https://github.com/brsynth/icfree-ml commit d87d4a4d7c894f2d884a71a2acc35f93bc5bbe4b
tduigou
parents:
diff changeset
70 -----
a71884785dcc planemo upload for repository https://github.com/brsynth/icfree-ml commit d87d4a4d7c894f2d884a71a2acc35f93bc5bbe4b
tduigou
parents:
diff changeset
71 * **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
72
a71884785dcc planemo upload for repository https://github.com/brsynth/icfree-ml commit d87d4a4d7c894f2d884a71a2acc35f93bc5bbe4b
tduigou
parents:
diff changeset
73 Advanced options:
a71884785dcc planemo upload for repository https://github.com/brsynth/icfree-ml commit d87d4a4d7c894f2d884a71a2acc35f93bc5bbe4b
tduigou
parents:
diff changeset
74 -----------------
a71884785dcc planemo upload for repository https://github.com/brsynth/icfree-ml commit d87d4a4d7c894f2d884a71a2acc35f93bc5bbe4b
tduigou
parents:
diff changeset
75 * **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
76 * **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
77 * **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
78
a71884785dcc planemo upload for repository https://github.com/brsynth/icfree-ml commit d87d4a4d7c894f2d884a71a2acc35f93bc5bbe4b
tduigou
parents:
diff changeset
79 Output
a71884785dcc planemo upload for repository https://github.com/brsynth/icfree-ml commit d87d4a4d7c894f2d884a71a2acc35f93bc5bbe4b
tduigou
parents:
diff changeset
80 ------
a71884785dcc planemo upload for repository https://github.com/brsynth/icfree-ml commit d87d4a4d7c894f2d884a71a2acc35f93bc5bbe4b
tduigou
parents:
diff changeset
81 * 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
82 ]]></help>
a71884785dcc planemo upload for repository https://github.com/brsynth/icfree-ml commit d87d4a4d7c894f2d884a71a2acc35f93bc5bbe4b
tduigou
parents:
diff changeset
83 <expand macro="creator"/>
a71884785dcc planemo upload for repository https://github.com/brsynth/icfree-ml commit d87d4a4d7c894f2d884a71a2acc35f93bc5bbe4b
tduigou
parents:
diff changeset
84 <expand macro="citation"/>
a71884785dcc planemo upload for repository https://github.com/brsynth/icfree-ml commit d87d4a4d7c894f2d884a71a2acc35f93bc5bbe4b
tduigou
parents:
diff changeset
85 </tool>