diff cd_hit.xml @ 1:7807800a3d03 draft default tip

"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/cdhit commit 86f060dc1ab97b56dc8502ad30d1b01343554329"
author iuc
date Fri, 05 Nov 2021 08:23:26 +0000
parents e0da3400ac2f
children
line wrap: on
line diff
--- a/cd_hit.xml	Mon Oct 15 10:54:50 2018 -0400
+++ b/cd_hit.xml	Fri Nov 05 08:23:26 2021 +0000
@@ -1,8 +1,10 @@
-<tool id="cd_hit" name="cd-hit" version="4.6.8.1">
+<tool id="cd_hit" name="cd-hit" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="20.01">
     <description>Cluster or compare biological sequence datasets</description>
-    <requirements>
-        <requirement type="package" version="4.6.8">cd-hit</requirement>
-    </requirements>
+    <macros>
+        <import>macros.xml</import>
+    </macros>
+    <expand macro="requirements" />
+    <expand macro="xrefs"/>
     <version_command><![CDATA[
 cd-hit | grep "CD-HIT version" | cut -d" " -f 4
     ]]></version_command>
@@ -49,6 +51,8 @@
 -U $advanced.max_unmatched_len
 $advanced.accurate
 $advanced.inram
+$advanced.sort_cluster
+$advanced.sort_fasta
 #if $print_alnovl.print_alnovl_select == "yes":
     -p 1
     -d $print_alnovl.desclen
@@ -137,6 +141,8 @@
             <param name="max_unmatched_len" argument="-U" type="integer" min="0" value="99999999" label="Maximum unmatched length" help="If set to 10, the unmatched region (excluding leading and tailing gaps) must not be more than 10 bases"/>
             <param name="inram" argument="-B" type="boolean" truevalue="-B 0" falsevalue="-B 1" checked="true" label="Sequences are stored in RAM" help="If false: sequence are stored on hard drive - use for huge data sets"/>
             <param name="accurate" argument="-g" type="boolean" truevalue="-g 1" falsevalue="-g 0" checked="false" label="Accurate but slow mode" help="By cd-hit's default algorithm, a sequence is clustered to the first cluster that meet the threshold (fast cluster). If set to true, the program will cluster it into the most similar cluster that meet the threshold (accurate but slow mode)"/>
+            <param name="sort_cluster" argument="-sc" type="boolean" truevalue="-sc 1" falsevalue="-sc 0" label="Sort clusters by size" help="When disabled, clusters are sorted by decreasing length; if enabled, clusters are sorted by decreasing size" />
+            <param name="sort_fasta" argument="-sf" type="boolean" truevalue="-sf 1" falsevalue="-sf 0" label="Sort FASTA/FASTQ by cluster size" help="When enabled, output sequences are sorted by decreasing cluster size" />
         </section>
 
         <conditional name="print_alnovl">
@@ -226,6 +232,42 @@
             <output name="clusters_out" file="est-2d.txt.clstr"/>
             <output name="fasta_out" file="est-2d.txt"/>
         </test>
+        <!-- Test sort cluster parameter -->
+        <test>
+            <param name="fasta_in" value="cd_hit_est_in.fa" />
+            <conditional name="twod">
+                <param name="twod_select" value="" />
+            </conditional>
+            <conditional name="est">
+                <param name="est_select" value="-est" />
+                <param name="wordsize" value="8"/>
+                <param name="strand" value="false"/>
+            </conditional>
+            <param name="similarity" value="0.9"/>
+            <section name="advanced">
+                <param name="sort_cluster" value="true"/>
+            </section>
+            <output name="clusters_out" file="est_clusters_sorted.txt"/>
+            <output name="fasta_out" file="est_fasta_output.fasta"/>
+        </test>
+        <!-- Test sort fasta parameter -->
+        <test>
+            <param name="fasta_in" value="cd_hit_est_in.fa" />
+            <conditional name="twod">
+                <param name="twod_select" value="" />
+            </conditional>
+            <conditional name="est">
+                <param name="est_select" value="-est" />
+                <param name="wordsize" value="8"/>
+                <param name="strand" value="false"/>
+            </conditional>
+            <param name="similarity" value="0.9"/>
+            <section name="advanced">
+                <param name="sort_fasta" value="true"/>
+            </section>
+            <output name="clusters_out" file="est_clusters_output.txt"/>
+            <output name="fasta_out" file="est_fasta_sorted.fasta"/>
+        </test>
     </tests>
     <help><![CDATA[
 **What it does**
@@ -276,8 +318,5 @@
 
 2. The second output is a text file that lists similar sequences between db1 & db2
     ]]></help>
-    <citations>
-        <citation type="doi">10.1093/bioinformatics/btl158</citation>
-        <citation type="doi">10.1093/bioinformatics/bts565</citation>
-    </citations>
+    <expand macro="citations" />
 </tool>