Repository 'fasta_merge_files_and_filter_unique_sequences'
hg clone https://toolshed.g2.bx.psu.edu/repos/galaxyp/fasta_merge_files_and_filter_unique_sequences

Changeset 4:8462a4e9f86e (2017-07-24)
Previous changeset 3:9ad0d336e5ed (2017-02-03) Next changeset 5:650d553c1fda (2017-07-24)
Commit message:
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/fasta_merge_files_and_filter_unique_sequences commit b4c90f4b5d7e9b233f1150dbc9e5dcbe156809e8
modified:
fasta_merge_files_and_filter_unique_sequences.xml
b
diff -r 9ad0d336e5ed -r 8462a4e9f86e fasta_merge_files_and_filter_unique_sequences.xml
--- a/fasta_merge_files_and_filter_unique_sequences.xml Fri Feb 03 14:27:56 2017 -0500
+++ b/fasta_merge_files_and_filter_unique_sequences.xml Mon Jul 24 17:13:10 2017 -0400
[
@@ -1,4 +1,4 @@
-<tool id="fasta_merge_files_and_filter_unique_sequences" name="FASTA Merge Files and Filter Unique Sequences" version="1.1">
+<tool id="fasta_merge_files_and_filter_unique_sequences" name="FASTA Merge Files and Filter Unique Sequences" version="1.2.0">
     <description>Concatenate FASTA database files together</description>
     <requirements>
         <requirement type="package" version="2.7.12">python</requirement>
@@ -6,12 +6,29 @@
     <command>
         python '$__tool_directory__/fasta_merge_files_and_filter_unique_sequences.py'
         '$output' $uniqueness_criterion '$accession_parser'
+
+        #if $batchmode.processmode == 'merge':
+          #set $inputs = $batchmode.input_fastas
+        #else:
+          #set $inputs = [ $batchmode.input_fastas ]
+        #end if
         #for $input in $inputs:
             '$input'
         #end for
     </command>
     <inputs>
-        <param name="inputs" format="fasta" multiple="True" type="data" label="Input FASTA files"/>
+        <conditional name="batchmode">
+            <param name="processmode" type="select" label="Run in batch mode?" help="The 'merge all' mode produces one output FASTA for all input FASTA files. The individual mode generates one FASTA file for each set of input FASTAs. For example, if the tool is given 2 collections of 10 FASTAs, it will merge the collections pairwise to create an output collection of 10 FASTAs." display="radio">
+                <option value="individual" selected="True">Merge individual FASTAs (output collection if input is collection)</option>
+                <option value="merge">Merge all FASTAs (always output a single FASTA)</option>
+            </param>
+            <when value="individual">
+                <param name="input_fastas" type="data" format="fasta" label="FASTA file" />
+            </when>
+            <when value="merge">
+                <param name="input_fastas" type="data" format="fasta" multiple="True" label="FASTA file" />
+            </when>
+        </conditional>
         <param name="uniqueness_criterion" type="select" label="How are sequences judged to be unique?">
             <option value="sequence" selected="true">Accession and Sequence</option>
             <option value="accession">Accession Only</option>
@@ -35,7 +52,8 @@
     </outputs>
     <tests>
         <test>
-          <param name="inputs" value="1.fa,2.fa" ftype="fasta" />
+          <param name="input_fastas" value="1.fa,2.fa" ftype="fasta" />
+          <param name="processmode" value="merge" />
           <param name="uniqueness_criterion" value="sequence" />
           <param name="accession_parser" value="^&gt;([^ |]+).*$" />
           <output name="output" file="res-sequence.fa" ftype="fasta" />
@@ -47,7 +65,8 @@
           </assert_stdout>
         </test>
         <test>
-          <param name="inputs" value="1.fa,2.fa" ftype="fasta" />
+          <param name="input_fastas" value="1.fa,2.fa" ftype="fasta" />
+          <param name="processmode" value="merge" />
           <param name="uniqueness_criterion" value="accession" />
           <param name="accession_parser" value="^&gt;([^ |]+).*$" />
           <output name="output" file="res-accession.fa" ftype="fasta" />