comparison idconvert/idconvert.xml @ 4:158a71ee5733 draft

planemo upload commit b4871f9659a924a68430aed3a93f4f9bad733fd6
author galaxyp
date Wed, 07 Dec 2016 17:43:19 -0500
parents
children
comparison
equal deleted inserted replaced
3:987d73278bf9 4:158a71ee5733
1 <tool id="idconvert" name="idconvert" version="@VERSION@.0">
2 <description>Convert mass spectrometry identification files</description>
3 <macros>
4 <import>msconvert_macros.xml</import>
5 </macros>
6 <expand macro="generic_requirements" />
7 <stdio>
8 <exit_code range="1:" />
9 <regex match="Error"
10 source="both"
11 level="fatal"
12 description="Error" />
13 </stdio>
14 <command>
15 <![CDATA[
16 #import os.path
17 #set $input_name = '.'.join([$os.path.basename(str($from.input)),str($from.input.extension).replace('xml','.xml')])
18 ln -s "$from.input" "$input_name" &&
19 idconvert $input_name
20 #if str($to_format) == 'pep.xml':
21 --pepXML
22 #elif str($to_format) == 'text':
23 --text
24 #end if
25 --outdir outdir
26 && cp outdir/* $output
27 ]]>
28 </command>
29 <inputs>
30 <conditional name="from">
31 <param name="from_format" type="select" label="Convert from">
32 <option value="mzid">mzIdentML (mzid)</option>
33 <option value="pepxml">pepXML (pepxml)</option>
34 <option value="protxml">protXML (protxml)</option>
35 </param>
36 <when value="mzid">
37 <param name="input" type="data" format="pepxml,protxml,mzid" label="MS mzIdentML (mzid)" />
38 </when>
39 <when value="protxml">
40 <param name="input" type="data" format="protxml" label="MS pepXML (pepxml)" />
41 <param name="pepxml" type="data" format="pepxml" multiple="true" label="MS Identification" />
42 </when>
43 <when value="pepxml">
44 <param name="input" type="data" format="pepxml" label="MS Identification" />
45 </when>
46 </conditional>
47 <param name="to_format" type="select" label="Convert to">
48 <option value="mzid">mzIdentML (mzid)</option>
49 <option value="pep.xml">pepXML (pepxml)</option>
50 <option value="text">text</option>
51 </param>
52 </inputs>
53 <outputs>
54 <data format="mzid" name="output" label="${from.input.name.rsplit('.',1)[0]}.${to_format}">
55 <change_format>
56 <when input="to_format" value="pep.xml" format="pepxml" />
57 <when input="to_format" value="text" format="txt" />
58 </change_format>
59 </data>
60 </outputs>
61 <tests>
62 <test>
63 <param name="input" value="Rpal_01.pepXML" />
64 <param name="from_format" value="pepxml" />
65 <param name="to_format" value="mzid" />
66 <output name="output_psms">
67 <assert_contents>
68 <has_text text="MzIdentML" />
69 <has_text text="VIKKSTTGRVLSDDILVIRKGEIAARNASHKMR" />
70 </assert_contents>
71 </output>
72 </test>
73 <test>
74 <param name="input" value="Rpal_01.mzid" />
75 <param name="from_format" value="mzid" />
76 <param name="to_format" value="pep.xml" />
77 <output name="output_psms">
78 <assert_contents>
79 <has_text text="msms_pipeline_analysis" />
80 <has_text text="VIKKSTTGRVLSDDILVIRKGEIAARNASHKMR" />
81 </assert_contents>
82 </output>
83 </test>
84 </tests>
85 <help>
86 <![CDATA[
87 idconvert [options] [filemasks]
88 Convert mass spec identification file formats.
89
90 Return value: # of failed files.
91
92 Options:
93 -f [ --filelist ] arg : specify text file containing filenames
94 -o [ --outdir ] arg (=.) : set output directory ('-' for stdout) [.]
95 -c [ --config ] arg : configuration file (optionName=value)
96 -e [ --ext ] arg : set extension for output files [mzid|pepXML|txt]
97 --mzIdentML : write mzIdentML format [default]
98 --pepXML : write pepXML format
99 --text : write hierarchical text format
100 -v [ --verbose ] : display detailed progress information
101 Examples:
102
103 # convert sequest.pepXML to sequest.mzid
104 idconvert sequest.pepXML
105
106 # convert sequest.protXML to sequest.mzid
107 # Also reads any pepXML file referenced in the
108 # protXML file if available. If the protXML
109 # file has been moved from its original location,
110 # the pepXML will still be found if it has also
111 # been moved to the same position relative to the
112 # protXML file. This relative position is determined
113 # by reading the protXML protein_summary:summary_xml
114 # and protein_summary_header:source_files values.
115 idconvert sequest.protXML
116
117 # convert mascot.mzid to mascot.pepXML
118 idconvert mascot.mzid --pepXML
119
120 ]]>
121 </help>
122 <expand macro="citations" />
123 </tool>