Mercurial > repos > galaxyp > thermo_raw_file_converter
comparison thermo_converter.xml @ 9:92ac8e086317 draft
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/ThermoRawFileParser commit 9bb883e027809047684fd6c45e9a6f1f3bf69351"
author | galaxyp |
---|---|
date | Wed, 17 Feb 2021 09:50:26 +0000 |
parents | 26c6706bfb07 |
children | b9b385097f13 |
comparison
equal
deleted
inserted
replaced
8:26c6706bfb07 | 9:92ac8e086317 |
---|---|
1 <tool id="thermo_raw_file_converter" name="Thermo" version="1.2.3+galaxy0"> | 1 <tool id="thermo_raw_file_converter" name="Thermo" version="@TOOL_VERSION@+galaxy0" profile="20.05"> |
2 <description>RAW file converter</description> | 2 <description>RAW file converter</description> |
3 <macros> | |
4 <token name="@TOOL_VERSION@">1.3.2</token> | |
5 </macros> | |
3 <requirements> | 6 <requirements> |
4 <requirement type="package" version="1.2.3">thermorawfileparser</requirement> | 7 <requirement type="package" version="@TOOL_VERSION@">thermorawfileparser</requirement> |
5 </requirements> | 8 </requirements> |
9 <stdio> | |
10 <regex match="ERROR" source="both" level="fatal" description="Fatal error"/> | |
11 </stdio> | |
12 <version_command><![CDATA[ThermoRawFileParser.sh --version]]></version_command> | |
6 <command> | 13 <command> |
7 <![CDATA[ | 14 <![CDATA[ |
8 #import re | 15 #import re |
9 | 16 |
10 mkdir ./raws_folder && | 17 #set $input_name = re.sub('[^\w\-\.]', '_', $input_file.element_identifier.replace(".raw", "") + ".raw") |
11 mkdir ./output_folder && | 18 ln -s -f '$input_file' '$input_name' && |
12 #for $input_raw in $input_files: | |
13 #set $input_name = re.sub('[^\w\-\.]', '_',$input_raw.element_identifier.split('/')[-1].replace(".raw", "") + ".raw") | |
14 ln -s -f '${input_raw}' './raws_folder/${input_name}' && | |
15 #end for | |
16 | 19 |
17 ThermoRawFileParser.sh | 20 ThermoRawFileParser.sh |
18 -d=./raws_folder | 21 --input='$input_name' |
19 -o=./output_folder | 22 --output_file='$output' |
20 -f=$output_format | 23 -f=$format_cond.output_format |
21 #if $output_metadata_selector != "off": | 24 #if $output_metadata_selector != "off": |
22 --metadata="${output_metadata_selector}" | 25 --metadata="$output_metadata_selector" |
23 #end if | 26 --metadata_output_file='$output_metadata' |
24 $zlib_boolean | 27 #end if |
25 $peakpicking_boolean | 28 #if $format_cond.output_format == "0" |
29 $format_cond.mgfPrecursor | |
30 #end if | |
31 #if $format_cond.output_format in ['1', '2'] | |
32 $format_cond.zlib_boolean | |
33 $format_cond.peakpicking_boolean | |
34 #end if | |
26 $ignore_instrument_errors_boolean | 35 $ignore_instrument_errors_boolean |
27 | 36 $allDetectors |
37 $includeExceptionData | |
38 #if $msLevel != '' | |
39 --msLevel="$msLevel" | |
40 #end if | |
28 ]]> | 41 ]]> |
29 </command> | 42 </command> |
30 <inputs> | 43 <inputs> |
31 <param name="input_files" type="data" format="thermo.raw" label="Thermo RAW file" help="" multiple="true" | 44 <param argument="--input" name="input_file" type="data" format="thermo.raw" label="Thermo RAW file" help="" optional="False"/> |
32 optional="False" /> | 45 <conditional name="format_cond"> |
33 | 46 <param argument="--format" name="output_format" type="select" label="Output format"> |
34 <param name="output_format" type="select" label="Output format"> | 47 <option value="0">mgf</option> |
35 <option value="0">mgf</option> | 48 <option value="1" selected="True">mzml</option> |
36 <option value="1" selected="True">mzml</option> | 49 <option value="2">Indexed mzml</option> |
37 <option value="2">Indexed mzml</option> | 50 <!-- <option value="3">Parquet</option> --> |
38 </param> | 51 </param> |
39 | 52 <when value="0"> |
40 <param name="zlib_boolean" type="boolean" truevalue="" falsevalue="-z" checked="true" | 53 <param argument="--mgfPrecursor" type="boolean" truevalue="--mgfPrecursor" falsevalue="" label="Include precursor scan number in MGF file" help=""/> |
41 label="Use zlib compression for the m/z ratios and intensities" help="" /> | 54 </when> |
42 | 55 <when value="1"> |
43 <param name="peakpicking_boolean" type="boolean" truevalue="" falsevalue="-p" checked="true" | 56 <param argument="--noZlibCompression" name="zlib_boolean" type="boolean" truevalue="" falsevalue="-z" checked="true" |
44 label="Use the peak picking provided by the native thermo library" help="" /> | 57 label="Use zlib compression for the m/z ratios and intensities" help=""/> |
45 | 58 <param argument="--noPeakPicking" name="peakpicking_boolean" type="boolean" truevalue="" falsevalue="-p" checked="true" |
46 <param name="ignore_instrument_errors_boolean" type="boolean" truevalue="-e" falsevalue="" checked="true" | 59 label="Use the peak picking provided by the native thermo library" help=""/> |
47 label="Ignore missing instrument properties" help="If false, it stops the conversion if instrument properties are missing" /> | 60 </when> |
48 | 61 <when value="2"> |
49 <param name="output_metadata_selector" type="select" label="Output metadata" > | 62 <param argument="--noZlibCompression" name="zlib_boolean" type="boolean" truevalue="" falsevalue="-z" checked="true" |
63 label="Use zlib compression for the m/z ratios and intensities" help=""/> | |
64 <param argument="--noPeakPicking" name="peakpicking_boolean" type="boolean" truevalue="" falsevalue="-p" checked="true" | |
65 label="Use the peak picking provided by the native thermo library" help=""/> | |
66 </when> | |
67 <when value="3"/> | |
68 </conditional> | |
69 <param argument="--metadata" name="output_metadata_selector" type="select" label="Output metadata"> | |
50 <option value="off" selected="True">No</option> | 70 <option value="off" selected="True">No</option> |
51 <option value="0">json</option> | 71 <option value="0">json</option> |
52 <option value="1">txt</option> | 72 <option value="1">txt</option> |
53 </param> | 73 </param> |
54 | 74 <param argument="--ignoreInstrumentErrors" name="ignore_instrument_errors_boolean" type="boolean" truevalue="-e" falsevalue="" checked="true" |
75 label="Ignore missing instrument properties" help="If false, it stops the conversion if instrument properties are missing"/> | |
76 <param argument="--allDetectors" type="boolean" truevalue="--allDetectors" falsevalue="" checked="false" label="Extract additional detector data" help="UV/PDA etc"/> | |
77 <param argument="--includeExceptionData" type="boolean" truevalue="--includeExceptionData" falsevalue="" label="Include reference and exception data"/> | |
78 <param argument="--msLevel" type="text" value="" label="Select MS levels " help="(MS1, MS2, etc) included in the output, should be a comma-separated list of integers ( 1,2,3 ) and/or intervals ( 1-3 ), open-end intervals ( 1- ) are allowed"> | |
79 <sanitizer invalid_char=""> | |
80 <valid initial="string.digits"> | |
81 <add value="-"/> | |
82 <add value=","/> | |
83 </valid> | |
84 </sanitizer> | |
85 </param> | |
55 </inputs> | 86 </inputs> |
56 <outputs> | 87 <outputs> |
57 | 88 <data name="output" format="mzml" label="${tool.name} on ${on_string}"> |
58 <collection name="output_mgf_collection" type="list" label="${tool.name} on ${on_string}: MGF collection"> | 89 <change_format> |
59 <filter>output_format == "0"</filter> | 90 <when input="format_cond.output_format" value="0" format="mgf"/> |
60 <discover_datasets pattern="(?P<designation>.+)\.mgf" directory="output_folder" ext="mgf"/> | 91 <!-- <when input="format_cond.output_format" value="3" format="parquet"/> --> |
61 </collection> | 92 </change_format> |
62 | 93 </data> |
63 <collection name="output_mzml_collection" type="list" label="${tool.name} on ${on_string}: mzML collection"> | 94 <data name="output_metadata" format="txt" label="${tool.name} on ${on_string}: metadata"> |
64 <filter>output_format == "1"</filter> | |
65 <discover_datasets pattern="(?P<designation>.+)\.mzML" ext="mzml" directory="output_folder"/> | |
66 </collection> | |
67 | |
68 <collection name="output_indexedmzml_collection" type="list" label="${tool.name} on ${on_string}: Indexed mzML collection"> | |
69 <filter>output_format == "2"</filter> | |
70 <discover_datasets pattern="(?P<designation>.+)\.mzML" ext="mzml" directory="output_folder"/> | |
71 </collection> | |
72 | |
73 <collection name="output_metadata_collection" type="list" label="${tool.name} on ${on_string}: metadata collection"> | |
74 <filter>output_metadata_selector != "off"</filter> | 95 <filter>output_metadata_selector != "off"</filter> |
75 <discover_datasets pattern="(?P<designation>.+)-metadata.txt" ext="txt" directory="output_folder"/> | 96 <change_format> |
76 <discover_datasets pattern="(?P<designation>.+)-metadata.json" ext="json" directory="output_folder"/> | 97 <when input="output_metadata_selector" value="0" format="json"/> |
77 </collection> | 98 </change_format> |
78 | 99 </data> |
79 </outputs> | 100 </outputs> |
80 | 101 |
81 <tests> | 102 <tests> |
82 <!-- Basic mgf test - 1 file --> | 103 <!-- mgf test, no metadata --> |
83 <test expect_num_outputs="1"> | 104 <test expect_num_outputs="1"> |
84 <param name="input_files" value="really_small.raw" ftype="thermo.raw"/> | 105 <param name="input_file" value="really_small.raw" ftype="thermo.raw"/> |
85 <param name="output_format" value="0"/> | 106 <conditional name="format_cond"> |
86 <output_collection name="output_mgf_collection" type="list" count="1"/> | 107 <param name="output_format" value="0"/> |
87 | 108 <param name="mgfPrecursor" value="true"/> |
88 <!--<output name="output" file="really_small.mzml" ftype="mzml" compare="sim_size" delta="3000" />--> | 109 </conditional> |
89 </test> | 110 <output name="output" ftype="mgf" value="really_small.mgf"> |
90 | 111 <assert_contents> |
91 | 112 <has_text text="SCANS=36"/> |
92 <!-- Basic mzml test - 2 files --> | 113 <has_text text="RTINSECONDS=73.863181104"/> |
114 <has_text text="PEPMASS=675.248779296875"/> | |
115 <has_text text="CHARGE=2+"/> | |
116 <has_text text="121.3116455 920.2367553711"/> | |
117 <has_text text="229.2241211 1137.6958007813"/> | |
118 <has_text text="1577.8967285 1487.9519042969"/> | |
119 </assert_contents> | |
120 </output> | |
121 <assert_command> | |
122 <has_text text="--mgfPrecursor"></has_text> | |
123 </assert_command> | |
124 </test> | |
125 | |
126 <!-- mzml test and json metadata --> | |
127 <test expect_num_outputs="2"> | |
128 <param name="input_file" value="really_small.raw" ftype="thermo.raw"/> | |
129 <conditional name="format_cond"> | |
130 <param name="output_format" value="1"/> | |
131 </conditional> | |
132 <param name="output_metadata_selector" value="0"/> | |
133 <output name="output" file="really_small.mzml" ftype="mzml"/> | |
134 <output name="output_metadata" value="really_small.json" ftype="json"/> | |
135 <assert_command> | |
136 <not_has_text text="--mgfPrecursor"></not_has_text> | |
137 </assert_command> | |
138 </test> | |
139 | |
140 <!-- mzml test (wo zlib compression and peak picking) and json metadata --> | |
141 <test expect_num_outputs="2"> | |
142 <param name="input_file" value="really_small.raw" ftype="thermo.raw"/> | |
143 <conditional name="format_cond"> | |
144 <param name="output_format" value="1"/> | |
145 <param name="zlib_boolean" value="false"/> | |
146 <param name="peakpicking_boolean" value="false"/> | |
147 </conditional> | |
148 <param name="output_metadata_selector" value="0"/> | |
149 <output name="output" file="really_small_ext.mzml" ftype="mzml"/> | |
150 <output name="output_metadata" value="really_small.json" ftype="json"/> | |
151 <assert_command> | |
152 <not_has_text text="--mgfPrecursor"></not_has_text> | |
153 <has_text text="-z "></has_text> | |
154 <has_text text="-p "></has_text> | |
155 </assert_command> | |
156 </test> | |
157 | |
158 <!-- indexed mzml, txt metadata (+ extra options) --> | |
159 <test expect_num_outputs="2"> | |
160 <param name="input_file" value="really_small.raw" ftype="thermo.raw"/> | |
161 <conditional name="format_cond"> | |
162 <param name="output_format" value="2"/> | |
163 </conditional> | |
164 <param name="output_metadata_selector" value="1"/> | |
165 <param name="ignore_instrument_errors_boolean" value="true"/> | |
166 <param name="allDetectors" value="true"/> | |
167 <param name="includeExceptionData" value="--includeExceptionData"/> | |
168 <param name="msLevel" value="1"/> | |
169 <output name="output" value="really_small.indexed_mzML" ftype="mzml"/> | |
170 <output name="output_metadata" ftype="txt"> | |
171 <assert_contents> | |
172 <has_text text="Instrument model=[MS, MS:1000494, Thermo Scientific instrument model, Orbitrap Fusion]"/> | |
173 <has_text text="Instrument name=Orbitrap Fusion"/> | |
174 <has_text text="Instrument serial number=[MS, MS:1000529, instrument serial number, FSN10188]"/> | |
175 <has_text text="Software version=[NCIT, NCIT:C111093, Software Version, 3.1.2412.17]"/> | |
176 <has_text text="Mass resolution=[MS, MS:1000011, mass resolution, 0.500]"/> | |
177 <has_text text="Number of scans=101"/> | |
178 <has_text text="Scan range=1;101"/> | |
179 <has_text text="Scan start time=[MS, MS:1000016, scan start time, 0.89]"/> | |
180 <has_text text="Time range=0.89;1.59"/> | |
181 <has_text text="Mass range=120.0000;2000.0000"/> | |
182 </assert_contents> | |
183 </output> | |
184 <assert_command> | |
185 <not_has_text text="--mgfPrecursor"></not_has_text> | |
186 <has_text text="-e "/> | |
187 <has_text text="--allDetectors"/> | |
188 <has_text text="--includeExceptionData"/> | |
189 <has_text text="--msLevel="1""/> | |
190 </assert_command> | |
191 </test> | |
192 <!-- parquet test, no metadata | |
93 <test expect_num_outputs="1"> | 193 <test expect_num_outputs="1"> |
94 <param name="input_files" value="really_small.raw,really_small_2.raw" ftype="thermo.raw"/> | 194 <param name="input_file" value="really_small.raw" ftype="thermo.raw"/> |
95 <param name="output_format" value="1"/> | 195 <conditional name="format_cond"> |
96 <output_collection name="output_mzml_collection" type="list" count="2"/> | 196 <param name="output_format" value="3"/> |
97 </test> | 197 </conditional> |
98 | 198 <output name="output" ftype="parquet" value="really_small.parquet"/> |
99 <!-- Testing contents of converted mgf file with txt metadata --> | 199 </test> --> |
100 <test expect_num_outputs="2"> | |
101 <param name="input_files" value="really_small.raw" ftype="thermo.raw"/> | |
102 <param name="output_format" value="0"/> | |
103 <param name="output_metadata_selector" value="1"/> | |
104 <output_collection name="output_mgf_collection" type="list" count="1"> | |
105 <element name="really_small" ftype="mgf"> | |
106 <assert_contents> | |
107 <has_text text="SCANS=36"/> | |
108 <has_text text="RTINSECONDS=73.863181104"/> | |
109 <has_text text="PEPMASS=675.248779296875"/> | |
110 <has_text text="CHARGE=2+"/> | |
111 <has_text text="121.3116455 920.2367553711"/> | |
112 <has_text text="229.2241211 1137.6958007813"/> | |
113 <has_text text="1577.8967285 1487.9519042969"/> | |
114 </assert_contents> | |
115 </element> | |
116 </output_collection> | |
117 <output_collection name="output_metadata_collection" type="list"> | |
118 <element name="really_small" ftype="txt"> | |
119 <assert_contents> | |
120 <has_text text="Instrument model=[MS, MS:1000494, Thermo Scientific instrument model, Orbitrap Fusion]"/> | |
121 <has_text text="Instrument name=Orbitrap Fusion"/> | |
122 <has_text text="Instrument serial number=[MS, MS:1000529, instrument serial number, FSN10188]"/> | |
123 <has_text text="Software version=[NCIT, NCIT:C111093, Software Version, 3.1.2412.17]"/> | |
124 <has_text text="Mass resolution=[MS, MS:1000011, mass resolution, 0.500]"/> | |
125 <has_text text="Number of scans=101"/> | |
126 <has_text text="Scan range=1;101"/> | |
127 <has_text text="Scan start time=[MS, MS:1000016, scan start time, 0.89]"/> | |
128 <has_text text="Time range=0.89;1.59"/> | |
129 <has_text text="Mass range=120.0000;2000.0000"/> | |
130 </assert_contents> | |
131 </element> | |
132 </output_collection> | |
133 </test> | |
134 | |
135 <!-- mgf collection test with metadata --> | |
136 <test expect_num_outputs="2"> | |
137 <param name="input_files" value="really_small.raw,really_small_2.raw,really_small_3.raw"/> | |
138 <param name="output_format" value="0"/> | |
139 <param name="output_metadata_selector" value="0"/> | |
140 <output_collection name="output_mgf_collection" type="list" count="3"/> | |
141 <output_collection name="output_metadata_collection" type="list" count="3"/> | |
142 </test> | |
143 </tests> | 200 </tests> |
144 <help> | 201 <help> |
145 <![CDATA[ | 202 <![CDATA[ |
146 | 203 |
147 Thermo RAW file converter based on the great `ThermoRawFileParser <https://github.com/compomics/ThermoRawFileParser>`_ project. | 204 Thermo RAW file converter based on the great `ThermoRawFileParser <https://github.com/compomics/ThermoRawFileParser>`_ project. |
148 | 205 |
149 ]]> | 206 ]]> |
150 </help> | 207 </help> |
151 <citations> | 208 <citations> |
152 <citation type="bibtex">@misc{Galaxy Proteomics Tools, | 209 <citation type="doi">10.1021/acs.jproteome.9b00328</citation> |
153 author = {Niels Hulstaert, et al.}, | |
154 title = {Galaxy Proteomics Tools}, | |
155 publisher = {GitHub}, | |
156 journal = {GitHub repository}, | |
157 year = {2017}, url = {https://github.com/compomics/ThermoRawFileParser}} | |
158 </citation> | |
159 </citations> | 210 </citations> |
160 </tool> | 211 </tool> |