diff fasta_cli.xml @ 55:bb0130ff73ce draft

"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/peptideshaker commit f27e376ff604cd8faf57c63f25ddcfd61ca9db6a"
author galaxyp
date Fri, 15 Jan 2021 14:06:27 +0000
parents
children da885ca16cb2
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fasta_cli.xml	Fri Jan 15 14:06:27 2021 +0000
@@ -0,0 +1,75 @@
+<tool id="fasta_cli" name="FastaCLI" version="1.0.1">
+    <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 $temp_stderr = "fasta_cli_stderr"
+        #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/" -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 2>> $temp_stderr &&
+        mv '${output_db_name}' output &&
+        cat $temp_stderr 2>&1;
+]]>
+    </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>