diff cd_hit_est.xml @ 1:34a799d173f7

Add tool_dependencies and functional test
author Jim Johnson <jj@umn.edu>
date Fri, 07 Sep 2012 13:52:03 -0500
parents 23f5701549b1
children cca0838c1597
line wrap: on
line diff
--- a/cd_hit_est.xml	Mon Sep 12 10:43:08 2011 -0400
+++ b/cd_hit_est.xml	Fri Sep 07 13:52:03 2012 -0500
@@ -1,5 +1,8 @@
-<tool id="cd_hit_est" name="CD-HIT-EST" version="1.0">
+<tool id="cd_hit_est" name="CD-HIT-EST" version="1.1">
  <description>Cluster a nucleotide dataset into representative sequences</description>
+ <requirements>
+  <requirement type="package" version="4.6.1">cd-hit</requirement>
+ </requirements>
  <command>
   cd-hit-est -i $fasta_in -o rep_seq -c $similarity -n $wordsize $strand
  </command>
@@ -24,10 +27,23 @@
   <data format="txt" name="clusters_out" label="${tool.name} on ${on_string}: clusters" from_work_dir="rep_seq.clstr"/>
   <data format="fasta" name="fasta_out" label="${tool.name} on ${on_string}: representatives.fasta" from_work_dir="rep_seq"/>
  </outputs>
- <requirements>
-  <requirement type="binary">cd-hit-est</requirement>
- </requirements>
  <tests>
+  <test>
+    <param name="fasta_in" value="cd_hit_est_in.fa" />
+    <param name="similarity" value="0.9"/>
+    <param name="wordsize" value="8"/>
+    <output name="clusters_out">
+        <assert_contents>
+            <has_text text=">Cluster" />
+            <has_text_matching expression=">F12Fcsw_481739" />
+        </assert_contents>
+    </output>
+    <output name="fasta_out">
+        <assert_contents>
+            <has_text_matching expression="^>[MF]\d\dFcsw_\d*" />
+        </assert_contents>
+    </output>
+  </test>
  </tests>
  <help>
 **CD-HIT-EST**