Mercurial > repos > galaxyp > thermo_raw_file_converter
comparison thermo_converter.xml @ 6:2d80c8b2dfc2 draft
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/ThermoRawfileParser commit 51cb9a683762b514de76c1654e5e5cac3ff443f8"
author | galaxyp |
---|---|
date | Mon, 06 Apr 2020 19:00:54 -0400 |
parents | 77a18a61aeed |
children | 63769c4217a7 |
comparison
equal
deleted
inserted
replaced
5:77a18a61aeed | 6:2d80c8b2dfc2 |
---|---|
1 <tool id="thermo_raw_file_converter" name="Thermo" version="1.1.10"> | 1 <tool id="thermo_raw_file_converter" name="Thermo" version="1.1.10"> |
2 <description>RAW file converter</description> | 2 <description>RAW file converter</description> |
3 <requirements> | 3 <requirements> |
4 <requirement type="package" version="1.1.10">ThermoRawFileParser</requirement> | 4 <requirement type="package" version="1.1.10">thermorawfileparser</requirement> |
5 </requirements> | 5 </requirements> |
6 <command> | 6 <command> |
7 <![CDATA[ | 7 <![CDATA[ |
8 #import re | 8 #import re |
9 | |
10 #set $temp_stderr = "thermo_converter_stderr" | |
11 | |
12 echo "" > $temp_stderr && | |
13 | 9 |
14 mkdir ./raws_folder && | 10 mkdir ./raws_folder && |
15 mkdir ./output_folder && | 11 mkdir ./output_folder && |
16 #for $input_raw in $input: | 12 #for $input_raw in $input: |
17 #if len($input) > 1 | 13 #if len($input) > 1 |
20 #else: | 16 #else: |
21 ln -s -f '${input_raw}' './raws_folder/input.raw' && | 17 ln -s -f '${input_raw}' './raws_folder/input.raw' && |
22 #end if | 18 #end if |
23 #end for | 19 #end for |
24 | 20 |
25 (ThermoRawFileParser.sh | 21 ThermoRawFileParser.sh |
26 -d=./raws_folder | 22 -d=./raws_folder |
27 -o=./output_folder | 23 -o=./output_folder |
28 -f=$output_format | 24 -f=$output_format |
29 #if $output_metadata_selector != "off": | 25 #if $output_metadata_selector != "off": |
30 --metadata="${output_metadata_selector}" | 26 --metadata="${output_metadata_selector}" |
31 #end if | 27 #end if |
32 $zlib_boolean | 28 $zlib_boolean |
33 $peakpicking_boolean | 29 $peakpicking_boolean |
34 $ignore_instrument_errors_boolean | 30 $ignore_instrument_errors_boolean |
35 | 31 |
36 2>> $temp_stderr) | |
37 | |
38 && | |
39 | |
40 #if len($input) == 1: | 32 #if len($input) == 1: |
41 #if $output_format == "0": | 33 #if $output_format == "0": |
42 mv ./output_folder/input.mgf ./output_file.out && | 34 && mv ./output_folder/input.mgf ./output_file.out |
43 #else if $output_format == "1": | 35 #else if $output_format == "1": |
44 mv ./output_folder/input.mzML ./output_file.out && | 36 && mv ./output_folder/input.mzML ./output_file.out |
45 #else if $output_format == "2": | 37 #else if $output_format == "2": |
46 mv ./output_folder/input.mzML ./output_file.out && | 38 && mv ./output_folder/input.mzML ./output_file.out |
47 #end if | 39 #end if |
48 | 40 |
49 #if $output_metadata_selector != "off": | 41 #if $output_metadata_selector != "off": |
50 #if $output_metadata_selector == "0": | 42 #if $output_metadata_selector == "0": |
51 mv ./output_folder/input-metadata.json ./input-metadata.txt && | 43 && mv ./output_folder/input-metadata.json ./input-metadata.txt |
52 #else if $output_metadata_selector == "1": | 44 #else if $output_metadata_selector == "1": |
53 mv ./output_folder/input-metadata.txt ./input-metadata.txt && | 45 && mv ./output_folder/input-metadata.txt ./input-metadata.txt |
54 #end if | 46 #end if |
55 #end if | 47 #end if |
56 #end if | 48 #end if |
57 | |
58 cat $temp_stderr 2>&1; | |
59 ]]> | 49 ]]> |
60 </command> | 50 </command> |
61 <inputs> | 51 <inputs> |
62 <param name="input" type="data" format="thermo.raw" label="Thermo RAW file" help="" multiple="true" | 52 <param name="input" type="data" format="thermo.raw" label="Thermo RAW file" help="" multiple="true" |
63 optional="False" /> | 53 optional="False" /> |
134 </outputs> | 124 </outputs> |
135 | 125 |
136 <tests> | 126 <tests> |
137 <!-- Basic test --> | 127 <!-- Basic test --> |
138 <test expect_num_outputs="1"> | 128 <test expect_num_outputs="1"> |
139 <param name="input" value="really_small.raw"/> | 129 <param name="input" value="really_small.raw" ftype="thermo.raw"/> |
140 <param name="output_format" value="1"/> | 130 <param name="output_format" value="1"/> |
141 <output name="output" file="really_small.mzml" ftype="mzml" compare="sim_size" delta="3000" /> | 131 <output name="output" file="really_small.mzml" ftype="mzml" compare="sim_size" delta="3000" /> |
142 </test> | 132 </test> |
143 | 133 |
144 <!-- Testing contents of converted mgf file with txt metadata --> | 134 <!-- Testing contents of converted mgf file with txt metadata --> |
145 <test expect_num_outputs="2"> | 135 <test expect_num_outputs="2"> |
146 <param name="input" value="really_small.raw"/> | 136 <param name="input" value="really_small.raw" ftype="thermo.raw"/> |
147 <param name="output_format" value="0"/> | 137 <param name="output_format" value="0"/> |
148 <param name="output_metadata_selector" value="1"/> | 138 <param name="output_metadata_selector" value="1"/> |
149 <output name="output"> | 139 <output name="output" ftype="mgf"> |
150 <assert_contents> | 140 <assert_contents> |
151 <has_text text="SCANS=36"/> | 141 <has_text text="SCANS=36"/> |
152 <has_text text="RTINSECONDS=73.863181104"/> | 142 <has_text text="RTINSECONDS=73.863181104"/> |
153 <has_text text="PEPMASS=675.248779296875"/> | 143 <has_text text="PEPMASS=675.248779296875"/> |
154 <has_text text="CHARGE=2+"/> | 144 <has_text text="CHARGE=2+"/> |
174 | 164 |
175 </test> | 165 </test> |
176 | 166 |
177 <!-- Basic mzml collection test --> | 167 <!-- Basic mzml collection test --> |
178 <test expect_num_outputs="1"> | 168 <test expect_num_outputs="1"> |
179 <param name="input" value="really_small.raw,really_small_2.raw"/> | 169 <param name="input" value="really_small.raw,really_small_2.raw" ftype="thermo.raw"/> |
180 <param name="output_format" value="1"/> | 170 <param name="output_format" value="1"/> |
181 <output_collection name="output_mzml_collection" type="list" count="2"/> | 171 <output_collection name="output_mzml_collection" type="list" count="2"/> |
182 </test> | 172 </test> |
183 | 173 |
184 <!-- mgf collection test with metadata --> | 174 <!-- mgf collection test with metadata --> |