Mercurial > repos > galaxyp > openms_idfileconverter
diff IDFileConverter.xml @ 11:43a1db77b7a6 draft
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
author | galaxyp |
---|---|
date | Wed, 09 Sep 2020 12:55:15 +0000 |
parents | 83cf7a4cd03c |
children | 250d6a43f66b |
line wrap: on
line diff
--- a/IDFileConverter.xml Fri May 17 10:13:29 2019 -0400 +++ b/IDFileConverter.xml Wed Sep 09 12:55:15 2020 +0000 @@ -1,118 +1,112 @@ <?xml version='1.0' encoding='UTF-8'?> <!--This is a configuration file for the integration of a tools into Galaxy (https://galaxyproject.org/). This file was automatically generated using CTDConverter.--> <!--Proposed Tool Section: [ID Processing]--> -<tool id="IDFileConverter" name="IDFileConverter" version="2.3.0"> +<tool id="IDFileConverter" name="IDFileConverter" version="@TOOL_VERSION@+galaxy@GALAXY_VERSION@" profile="20.05"> <description>Converts identification engine file formats.</description> <macros> <token name="@EXECUTABLE@">IDFileConverter</token> <import>macros.xml</import> + <import>macros_autotest.xml</import> + <import>macros_test.xml</import> </macros> - <expand macro="references"/> - <expand macro="stdio"/> <expand macro="requirements"/> - <command detect_errors="aggressive"><![CDATA[ - - ## check input file type - #set $in_type = $param_in.ext - - ## create the symlinks to set the proper file extension, since IDFileConverter uses them to choose how to handle the input files - ln -s '$param_in' 'param_in.${in_type}' && - - IDFileConverter + <expand macro="stdio"/> + <command detect_errors="exit_code"><![CDATA[@QUOTE_FOO@ +@EXT_FOO@ +#import re - #if $param_in: - -in 'param_in.${in_type}' - #end if -#if $param_out: - -out $param_out -#end if -#if $param_out_type: - -out_type - #if " " in str($param_out_type): - "$param_out_type" - #else - $param_out_type - #end if -#end if -#if $param_mz_file: - -mz_file $param_mz_file -#end if -#if $param_mz_name: - -mz_name "$param_mz_name" -#end if -#if $param_peptideprophet_analyzed: - -peptideprophet_analyzed +## Preprocessing +mkdir in && +ln -s '$in' 'in/${re.sub("[^\w\-_]", "_", $in.element_identifier)}.$gxy2omsext($in.ext)' && +mkdir out && +#if $mz_file: + mkdir mz_file && + ln -s '$mz_file' 'mz_file/${re.sub("[^\w\-_]", "_", $mz_file.element_identifier)}.$gxy2omsext($mz_file.ext)' && #end if -#if $param_score_type: - -score_type - #if " " in str($param_score_type): - "$param_score_type" - #else - $param_score_type - #end if -#end if -#if $adv_opts.adv_opts_selector=='advanced': - #if $adv_opts.param_ignore_proteins_per_peptide: - -ignore_proteins_per_peptide -#end if - #if $adv_opts.param_scan_regex: - -scan_regex "$adv_opts.param_scan_regex" -#end if - #if $adv_opts.param_no_spectra_data_override: - -no_spectra_data_override -#end if - #if $adv_opts.param_add_ionmatch_annotation: - -add_ionmatch_annotation $adv_opts.param_add_ionmatch_annotation + +## Main program call + +set -o pipefail && +@EXECUTABLE@ -write_ctd ./ && +python3 '$__tool_directory__/fill_ctd.py' '@EXECUTABLE@.ctd' '$args_json' '$hardcoded_json' && +@EXECUTABLE@ -ini @EXECUTABLE@.ctd +-in +'in/${re.sub("[^\w\-_]", "_", $in.element_identifier)}.$gxy2omsext($in.ext)' +-out +'out/output.${out_type}' +#if $mz_file: + -mz_file + 'mz_file/${re.sub("[^\w\-_]", "_", $mz_file.element_identifier)}.$gxy2omsext($mz_file.ext)' #end if - #if $adv_opts.param_force: - -force -#end if -#end if -]]> -</command> + +## Postprocessing +&& mv 'out/output.${out_type}' '$out' +#if "ctd_out_FLAG" in $OPTIONAL_OUTPUTS + && mv '@EXECUTABLE@.ctd' '$ctd_out' +#end if]]></command> + <configfiles> + <inputs name="args_json" data_style="paths"/> + <configfile name="hardcoded_json"><![CDATA[{"log": "log.txt", "threads": "\${GALAXY_SLOTS:-1}", "no_progress": true}]]></configfile> + </configfiles> <inputs> - <param name="param_in" type="data" format="pepxml,protXML,mascotXML,omssaXML,xml,psms,tabular,idxml,mzid" optional="False" label="Input file or directory containing the data to convert" help="(-in) This may be: <br>- a single file in a multi-purpose XML format (pepXML, protXML, idXML, mzid), <br>- a single file in a search engine-specific format (Mascot: mascotXML, OMSSA: omssaXML, X! Tandem: xml, Percolator: psms), <br>- a single text file (tab separated) with one line for all peptide sequences matching a spectrum (top N hits), <br>- for Sequest results, a directory containing .out files. <br>"/> - <param name="param_out_type" display="radio" type="select" optional="True" label="Output file type (default: determined from file extension)" help="(-out_type) "> - <option value="idXML">idXML</option> + <param name="in" argument="-in" type="data" format="idxml,mascotxml,mzid,pepxml,protxml,psms,tabular,xml,xquest.xml" optional="false" label="Input file or directory containing the data to convert" help="This may be:. - a single file in a multi-purpose XML format (.pepXML, .protXML, .idXML, .mzid),. - a single file in a search engine-specific format (Mascot: .mascotXML, OMSSA: .omssaXML, X! Tandem: .xml, Percolator: .psms, xQuest: .xquest.xml),. - a single text file (tab separated) with one line for all peptide sequences matching a spectrum (top N hits),. - for Sequest results, a directory containing .out files.. select idxml,mascotxml,mzid,pepxml,protxml,psms,tabular,xml,xquest.xml data sets(s)"/> + <param name="out_type" argument="-out_type" type="select" optional="false" label="Output file type (default: determined from file extension)" help=""> + <option value="FASTA">fasta</option> + <option value="idXML">idxml</option> <option value="mzid">mzid</option> - <option value="pepXML">pepXML</option> - <option value="FASTA">FASTA</option> + <option value="pepXML">pepxml</option> + <option value="xquest.xml">xquest.xml</option> + <expand macro="list_string_san"/> </param> - <param name="param_mz_file" type="data" format="mzml,mzxml,mzData" optional="True" label="[pepXML, Sequest, Mascot, X! Tandem, mzid, Percolator only] Retention times and native spectrum ids (spectrum_references) will be looked up in this file" help="(-mz_file) "/> - <param name="param_mz_name" type="text" size="30" label="[pepXML only] Experiment filename/path (extension will be removed) to match in the pepXML file ('base_name' attribute)" help="(-mz_name) Only necessary if different from 'mz_file'"> - <sanitizer> - <valid initial="string.printable"> - <remove value="'"/> - <remove value="""/> - </valid> - </sanitizer> + <param name="mz_file" argument="-mz_file" type="data" format="mzdata,mzml,mzxml" optional="true" label="[pepXML, Sequest, Mascot, X" help="Tandem, mzid, Percolator only] Retention times and native spectrum ids (spectrum_references) will be looked up in this file select mzdata,mzml,mzxml data sets(s)"/> + <param name="mz_name" argument="-mz_name" type="text" optional="true" value="" label="[pepXML only] Experiment filename/path (extension will be removed) to match in the pepXML file ('base_name' attribute)" help="Only necessary if different from 'mz_file'"> + <expand macro="list_string_san"/> </param> - <param name="param_peptideprophet_analyzed" display="radio" type="boolean" truevalue="-peptideprophet_analyzed" falsevalue="" checked="false" optional="True" label="[pepXML output only] Write output in the format of a PeptideProphet analysis result" help="(-peptideprophet_analyzed) By default a 'raw' pepXML is produced that contains only search engine results"/> - <param name="param_score_type" display="radio" type="select" optional="False" value="qvalue" label="[Percolator only] Which of the Percolator scores to report as 'the' score for a peptide hit" help="(-score_type) "> + <param name="peptideprophet_analyzed" argument="-peptideprophet_analyzed" type="boolean" truevalue="true" falsevalue="false" checked="false" label="[pepXML output only] Write output in the format of a PeptideProphet analysis result" help="By default a 'raw' pepXML is produced that contains only search engine results"/> + <param name="score_type" argument="-score_type" display="radio" type="select" optional="false" label="[Percolator only] Which of the Percolator scores to report as 'the' score for a peptide hit" help=""> <option value="qvalue" selected="true">qvalue</option> <option value="PEP">PEP</option> <option value="score">score</option> + <expand macro="list_string_san"/> </param> - <expand macro="advanced_options"> - <param name="param_ignore_proteins_per_peptide" display="radio" type="boolean" truevalue="-ignore_proteins_per_peptide" falsevalue="" checked="false" optional="True" label="[Sequest only] Workaround to deal with .out files that contain" help="(-ignore_proteins_per_peptide) e.g. "+1" in references column, <br>but do not list extra references in subsequent lines (try -debug 3 or 4)"/> - <param name="param_scan_regex" type="text" size="30" label="[Mascot, pepXML, Percolator only] Regular expression used to extract the scan number or retention time" help="(-scan_regex) See documentation for details"> - <sanitizer> - <valid initial="string.printable"> - <remove value="'"/> - <remove value="""/> - </valid> - </sanitizer> + <expand macro="adv_opts_macro"> + <param name="ignore_proteins_per_peptide" argument="-ignore_proteins_per_peptide" type="boolean" truevalue="true" falsevalue="false" checked="false" label="[Sequest only] Workaround to deal with .out files that contain" help="e.g. "+1" in references column,. but do not list extra references in subsequent lines (try -debug 3 or 4)"/> + <param name="scan_regex" argument="-scan_regex" type="text" optional="true" value="" label="[Mascot, pepXML, Percolator only] Regular expression used to extract the scan number or retention time" help="See documentation for details"> + <expand macro="list_string_san"/> </param> - <param name="param_no_spectra_data_override" display="radio" type="boolean" truevalue="-no_spectra_data_override" falsevalue="" checked="false" optional="True" label="[+mz_file only] Setting this flag will avoid overriding 'spectra_data' in ProteinIdentifications if mz_file is given and 'spectrum_reference's are added/updated" help="(-no_spectra_data_override) Use only if you are sure it is absolutely the same mz_file as used for identification"/> - <param name="param_add_ionmatch_annotation" type="float" value="0.0" label="[+mz_file only] Will annotate the contained identifications with their matches in the given mz_file" help="(-add_ionmatch_annotation) Will take quite some while. Match tolerance is .4"/> - <param name="param_force" display="radio" type="boolean" truevalue="-force" falsevalue="" checked="false" optional="True" label="Overwrite tool specific checks" help="(-force) "/> + <param name="no_spectra_data_override" argument="-no_spectra_data_override" type="boolean" truevalue="true" falsevalue="false" checked="false" label="[+mz_file only] Setting this flag will avoid overriding 'spectra_data' in ProteinIdentifications if mz_file is given and 'spectrum_reference's are added/updated" help="Use only if you are sure it is absolutely the same mz_file as used for identification"/> + <param name="no_spectra_references_override" argument="-no_spectra_references_override" type="boolean" truevalue="true" falsevalue="false" checked="false" label="[+mz_file only] Setting this flag will avoid overriding 'spectrum_reference' in PeptideIdentifications if mz_file is given and a 'spectrum_reference' is already present" help=""/> + <param name="add_ionmatch_annotation" argument="-add_ionmatch_annotation" type="float" optional="true" value="0.0" label="[+mz_file only] Will annotate the contained identifications with their matches in the given mz_file" help="Will take quite some while. Match tolerance is .4"/> + <param name="force" argument="-force" type="boolean" truevalue="true" falsevalue="false" checked="false" label="Overwrite tool specific checks" help=""/> + <param name="test" argument="-test" type="hidden" optional="true" value="False" label="Enables the test mode (needed for internal use only)" help=""> + <expand macro="list_string_san"/> + </param> </expand> + <param name="OPTIONAL_OUTPUTS" type="select" multiple="true" label="Optional outputs" optional="true"> + <option value="ctd_out_FLAG">Output used ctd (ini) configuration file</option> + </param> </inputs> <outputs> - <data name="param_out" auto_format="true"/> + <data name="out" label="${tool.name} on ${on_string}: out"> + <change_format> + <when input="out_type" value="FASTA" format="fasta"/> + <when input="out_type" value="idXML" format="idxml"/> + <when input="out_type" value="mzid" format="mzid"/> + <when input="out_type" value="pepXML" format="pepxml"/> + <when input="out_type" value="xquest.xml" format="xquest.xml"/> + </change_format> + </data> + <data name="ctd_out" format="xml" label="${tool.name} on ${on_string}: ctd"> + <filter>OPTIONAL_OUTPUTS is not None and "ctd_out_FLAG" in OPTIONAL_OUTPUTS</filter> + </data> </outputs> - <help>Converts identification engine file formats. + <tests> + <expand macro="autotest_IDFileConverter"/> + <expand macro="manutest_IDFileConverter"/> + </tests> + <help><![CDATA[Converts identification engine file formats. -For more information, visit https://abibuilder.informatik.uni-tuebingen.de/archive/openms/Documentation/release/2.3.0/html/TOPP_IDFileConverter.html</help> +For more information, visit http://www.openms.de/documentation/TOPP_IDFileConverter.html]]></help> + <expand macro="references"/> </tool>