diff idconvert.xml @ 1:cd33680f08ef draft default tip

planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msconvert commit d595e3cfe190a61d81005f9be7c2652aa5f91292
author galaxyp
date Sat, 23 Feb 2019 06:19:49 -0500
parents f073fd791784
children
line wrap: on
line diff
--- a/idconvert.xml	Fri Apr 08 16:01:32 2016 -0400
+++ b/idconvert.xml	Sat Feb 23 06:19:49 2019 -0500
@@ -1,34 +1,43 @@
 <tool id="idconvert" name="idconvert" version="@VERSION@.0">
     <description>Convert mass spectrometry identification files</description>
-
-    <macros>
-        <import>msconvert_macros.xml</import>
-    </macros>
-
-    <expand macro="generic_requirements" />
-
+    <requirements>
+      <requirement type="package" version="3.0.9992">proteowizard</requirement>
+    </requirements>
+    <stdio>
+        <exit_code range="1:" />
+        <regex match="Error"
+           source="both"
+           level="fatal"
+           description="Error" />
+    </stdio>
     <command>
 <![CDATA[
-#set input_name 
-ln -s $input input.${input.extension}
-idconvert input 
-
+#import os.path
+#set $input_name = '.'.join([$os.path.basename(str($from.input)),str($from.input.extension).replace('xml','.xml')])
+ln -s '$from.input' '$input_name' &&
+idconvert '$input_name'
+#if str($to_format) == 'pep.xml':
+--pepXML
+#elif str($to_format) == 'text':
+--text
+#end if
+--outdir 'outdir'
+&& cp outdir/* '$output'
 ]]>
     </command>
-
     <inputs> 
         <conditional name="from">
             <param name="from_format" type="select" label="Convert from">
                 <option value="mzid">mzIdentML (mzid)</option>
+                <option value="pepxml">pepXML (pepxml)</option>
                 <option value="protxml">protXML (protxml)</option>
-                <option value="pepxml">pepXML (pepxml)</option>
             </param>
             <when value="mzid">
                 <param name="input" type="data" format="pepxml,protxml,mzid" label="MS mzIdentML (mzid)" />
             </when>
             <when value="protxml">
                 <param name="input" type="data" format="protxml" label="MS pepXML (pepxml)" />
-                <param name="pepxml" type="data" format="pepxml" label="MS Identification" />
+                <param name="pepxml" type="data" format="pepxml" multiple="true" label="MS Identification" />
             </when>
             <when value="pepxml">
                 <param name="input" type="data" format="pepxml" label="MS Identification" />
@@ -36,14 +45,80 @@
         </conditional>
         <param name="to_format" type="select" label="Convert to">
             <option value="mzid">mzIdentML (mzid)</option>
-            <option value="pepxml">pepXML (pepxml)</option>
+            <option value="pep.xml">pepXML (pepxml)</option>
             <option value="text">text</option>
         </param>
-  </inputs>
+    </inputs>
+    <outputs>
+        <data format="mzid" name="output" label="${from.input.name.rsplit('.',1)[0]}.${to_format}">
+            <change_format>
+                <when input="to_format" value="pep.xml" format="pepxml" />
+                <when input="to_format" value="text" format="txt" />
+            </change_format>
+        </data>
+    </outputs>
+    <tests>
+        <test>
+            <param name="input" value="Rpal_01.pepXML" />
+            <param name="from_format" value="pepxml" />
+            <param name="to_format" value="mzid" />
+            <output name="output">
+                <assert_contents>
+                    <has_text text="MzIdentML" />
+                    <has_text text="VIKKSTTGRVLSDDILVIRKGEIAARNASHKMR" />
+                </assert_contents>
+            </output>
+        </test>
+        <test>
+            <param name="input" value="Rpal_01.mzid" />
+            <param name="from_format" value="mzid" />
+            <param name="to_format" value="pep.xml" />
+            <output name="output">
+                <assert_contents>
+                    <has_text text="msms_pipeline_analysis" />
+                    <has_text text="VIKKSTTGRVLSDDILVIRKGEIAARNASHKMR" />
+                </assert_contents>
+            </output>
+        </test>
+    </tests>
+    <help>
+<![CDATA[
+idconvert [options] [filemasks]
+Convert mass spec identification file formats.
 
-  <tests>
-  </tests>
-  <help>
-  </help>
-  <expand macro="citations" />
+Return value: # of failed files.
+
+Options:
+  -f [ --filelist ] arg    : specify text file containing filenames
+  -o [ --outdir ] arg (=.) : set output directory ('-' for stdout) [.]
+  -c [ --config ] arg      : configuration file (optionName=value)
+  -e [ --ext ] arg         : set extension for output files [mzid|pepXML|txt]
+  --mzIdentML              : write mzIdentML format [default]
+  --pepXML                 : write pepXML format
+  --text                   : write hierarchical text format
+  -v [ --verbose ]         : display detailed progress information
+Examples:
+
+# convert sequest.pepXML to sequest.mzid
+idconvert sequest.pepXML
+
+# convert sequest.protXML to sequest.mzid
+# Also reads any pepXML file referenced in the 
+# protXML file if available.  If the protXML 
+# file has been moved from its original location, 
+# the pepXML will still be found if it has also 
+# been moved to the same position relative to the 
+# protXML file. This relative position is determined 
+# by reading the protXML protein_summary:summary_xml 
+# and protein_summary_header:source_files values.
+idconvert sequest.protXML
+
+# convert mascot.mzid to mascot.pepXML
+idconvert mascot.mzid --pepXML
+
+]]>
+    </help>
+    <citations>
+        <citation type="doi">10.1093/bioinformatics/btn323</citation>
+    </citations>
 </tool>