Mercurial > repos > galaxyp > idconvert
diff idconvert.xml @ 1:9e6e840d6b52 draft
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msconvert commit 6674ecccbb39a4bd7e379d6e8969ccec0069c2f1
author | galaxyp |
---|---|
date | Mon, 08 Aug 2016 10:43:52 -0400 |
parents | 4f7d6bec667f |
children | edb33e8224c6 |
line wrap: on
line diff
--- a/idconvert.xml Fri Apr 08 16:07:32 2016 -0400 +++ b/idconvert.xml Mon Aug 08 10:43:52 2016 -0400 @@ -1,34 +1,44 @@ <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" /> - + <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 +46,78 @@ </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> - + <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_psms"> + <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_psms"> + <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. + +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> <expand macro="citations" /> </tool>