Mercurial > repos > galaxyp > openms_spectrastsearchadapter
diff SpectraSTSearchAdapter.xml @ 8:28e96ae21a44 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:53:13 +0000 |
parents | ab22e4296eaf |
children | 27ddea86fe90 |
line wrap: on
line diff
--- a/SpectraSTSearchAdapter.xml Fri May 17 10:13:17 2019 -0400 +++ b/SpectraSTSearchAdapter.xml Wed Sep 09 12:53:13 2020 +0000 @@ -1,100 +1,124 @@ <?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: [Utilities]--> -<tool id="SpectraSTSearchAdapter" name="SpectraSTSearchAdapter" version="2.3.0"> +<tool id="SpectraSTSearchAdapter" name="SpectraSTSearchAdapter" version="@TOOL_VERSION@+galaxy@GALAXY_VERSION@" profile="20.05"> <description>Interface to the SEARCH Mode of the SpectraST executable</description> <macros> <token name="@EXECUTABLE@">SpectraSTSearchAdapter</token> <import>macros.xml</import> + <import>macros_autotest.xml</import> + <import>macros_test.xml</import> </macros> - <expand macro="references"/> + <expand macro="requirements"/> <expand macro="stdio"/> - <expand macro="requirements"/> - <command detect_errors="aggressive"><![CDATA[SpectraSTSearchAdapter + <command detect_errors="exit_code"><![CDATA[@QUOTE_FOO@ +@EXT_FOO@ +#import re +## Preprocessing +mkdir spectra_files && +${ ' '.join(["ln -s '%s' 'spectra_files/%s.%s' &&" % (_, re.sub('[^\w\-_]', '_', _.element_identifier), $gxy2omsext(_.ext)) for _ in $spectra_files if _]) } +mkdir output_files && +mkdir library_file && +ln -s '$library_file' 'library_file/${re.sub("[^\w\-_]", "_", $library_file.element_identifier)}.$gxy2omsext($library_file.ext)' && +#if $sequence_database_file: + mkdir sequence_database_file && + ln -s '$sequence_database_file' 'sequence_database_file/${re.sub("[^\w\-_]", "_", $sequence_database_file.element_identifier)}.$gxy2omsext($sequence_database_file.ext)' && +#end if +#if $search_file: + mkdir search_file && + ln -s '$search_file' 'search_file/${re.sub("[^\w\-_]", "_", $search_file.element_identifier)}.$gxy2omsext($search_file.ext)' && +#end if +#if $adv_opts_cond.adv_opts_selector=='advanced': + #if $adv_opts_cond.user_mod_file: + mkdir adv_opts_cond.user_mod_file && + ln -s '$adv_opts_cond.user_mod_file' 'adv_opts_cond.user_mod_file/${re.sub("[^\w\-_]", "_", $adv_opts_cond.user_mod_file.element_identifier)}.$gxy2omsext($adv_opts_cond.user_mod_file.ext)' && + #end if +#end if + +## 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 -spectra_files - #for token in $param_spectra_files: - $token - #end for - -#if $rep_param_output_files: +${' '.join(["'spectra_files/%s.%s'"%(re.sub('[^\w\-_]', '_', _.element_identifier), $gxy2omsext(_.ext)) for _ in $spectra_files if _])} -output_files - #for token in $rep_param_output_files: - #if " " in str(token): - "$token.param_output_files" - #else - $token.param_output_files - #end if - #end for +${' '.join(["'output_files/%s.%s'"%(re.sub('[^\w\-_]', '_', _.element_identifier), $output_files_type) for _ in $spectra_files if _])} +-library_file +'library_file/${re.sub("[^\w\-_]", "_", $library_file.element_identifier)}.$gxy2omsext($library_file.ext)' +#if $sequence_database_file: + -sequence_database_file + 'sequence_database_file/${re.sub("[^\w\-_]", "_", $sequence_database_file.element_identifier)}.$gxy2omsext($sequence_database_file.ext)' #end if -#if $param_library_file: - -library_file $param_library_file -#end if -#if $param_sequence_database_file: - -sequence_database_file $param_sequence_database_file +#if $search_file: + -search_file + 'search_file/${re.sub("[^\w\-_]", "_", $search_file.element_identifier)}.$gxy2omsext($search_file.ext)' #end if -#if $param_sequence_database_type: - -sequence_database_type - #if " " in str($param_sequence_database_type): - "$param_sequence_database_type" - #else - $param_sequence_database_type +#if $adv_opts_cond.adv_opts_selector=='advanced': + #if $adv_opts_cond.user_mod_file: + -user_mod_file + 'adv_opts_cond.user_mod_file/${re.sub("[^\w\-_]", "_", $adv_opts_cond.user_mod_file.element_identifier)}.$gxy2omsext($adv_opts_cond.user_mod_file.ext)' #end if #end if -#if $param_search_file: - -search_file $param_search_file -#end if -#if $param_params_file: - -params_file $param_params_file -#end if -#if $param_precursor_mz_tolerance: - -precursor_mz_tolerance $param_precursor_mz_tolerance -#end if -#if $adv_opts.adv_opts_selector=='advanced': - #if $adv_opts.param_use_isotopically_averaged_mass: - -use_isotopically_averaged_mass -#end if - #if $adv_opts.param_use_all_charge_states: - -use_all_charge_states -#end if - #if $adv_opts.param_user_mod_file: - -user_mod_file $adv_opts.param_user_mod_file -#end if - #if $adv_opts.param_force: - -force -#end if -#end if -]]></command> + +## Postprocessing +${' '.join(["&& mv -n 'output_files/%(id)s.%(omsext)s' 'output_files/%(id)s.%(gext)s'"%{"id": re.sub('[^\w\-_]', '_', _.element_identifier), "omsext":$output_files_type, "gext": $oms2gxyext(str($output_files_type))} for _ in $spectra_files if _])} +#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[{"executable": "spectrast", "log": "log.txt", "threads": "\${GALAXY_SLOTS:-1}", "no_progress": true}]]></configfile> + </configfiles> <inputs> - <param name="param_spectra_files" type="data" format="mzml,mzxml,mzData,dta,msp" multiple="true" optional="False" size="30" label="File names(s) of spectra to be searched" help="(-spectra_files) "> - <sanitizer> - <valid initial="string.printable"> - <remove value="'"/> - <remove value="""/> - </valid> - </sanitizer> + <param name="spectra_files" argument="-spectra_files" type="data" format="dta,msp,mzdata,mzml,mzxml" multiple="true" optional="false" label="File names(s) of spectra to be searched" help=" select dta,msp,mzdata,mzml,mzxml data sets(s)"/> + <param name="output_files_type" type="select" optional="false" label="File type of output output_files (Output files. Make sure to specify one output file for each input file)"> + <option value="txt">txt</option> + <option value="tsv">tabular (tsv)</option> + <option value="pep.xml">pepxml (pep.xml)</option> + <option value="xml">xml</option> + <option value="pepXML">pepxml</option> + <option value="html">html</option> </param> - <param name="param_library_file" type="data" format="splib" optional="False" label="Specify library file" help="(-library_file) "/> - <param name="param_sequence_database_file" type="data" format="fasta" optional="True" label="The sequence database" help="(-sequence_database_file) "/> - <param name="param_sequence_database_type" display="radio" type="select" optional="False" value="AA" label="Specify type of sequence database" help="(-sequence_database_type) "> + <param name="library_file" argument="-library_file" type="data" format="splib" optional="false" label="Specify library file" help=" select splib data sets(s)"/> + <param name="sequence_database_file" argument="-sequence_database_file" type="data" format="fasta" optional="true" label="The sequence database" help=" select fasta data sets(s)"/> + <param name="sequence_database_type" argument="-sequence_database_type" display="radio" type="select" optional="false" label="Specify type of sequence database" help=""> <option value="DNA">DNA</option> <option value="AA" selected="true">AA</option> + <expand macro="list_string_san"/> </param> - <param name="param_search_file" type="data" format="txt,dat" optional="True" label="Only search a subset of the query spectra in the search file" help="(-search_file) "/> - <param name="param_params_file" type="data" format="params" optional="True" label="Read search options from file" help="(-params_file) All options set in the file will be overridden by command-line options, if specified"/> - <param name="param_precursor_mz_tolerance" type="float" min="0.0" optional="True" value="3.0" label="m/z (in Th) tolerance within which candidate entries are compared to the query" help="(-precursor_mz_tolerance) Monoisotopic mass is assumed"/> - <expand macro="advanced_options"> - <param name="param_use_isotopically_averaged_mass" display="radio" type="boolean" truevalue="-use_isotopically_averaged_mass" falsevalue="" checked="false" optional="True" label="Use isotopically averaged mass instead of monoisotopic mass" help="(-use_isotopically_averaged_mass) "/> - <param name="param_use_all_charge_states" display="radio" type="boolean" truevalue="-use_all_charge_states" falsevalue="" checked="false" optional="True" label="Search library spectra of all charge states, i.e., ignore specified charge state (if any) of the query spectrum" help="(-use_all_charge_states) "/> - <param name="param_user_mod_file" type="data" format="txt" label="Specify name of user-defined modifications file" help="(-user_mod_file) Default is "spectrast.usermods""/> - <param name="param_force" display="radio" type="boolean" truevalue="-force" falsevalue="" checked="false" optional="True" label="Overwrite tool specific checks" help="(-force) "/> + <param name="search_file" argument="-search_file" type="data" format="txt" optional="true" label="Only search a subset of the query spectra in the search file" help=" select txt data sets(s)"/> + <param name="precursor_mz_tolerance" argument="-precursor_mz_tolerance" type="float" optional="true" min="0.0" value="3.0" label="m/z (in Th) tolerance within which candidate entries are compared to the query" help="Monoisotopic mass is assumed"/> + <expand macro="adv_opts_macro"> + <param name="use_isotopically_averaged_mass" argument="-use_isotopically_averaged_mass" type="boolean" truevalue="true" falsevalue="false" checked="false" label="Use isotopically averaged mass instead of monoisotopic mass" help=""/> + <param name="use_all_charge_states" argument="-use_all_charge_states" type="boolean" truevalue="true" falsevalue="false" checked="false" label="Search library spectra of all charge states" help="i.e., ignore specified charge state (if any) of the query spectrum"/> + <param name="user_mod_file" argument="-user_mod_file" type="data" format="txt" optional="true" label="Specify name of user-defined modifications file" help="Default is "spectrast.usermods" select txt data sets(s)"/> + <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_output_files" format="txt"/> + <collection type="list" name="output_files" label="${tool.name} on ${on_string}: output_files"> + <discover_datasets directory="output_files" pattern="__name_and_ext__"/> + </collection> + <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>Interface to the SEARCH Mode of the SpectraST executable + <tests> + <expand macro="autotest_SpectraSTSearchAdapter"/> + <expand macro="manutest_SpectraSTSearchAdapter"/> + </tests> + <help><![CDATA[Interface to the SEARCH Mode of the SpectraST executable -For more information, visit https://abibuilder.informatik.uni-tuebingen.de/archive/openms/Documentation/release/2.3.0/html/UTILS_SpectraSTSearchAdapter.html</help> +For more information, visit http://www.openms.de/documentation/UTILS_SpectraSTSearchAdapter.html]]></help> + <expand macro="references"/> </tool>