comparison lcmsmatching.xml @ 1:253d531a0193 draft

planemo upload for repository https://github.com/workflow4metabolomics/lcmsmatching.git commit 36c9d8099c20a1ae848f1337c16564335dd8fb2b
author prog
date Sat, 03 Sep 2016 17:02:01 -0400
parents e66bb061af06
children 20d69a062da3
comparison
equal deleted inserted replaced
0:e66bb061af06 1:253d531a0193
1 <tool id="lcmsmatching" name="LC/MS matching" version="2.1.3"> 1 <tool id="lcmsmatching" name="LC/MS matching" version="3.0">
2 2
3 <description>Matching of mz/rt values onto local reference compound database.</description> 3 <description>Annotation of MS peaks using matching on a spectra database.</description>
4 4
5 <requirements> 5 <requirements>
6 <requirement type="package" version="3.2.2">R</requirement> 6 <requirement type="package" version="3.2.2">R</requirement>
7 <requirement type="package" version="1.20.0">r-getopt</requirement> 7 <requirement type="package" version="1.20.0">r-getopt</requirement>
8 <requirement type="package" version="1.0.0">r-stringr</requirement> 8 <requirement type="package" version="1.0.0">r-stringr</requirement>
9 <requirement type="package" version="1.8.3">r-plyr</requirement> 9 <requirement type="package" version="1.8.3">r-plyr</requirement>
10 <requirement type="package" version="3.98">r-xml</requirement> 10 <requirement type="package" version="3.98">r-xml</requirement>
11 <requirement type="package" version="1.0_6">r-bitops</requirement>
12 <requirement type="package" version="1.95">r-rcurl</requirement>
13 <requirement type="package" version="1.3">r-rjsonio</requirement>
11 </requirements> 14 </requirements>
15
16 <code file="list-chrom-cols.py"/>
12 17
13 <!--~~~~~~~ 18 <!--~~~~~~~
14 ~ COMMAND ~ 19 ~ COMMAND ~
15 ~~~~~~~~--> 20 ~~~~~~~~-->
16 21
17 <command><![CDATA[ 22 <command>
23 <![CDATA[
24 ## @@@BEGIN_CHEETAH@@@
18 $__tool_directory__/search-mz -i "$mzrtinput" 25 $__tool_directory__/search-mz -i "$mzrtinput"
19 26
20 ## Database 27 ## Database
21 -d file --url "$dbfile" 28 #if $db.dbtype == "inhouse"
29 -d file
30 --db-fields "$db.dbfields"
31 --db-ms-modes "$db.dbmsmodes"
32 #end if
33 #if $db.dbtype == "peakforest"
34 -d peakforest
35 --db-token "$db.dbtoken"
36 #end if
37 --url "$db.dburl"
22 38
23 ## M/Z matching 39 ## M/Z matching
24 -m $mzmode -p $mzprec -s $mzshift 40 -m $mzmode -p $mzprec -s $mzshift
25 41
26 ## Precursor matching 42 ## Precursor matching
27 #if $prec.match == "true" 43 #if $prec.match == "true"
28 --precursor-match --pos-prec "$prec.pos" --neg-prec "$prec.neg" 44 --precursor-match --pos-prec "$prec.pos" --neg-prec "$prec.neg"
29 #end if 45 #end if
30 #if $prec.match == "true" and $rt.match == "true" 46 #if $prec.match == "true" and $chromcols:
31 --precursor-rt-tol $rt.tolz 47 --precursor-rt-tol $tolz
32 #end if 48 #end if
33 49
34 ## Chromatographic columns options and retention matching 50 ## Chromatographic columns options and retention matching
35 #if $rt.match == "true" and $rt.cols.all == "true" 51 #if $chromcols:
36 --all-cols --rttolx $rt.tolx --rttoly $rt.toly 52 -c "$chromcols" --check-cols --rttolx $tolx --rttoly $toly
37 #end if
38 #if $rt.match == "true" and $rt.cols.all == "false" and $rt.cols.list != ""
39 -c "$rt.cols.list" --check-cols --rttolx $rt.tolx --rttoly $rt.toly
40 #end if 53 #end if
41 54
42 ## Table outputs 55 ## Table outputs
43 -o "$mainoutput" --peak-output-file "$peaksoutput" --same-rows --same-cols 56 -o "$mainoutput" --peak-output-file "$peaksoutput" --same-rows --same-cols
44 57
45 ## HTML output 58 ## HTML output
46 --html-output-file "$htmloutput" --no-main-table-in-html-output 59 --html-output-file "$htmloutput" --no-main-table-in-html-output
47 60
48 ## Fields 61 ## Fields of input file
49 --input-col-names "$inputfields" 62 --input-col-names "$inputfields"
50 --db-fields "$dbfields"
51 --db-ms-modes "$dbmsmodes"
52 63
53 ## Ouput setting 64 ## Ouput setting
54 #if $out.enabled == "true" 65 #if $out.enabled == "true"
55 --output-col-names "$out.outputfields" 66 --output-col-names "$out.outputfields"
56 --molids-sep "$out.molidssep" 67 --molids-sep "$out.molidssep"
57 #else 68 #else
58 --molids-sep "|" 69 --molids-sep "|"
59 #end if 70 #end if
60 71 ## @@@END_CHEETAH@@@
61 ]]></command> 72 ]]></command>
62 73
63 <!--~~~~~~ 74 <!--~~~~~~
64 ~ INPUTS ~ 75 ~ INPUTS ~
65 ~~~~~~~--> 76 ~~~~~~~-->
66 77
67 <inputs> 78 <inputs>
68 79
69 <!-- DATABASE --> 80 <!-- DATABASE -->
70 81
71 <!-- Database file --> 82 <conditional name="db">
72 <param name="dbfile" label="Database file" type="data" format="tabular" help="Decimal: '.', missing: NA, mode: character and numerical, sep: tabular. Retention time values must be in seconds."/> 83
73 84 <param name="dbtype" label="Database" type="select" refresh_on_change="true">
74 <!-- File database field names --> 85 <option value="inhouse">In-house</option>
75 <param name="dbfields" label="File database column names" type="text" size="256" value="mztheo=mztheo,colrt=colrt,molid=molid,col=col,mode=mode,attr=attr,comp=comp,molnames=molnames,molcomp=molcomp,molmass=molmass,inchi=inchi,inchikey=inchikey,pubchem=pubchem,chebi=chebi,hmdb=hmdb,kegg=kegg" help=""/> 86 <option value="peakforest">Peakforest</option>
76 87 </param>
77 <!-- File database MS modes --> 88
78 <param name="dbmsmodes" label="File database MS modes" type="text" size="32" value="pos=POS,neg=NEG" help=""/> 89 <when value="inhouse">
90 <!-- Database file -->
91 <param name="dburl" label="Database file" type="data" format="tabular,tsv" refresh_on_change="true" help="Decimal: '.', missing: NA, mode: character and numerical, sep: tabular. Retention time values must be in seconds."/>
92
93 <!-- File database field names -->
94 <param name="dbfields" label="File database column names" type="text" size="256" value="mztheo=mztheo,colrt=colrt,molid=molid,col=col,mode=mode,attr=attr,comp=comp,molnames=molnames,molcomp=molcomp,molmass=molmass,inchi=inchi,inchikey=inchikey,pubchem=pubchem,chebi=chebi,hmdb=hmdb,kegg=kegg" refresh_on_change="true" help=""/>
95
96 <!-- File database MS modes -->
97 <param name="dbmsmodes" label="File database MS modes" type="text" size="32" value="pos=POS,neg=NEG" help=""/>
98
99 <param name="dbtoken" type="text" size="32" value="" hidden="true"/>
100 </when>
101
102 <when value="peakforest">
103 <param name="dburl" type="text" size="128" value="https://peakforest-alpha.inra.fr/rest" refresh_on_change="true"/>
104
105 <param name="dbtoken" label="Peakforest security token" type="text" size="32" value="" refresh_on_change="true" help="If you do not have yet a Peakforest token, go to Peakforest website and request one from your account."/>
106
107 <param name="dbfields" type="text" size="32" value="" hidden="true"/>
108 </when>
109 </conditional>
79 110
80 <!-- INPUT --> 111 <!-- INPUT -->
81 112
82 <!-- Input file --> 113 <!-- Input file -->
83 <param name="mzrtinput" label="Input file - MZ(/RT) values" type="data" format="tabular" help="Decimal: '.', missing: NA, mode: character and numerical, sep: tabular. RT values must be in seconds."/> 114 <param name="mzrtinput" label="Input file - MZ(/RT) values" type="data" format="tabular,tsv" help="Decimal: '.', missing: NA, mode: character and numerical, sep: tabular. RT values must be in seconds."/>
84 115
85 <!-- Input field names --> 116 <!-- Input field names -->
86 <param name="inputfields" label="Input file column names" type="text" size="32" value="mz=mzmed,rt=rtmed" help=""/> 117 <param name="inputfields" label="Input file column names" type="text" size="32" value="mz=mzmed,rt=rtmed" help=""/>
87 118
88 <!-- M/Z MATCHING --> 119 <!-- M/Z MATCHING -->
89 <!-- <conditional name="mz"> 120
90 121 <!-- Mode -->
91 <param name="enabled" label="M/Z matching" type="select"> 122 <param name="mzmode" label="MS mode" type="select" display="radio" multiple="false" help="">
92 <option value="true">Show</option> 123 <option value="pos">Positive</option>
93 <option value="false">Hide</option> 124 <option value="neg">Negative</option>
94 </param> 125 </param>
95 126
96 <when value="true">--> 127 <!-- MZ matching parameters -->
97 <!-- Mode --> 128 <param name="mzprec" label="M/Z precision (in ppm)" type="float" help="" value="5"/>
98 <param name="mzmode" label="MS mode" type="select" display="radio" multiple="false" help=""> 129 <param name="mzshift" label="M/Z shift (in ppm)" type="float" help="" value="0"/>
99 <option value="pos">Positive</option>
100 <option value="neg">Negative</option>
101 </param>
102
103 <!-- MZ matching parameters -->
104 <param name="mzprec" label="M/Z precision (in ppm)" type="float" help="" value="5"/>
105 <param name="mzshift" label="M/Z shift (in ppm)" type="float" help="" value="0"/>
106 <!--</when>
107 <when value="false"></when>
108 </conditional>-->
109 130
110 <!-- RETENTION TIME PARAMETERS --> 131 <!-- RETENTION TIME PARAMETERS -->
111 <conditional name="rt"> 132
112 133 <!-- List of chromatographic columns -->
113 <param name="match" label="Retention time match" type="select"> 134 <param name="chromcols" type="select" label="Chromatographic columns" multiple="true" dynamic_options="get_chrom_cols(dbtype = db['dbtype'], dburl = db['dburl'], dbtoken = db['dbtoken'], dbfields = db['dbfields'])" help="Select here the set of chromatographic columns against which the retention time matching will be run."/>
114 <option value="false">Off</option> 135
115 <option value="true">On</option> 136 <!-- Tolerances -->
116 </param> 137 <param name="tolx" label="RTX retention time tolerance, parameter x (in seconds)" type="float" help="" value="5"/>
117 138 <param name="toly" label="RTY retention time tolerance, parameter y" type="float" help="" value="0.8"/>
118 <when value="false"></when> 139 <param name="tolz" label="RTZ retention time tolerance, used when precursor matching is enabled." type="float" help="" value="5"/>
119 <when value="true">
120 <!-- Columns -->
121 <conditional name="cols">
122 <param name="all" label="All chromatographic columns" type="select">
123 <option value="true">Yes</option>
124 <option value="false">No</option>
125 </param>
126 <when value="true"></when>
127 <when value="false">
128 <param name="list" label="Chromatographic columns" type="text" size="64" value="" help="Set here the list of chromatographic columns against which the retention time matching will be run. This is a comma separated list of the column names as used instead the database file."/>
129 </when>
130 </conditional>
131
132 <!-- Tolerances -->
133 <param name="tolx" label="RTX retention time tolerance, parameter x (in seconds)" type="float" help="" value="5"/>
134 <param name="toly" label="RTY retention time tolerance, parameter y" type="float" help="" value="0.8"/>
135 <param name="tolz" label="RTZ retention time tolerance, used when precursor matching is enabled." type="float" help="" value="5"/>
136 </when>
137 </conditional>
138 140
139 <!-- PRECURSOR MATCH --> 141 <!-- PRECURSOR MATCH -->
140 <conditional name="prec"> 142 <conditional name="prec">
141 143
142 <param name="match" label="Precursor match" type="select"> 144 <param name="match" label="Precursor match" type="select">
219 ~ TESTS ~ 221 ~ TESTS ~
220 ~~~~~~--> 222 ~~~~~~-->
221 223
222 <tests> 224 <tests>
223 225
224 <!-- Simple quick test --> 226 <!-- File database test -->
225 <test> 227 <test>
226 <param name="dbfile" value="filedb.tsv"/> 228 <param name="dbtype" value="inhouse"/>
229 <param name="dburl" value="filedb.tsv"/>
230 <param name="dbfields" value=""/>
231 <param name="dbmsmodes" value=""/>
227 <param name="mzrtinput" value="mz-input-small.tsv"/> 232 <param name="mzrtinput" value="mz-input-small.tsv"/>
228 <param name="inputfields" value=""/> 233 <param name="inputfields" value=""/>
229 <param name="dbfields" value=""/>
230 <param name="dbmsmodes" value=""/>
231 <param name="mzmode" value="pos"/> 234 <param name="mzmode" value="pos"/>
232 <output name="mainoutput" file="filedb-small-mz-match-output.tsv"/> 235 <output name="mainoutput" file="filedb-small-mz-match-output.tsv"/>
233 <output name="peaksoutput" file="filedb-small-mz-match-peaks-output.tsv"/> 236 <output name="peaksoutput" file="filedb-small-mz-match-peaks-output.tsv"/>
234 <output name="htmloutput" file="filedb-small-mz-match-html-output.html"/> 237 <output name="htmloutput" file="filedb-small-mz-match-html-output.html"/>
235 </test> 238 </test>
239
240 <!-- File database test -->
241 <!--
242 <test>
243 <param name="dbtype" value="peakforest"/>
244 <param name="dbtoken" value="@PEAKFOREST_TOKEN@"/>
245 <param name="mzrtinput" value="mz-input-small.tsv"/>
246 <param name="inputfields" value=""/>
247 <param name="mzmode" value="pos"/>
248 <output name="mainoutput">
249 <assert_contents>
250 <has_text text="mz"/>
251 </assert_contents>
252 </output>
253 </test>
254 -->
236 </tests> 255 </tests>
237 256
238 <!--~~~~ 257 <!--~~~~
239 ~ HELP ~ 258 ~ HELP ~
240 ~~~~~--> 259 ~~~~~-->
244 263
245 ============== 264 ==============
246 LC/MS matching 265 LC/MS matching
247 ============== 266 ==============
248 267
249 This tool performs LC/MS matching on an input list of MZ/RT values, using a provided single file database. 268 This tool performs LC/MS matching on an input list of MZ/RT values, using either a provided in-house single file database or a connection to Peakforest database.
269
270 --------
271 Database
272 --------
273
274 When selecting the database, you have the choice between a Peakforest database or an in-house file.
275
276 For the Peakforest database, a default REST web base address is already provided. But you can change it of you want to use a custom database. A field is also available for setting a token key in case the access to the Peakforest database you want to use is restricted. This is the case of the default database.
277
278 For the in-house file, please refer to the paragraph "Single file database" below.
250 279
251 ----------- 280 -----------
252 Input files 281 Input files
253 ----------- 282 -----------
254 283