Mercurial > repos > recetox > rmassbank
comparison rmassbank.xml @ 0:0b28816c1c2c draft
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/rmassbank commit 02414aa4c20f249c2069e5e3d587e3a8cda923a8
author | recetox |
---|---|
date | Thu, 18 May 2023 13:01:04 +0000 |
parents | |
children | c1a9c990d4b0 |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:0b28816c1c2c |
---|---|
1 <tool id="rmassbank" name="RMassBank" version="@TOOL_VERSION@+galaxy2"> | |
2 <macros> | |
3 <import>macros.xml</import> | |
4 </macros> | |
5 <expand macro="creator"/> | |
6 | |
7 <requirements> | |
8 <requirement type="package" version="3.7">python</requirement> | |
9 <requirement type="package" version="2.4.1">openbabel</requirement> | |
10 <requirement type="package" version="3.0.0">bioconductor-rmassbank</requirement> | |
11 <requirement type="package" version="3.1.1">r-gplots</requirement> | |
12 <requirement type="package" version="3.0">zip</requirement> | |
13 </requirements> | |
14 <stdio> | |
15 <exit_code range="1:"/> | |
16 <exit_code range=":-1"/> | |
17 </stdio> | |
18 <command detect_errors="aggressive"><![CDATA[ | |
19 #for $infile in $param_in: | |
20 ln -s '${infile}' '${infile.element_identifier}' && | |
21 #end for | |
22 | |
23 ln -s '${compounds}' '${compounds.element_identifier}' && | |
24 | |
25 mkdir -p ./infolists && | |
26 ln -s $infolist ./infolists/${infolist.element_identifier} && | |
27 | |
28 #if $select_settings.setting_file == "template" | |
29 python3 '${__tool_directory__}/createSettingsFile.py' | |
30 '${__tool_directory__}/mysettings.ini' | |
31 '${select_settings.general_param.rtMargin}' | |
32 '${select_settings.general_param.rtShift}' | |
33 '${select_settings.general_param.use_version}' | |
34 '${select_settings.general_param.use_rean_peaks}' | |
35 '${select_settings.general_param.add_annotation}' | |
36 '${select_settings.shifts.pH}' | |
37 '${select_settings.shifts.pM}' | |
38 '${select_settings.shifts.pNa}' | |
39 '${select_settings.shifts.mH}' | |
40 '${select_settings.shifts.mFA}' | |
41 '${select_settings.noise_recalibration.electronicNoiseWidth}' | |
42 '${select_settings.noise_recalibration.recalibrateBy}' | |
43 '${select_settings.noise_recalibration.recalibrateMS1}' | |
44 '${select_settings.noise_recalibration.recalibrateMS1Window}' | |
45 '${select_settings.noise_recalibration.multiplicityFilter}' | |
46 '${select_settings.data_filtering.ppmHighMass}' | |
47 '${select_settings.data_filtering.ppmLowMass}' | |
48 '${select_settings.data_filtering.massRangeDivision}' | |
49 '${select_settings.data_filtering.ppmFine}' | |
50 '${select_settings.data_filtering.prelimCut}' | |
51 '${select_settings.data_filtering.prelimCutRatio}' | |
52 '${select_settings.data_filtering.fineCut}' | |
53 '${select_settings.data_filtering.fineCutRatio}' | |
54 '${select_settings.data_filtering.specOkLimit}' | |
55 '${select_settings.data_filtering.dbeMinLimit}' | |
56 '${select_settings.data_filtering.satelliteMzLimit}' | |
57 '${select_settings.data_filtering.satelliteIntLimit}' | |
58 '${select_settings.raw_settings.ppmFine}' | |
59 '${select_settings.raw_settings.mzCoarse}' | |
60 '${select_settings.raw_settings.fillPrecursorScan}' | |
61 \$(echo `which babel` | sed s/babel//) | |
62 '${select_settings.general_param.include_sp_tags}' | |
63 '${select_settings.raw_settings.unknownMass}' | |
64 && | |
65 #else | |
66 python3 '${__tool_directory__}/addBabelPath.py' | |
67 '${select_settings.setting_file_ext}' | |
68 \$(echo `which babel` | sed s/babel//) | |
69 && | |
70 #end if | |
71 | |
72 Rscript '${__tool_directory__}/rmassbank.r' | |
73 mysettings_galaxy.ini | |
74 '${compounds.element_identifier}' | |
75 '${mode}' | |
76 ./infolists | |
77 #for $infile in $param_in: | |
78 '${infile.element_identifier}' | |
79 #end for | |
80 && | |
81 | |
82 mv mysettings_galaxy.ini $outputINI && | |
83 mv results_RA.RData $rafile && | |
84 mv results_RF.RData $rffile && | |
85 mv Rplots.pdf $pdfplot && | |
86 mv results.RData $fllrdata && | |
87 zip -r mb_records.zip XX && | |
88 mv mb_records.zip $output && | |
89 | |
90 [ ! -f ./results_Failpeaks.csv ] && touch ./results_Failpeaks.csv && | |
91 mv results_Failpeaks.csv $csvfile | |
92 ]]> | |
93 </command> | |
94 <inputs> | |
95 <param name="param_in" type="data" format="mzML" multiple="true" label="Input mzML files."/> | |
96 <param format="csv" name="compounds" type="data" label="Compound list in CSV format."/> | |
97 <param format="csv" name="infolist" type="data" label="Infolist in CSV format."/> | |
98 <param name="mode" type="text" label="Mode for RMassBank pipeline."/> | |
99 | |
100 <conditional name="select_settings"> | |
101 <param name="setting_file" type="select" | |
102 label="Choose the source if you want to generate settings file or you will supply with your own settings file."> | |
103 <option value="template" selected="true">Generate settings file for me</option> | |
104 <option value="external">Use external settings file</option> | |
105 </param> | |
106 <when value="template"> | |
107 | |
108 <section name="general_param" title="Setting of general parameters."> | |
109 <param name="rtMargin" type="float" value="0.4" | |
110 label="Deviation (in minutes) allowed the for retention time."/> | |
111 <param name="rtShift" type="float" value="0.0" label="Systematic retention time shift."/> | |
112 <param name="use_version" type="select" value="2" | |
113 label="Which MassBank record version to use; version 2 is advised."> | |
114 <option value="2" selected="true">2</option> | |
115 <option value="1">1</option> | |
116 </param> | |
117 <param name="use_rean_peaks" type="select" value="TRUE" label="Include reanalyzed peaks?"> | |
118 <option value="TRUE" selected="true">TRUE</option> | |
119 <option value="FALSE">FALSE</option> | |
120 </param> | |
121 <param name="add_annotation" type="select" value="TRUE" | |
122 label="Annotate the spectra files with (putative) molecular formulas for fragments?"> | |
123 <option value="TRUE" selected="true">TRUE</option> | |
124 <option value="FALSE">FALSE</option> | |
125 </param> | |
126 <param name="include_sp_tags" type="select" value="FALSE" label="Include sp tags?"> | |
127 <option value="FALSE" selected="true">FALSE</option> | |
128 <option value="TRUE">TRUE</option> | |
129 </param> | |
130 </section> | |
131 | |
132 <section name="shifts" title="Shifts of the starting points for RMassBank accession numbers."> | |
133 <param name="pH" type="integer" value="0" label="pH ([M+H]+: accession numbers 1-14) "/> | |
134 <param name="pM" type="integer" value="16" label="pM ([M]+: 17-30)"/> | |
135 <param name="pNa" type="integer" value="32" label="pNa ([M+Na]+: 33-46)"/> | |
136 <param name="mH" type="integer" value="50" label="mH ([M-H]-: 51-64)"/> | |
137 <param name="mFA" type="integer" value="66" label="mFA ([M+FA]-: 67-80)"/> | |
138 </section> | |
139 | |
140 <section name="noise_recalibration" title="Noise and recalibration settings"> | |
141 <param name="electronicNoiseWidth" type="float" value="0.3" | |
142 label="Exclusion width of electronic noise peaks (from unmatched peaks, prior to reanalysis)."/> | |
143 <param name="recalibrateBy" type="select" value="dppm" label="Recalibration settings:"> | |
144 <option value="dppm" selected="true">dppm</option> | |
145 <option value="dmz">dmz</option> | |
146 </param> | |
147 <param name="recalibrateMS1" type="select" value="common" label="Recalibrate MS1:"> | |
148 <option value="common" selected="true">with common curve</option> | |
149 <option value="separate">separately</option> | |
150 <option value="none">none (do not recalibrate)</option> | |
151 </param> | |
152 <param name="recalibrateMS1Window" type="integer" value="15" | |
153 label="Window width to look for MS1 peaks to recalibrate (in ppm integer values):"/> | |
154 <param name="multiplicityFilter" type="integer" value="2" | |
155 label="Define the multiplicity filtering level, default is 2 (peak occurs at least twice, | |
156 set this to 1 if you want to turn this option off, set this to anything > 2 if you want harder filtering"/> | |
157 </section> | |
158 | |
159 <section name="data_filtering" title="Data filtering settings"> | |
160 <param name="ppmHighMass" type="integer" value="10" label="ppmHighMass"/> | |
161 <param name="ppmLowMass" type="integer" value="15" label="ppmLowMass"/> | |
162 <param name="massRangeDivision" type="integer" value="120" label="massRangeDivision"/> | |
163 <param name="ppmFine" type="integer" value="5" label="ppmFine"/> | |
164 <param name="prelimCut" type="integer" value="1000" label="prelimCut"/> | |
165 <param name="prelimCutRatio" type="float" value="0.0" label="prelimCutRatio"/> | |
166 <param name="fineCut" type="float" value="0.0" label="fineCut"/> | |
167 <param name="fineCutRatio" type="float" value="0.0" label="fineCutRatio"/> | |
168 <param name="specOkLimit" type="integer" value="1000" label="specOkLimit"/> | |
169 <param name="dbeMinLimit" type="float" value="-0.5" label="dbeMinLimit"/> | |
170 <param name="satelliteMzLimit" type="float" value="0.5" label="satelliteMzLimit"/> | |
171 <param name="satelliteIntLimit" type="float" value="0.05" label="satelliteIntLimit"/> | |
172 </section> | |
173 | |
174 <section name="raw_settings" title="Degine raw MS retrieval settings"> | |
175 <param name="ppmFine" type="integer" value="10" label="ppmFine"/> | |
176 <param name="mzCoarse" type="float" value="0.5" label="mzCoarse"/> | |
177 <param name="fillPrecursorScan" type="select" value="FALSE" | |
178 label="fillPrecursorScan (FALSE for 'good' mzML files which have all the info needed)"> | |
179 <option value="TRUE">TRUE</option> | |
180 <option value="FALSE" selected="true">FALSE</option> | |
181 </param> | |
182 <param name="unknownMass" type="select" value="charged" | |
183 label="Select how to treat unknown compound masses."> | |
184 <option value="charged" selected="true">charged</option> | |
185 <option value="neutral">neutral</option> | |
186 </param> | |
187 </section> | |
188 </when> | |
189 <when value="external"> | |
190 <param name="setting_file_ext" type="data" format="txt" label="Settings file"/> | |
191 </when> | |
192 </conditional> | |
193 | |
194 </inputs> | |
195 | |
196 <outputs> | |
197 <data format="txt" name="outputINI" label="mysettings_galaxy.ini"/> | |
198 <data format="csv" name="csvfile" label="CSV file with failed peaks."/> | |
199 <data format="pdf" name="pdfplot" label="PDF plot."/> | |
200 <data format="rdata" name="fllrdata" label="Full R environment."/> | |
201 <data format="rdata" name="rafile" label="RData file with re-analyzed spectra (_RA.RData)."/> | |
202 <data format="rdata" name="rffile" label="RData file with refiltered spectra (_RF.RData)."/> | |
203 <data format="zip" name="output" label="Zipped folder with results."/> | |
204 </outputs> | |
205 <tests> | |
206 <test> | |
207 <param name="compounds" value="compoundList.csv"/> | |
208 <param name="infolist" value="infolist.csv"/> | |
209 <param name="mode" value="pH"/> | |
210 <param name="param_in" value="1_3_Trifluoromethylphenyl_piperazin_2819_pos.mzML"/> | |
211 <param name="ppmFine" value="5"/> | |
212 | |
213 <output name="outputINI" value="mysettings_galaxy.ini" ftype="txt" lines_diff="2"/> | |
214 <output name="csvfile" value="failedPeaks.csv" ftype="csv" lines_diff="1"/> | |
215 <output name="pdfplot" value="plot.pdf" compare="sim_size" delta_frac="0.1"/> | |
216 <output name="fllrdata" value="resultsFull.RData" compare="sim_size" delta_frac="0.1"/> | |
217 <output name="rafile" value="results_RA.RData" compare="sim_size" delta_frac="0.1"/> | |
218 <output name="rffile" value="results_RF.RData" compare="sim_size" delta_frac="0.1"/> | |
219 <output name="output" value="output.zip" compare="sim_size" delta_frac="0.1"/> | |
220 </test> | |
221 </tests> | |
222 | |
223 <help> | |
224 <![CDATA[ | |
225 @HELP@ | |
226 ]]> | |
227 </help> | |
228 | |
229 <citations> | |
230 <citation type="doi">10.1002/jms.3131</citation> | |
231 </citations> | |
232 </tool> |