view fasta_cli.xml @ 61:3ec27b4cee7c draft default tip

"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/peptideshaker commit fc2810c412d9954fa584ae74497562b986c52764"
author galaxyp
date Thu, 12 Aug 2021 14:06:52 +0000
parents 943a34df6047
children
line wrap: on
line source

<tool id="fasta_cli"
      name="FastaCLI"
      version="@SEARCHGUI_VERSION@+galaxy@SEARCHGUI_VERSION_SUFFIX@"
      profile="20.01"
>
    <description>
        Appends decoy sequences to FASTA files
    </description>
    <macros>
        <import>macros_basic.xml</import>
    </macros>
    <requirements>
	<requirement type="package" version="@SEARCHGUI_VERSION@">searchgui</requirement>
    </requirements>
    <expand macro="stdio" />
    <command>
<![CDATA[
        #set $output_db_name = $input_database.display_name.replace(".fasta", "") + $database_processing_options.decoy_file_tag.value + ".fasta"

        mkdir output &&
        cwd=`pwd` &&

        echo 'DB: ${input_database.display_name} sequences: ${input_database.metadata.sequences}' &&
        cp '${input_database}' '${input_database.display_name}' &&

        ###########################################
        ####       Creating decoy database     ####
        ###########################################

        echo 'Creating decoy database.' &&
        searchgui -Djava.awt.headless=true eu.isas.searchgui.cmd.FastaCLI
            --exec_dir="./bin/"
            -use_log_folder 0
            -temp_folder `pwd`
            -in '${input_database.display_name}'
            -decoy
            -decoy_flag $database_processing_options.decoy_tag
            -suffix $database_processing_options.decoy_type
            -decoy_suffix $database_processing_options.decoy_file_tag &&
        mv '${output_db_name}' output
]]>
    </command>
    <inputs>
        <param format="fasta" name="input_database" type="data" label="Protein Database"
            help="Select FASTA database from history"/>

        <section name="database_processing_options" expanded="true" title="Database Processing Options">

            <param name="decoy_tag" type="text" value="_REVERSED" label="The decoy flag">
            </param>
            <param name="decoy_type" type="select" label="Location of the decoy flag: prefix or suffix">
                <option value="1">Prefix</option>
                <option value="2" selected="True">Suffix</option>
            </param>

            <param name="decoy_file_tag" type="text" value="_concatenated_target_decoy" label="Target decoy suffix">
            </param>

        </section>
    </inputs>
    <outputs>
        <data name="input_database_concatenated_target_decoy" format="fasta" label="${tool.name}: ${input_database.display_name} with decoys on ${on_string}">
            <discover_datasets pattern="(?P&lt;designation&gt;.+)\.fasta" directory="output" visible="true"  format="fasta" assign_primary_output="true" />
        </data>
    </outputs>
    <tests>
        <test>
            <param name="input_database" value="fastacli_searchgui_tinydb1.fasta" ftype="fasta"/>
            <output name="input_database_concatenated_target_decoy" file="fastacli_searchgui_tinydb1_concatenated_target_decoy.fasta" ftype="fasta" compare="sim_size" delta="1000" />
        </test>
    </tests>
    <help>
**What it does**

Appends decoy sequences to FASTA files. Default format is adequated to be used by SearchGUI and PeptideShaker tools, ie:

* Decoy flag: _REVERSED

* Location: suffix

* Target decoy suffix: _concatenated_target_decoy

    </help>
    <expand macro="citations" />
</tool>