view fasta_cli.xml @ 59:943a34df6047 draft

"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/peptideshaker commit 1cb321cbce2a6528764abc9c9431687f56c57588"
author galaxyp
date Fri, 21 May 2021 19:13:14 +0000
parents 07ff622ec007
children 3ec27b4cee7c
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>