changeset 1:b0ab279b5add default tip

Add test cases
author Jim Johnson <jj@umn.edu>
date Wed, 20 Mar 2013 08:26:48 -0500
parents 751f4938cf0d
children
files pe_sync.xml resync.xml test-data/reads_resync_1.fastqsanger test-data/reads_resync_2.fastqsanger
diffstat 4 files changed, 74 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/pe_sync.xml	Tue Feb 05 15:23:18 2013 -0500
+++ b/pe_sync.xml	Wed Mar 20 08:26:48 2013 -0500
@@ -17,7 +17,26 @@
   </outputs>
   <tests>
     <test>
+      <param name="input1" ftype="fastq" value="reads1.fastqsanger" />
+      <param name="input2" ftype="fastq" value="reads2.fastqsanger" />
+      <param name="quickcheck" value="false"/>
+      <output name="output">
+        <assert_contents>
+            <has_text text="PASSED" />
+        </assert_contents>
+      </output>
     </test>
+    <test>
+      <param name="input1" ftype="fastq" value="reads1.fastqsanger" />
+      <param name="input2" ftype="fastq" value="reads_unsync_2.fastqsanger" />
+      <param name="quickcheck" value="false"/>
+      <output name="output">
+        <assert_contents>
+            <has_text text="FAILED" />
+        </assert_contents>
+      </output>
+    </test>
+
   </tests>
   <help>
 Paired-end read file synchronization checks if left and right reads are in the same order.
--- a/resync.xml	Tue Feb 05 15:23:18 2013 -0500
+++ b/resync.xml	Wed Mar 20 08:26:48 2013 -0500
@@ -16,6 +16,29 @@
   </outputs>
   <tests>
     <test>
+      <param name="input1" ftype="fastq" value="reads1.fastqsanger" />
+      <param name="input2" ftype="fastq" value="reads2.fastqsanger" />
+      <!-- synchronized files should remain unchanged -->
+      <output name="output1" file="reads1.fastqsanger" />
+      <output name="output2" file="reads2.fastqsanger" />
+    </test>
+    <test>
+      <param name="input1" ftype="fastq" value="reads1.fastqsanger" />
+      <param name="input2" ftype="fastq" value="reads_unsync_2.fastqsanger" />
+      <output name="output1">
+        <!-- unsynchronized files should remove unpaired read -->
+        <assert_contents>
+          <has_text text="@HWUSI-EAS1737:7:1:4411:1170#CAGATC/1" />
+          <not_has_text text="@HWUSI-EAS1737:7:1:16187:1196#CAGATC/1" />
+        </assert_contents>
+      </output>
+      <output name="output2">
+        <!-- unsynchronized files should remove unpaired read -->
+        <assert_contents>
+          <has_text text="@HWUSI-EAS1737:7:1:4411:1170#CAGATC/2" />
+          <not_has_text text="@HWUSI-EAS1737:7:1:16187:1196#CAGATC/2" />
+        </assert_contents>
+      </output>
     </test>
   </tests>
   <help>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/reads_resync_1.fastqsanger	Wed Mar 20 08:26:48 2013 -0500
@@ -0,0 +1,16 @@
+@HWUSI-EAS1737:7:1:4411:1170#CAGATC/1
+AGAAGGATATGGTGAAGAAATAGCCTGCACTCAGAATGGCCAGATGTACTTAAACAGGGACATTTGGAAACCTGCC
++
+IIGHIIIGIIIIGIIIIFHGIIIIIIIHIIHIIHIIIIHHIIHIIIGIHIIHIIIIIIIHIHHIIIIIIIIIHIII
+@HWUSI-EAS1737:7:1:19051:1194#CAGATC/1
+AAGTACCTGCTTTCAACGTGTTGAGGGTTGACATAGGTGCTTGAAGAACAGAATGTAACATTTTGTGGTGTAAAAT
++
+IIIIIIIIIIIIIIIIIIIGIIIIIIHIIHIIHIIIIGIIIIHIIIIIIIIIHIIHIIIIHIHIHFIHGGEIHHHI
+@HWUSI-EAS1737:7:1:10050:1205#CAGATC/1
+ATATGCACATTTTTAGAATTCCATTATCTTGAATACAAATAGGGAAATATCTTTTGGAAATTAAAATAATTTCAAA
++
+GHHHHHFHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHGHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH
+@HWUSI-EAS1737:7:1:16633:1206#CAGATC/1
+GGAGGAACAGTAAGCATGTATTTTCTGATGACGTATTTTCTGACAATTTCTATGGAAGAAGCTTCCCCCATGCCCT
++
+HHHHHHHHHHFHHFHHGHGHHHHHHHHHHHHHHHGHHHHHHHGHHGHHHHHHHHHGHHHHHHHHHHHGHHCFEGF>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/reads_resync_2.fastqsanger	Wed Mar 20 08:26:48 2013 -0500
@@ -0,0 +1,16 @@
+@HWUSI-EAS1737:7:1:4411:1170#CAGATC/2
+....AGCAAAATCATTAATCATTAACCCCAAAAGCCACCAAAAAAGCTGCTTAATTATTCTCTTGAGTTGCTGAAT
++
+####)////-@CC@C@@@@@@@@@@CCCCCCC@@;@@@@C@C@@44@@@CC@@C@@@@CCC@@CC@@@@@@C@@@@
+@HWUSI-EAS1737:7:1:19051:1194#CAGATC/2
+.TTTTCTTGCAATAATAGTATGATTTTGAGGTTAAGGGTGCATGCTCTTCTAATGCAAAATATTGTATTTATTTAG
++
+#110071117CCCCCCCC@C@@C@@@C@@C@@@@@<::<<@@@@@@C@CC@C@C@CC@@@<44<<@@@C@C@444@
+@HWUSI-EAS1737:7:1:10050:1205#CAGATC/2
+GATGATAACTAACCTTTTAAACTCATCAACTGGACAGGTTTCATAGCGGCAGACATTAAAGGTACAGGTTCCTGGA
++
+IHIIIIHGIIIIIIIIIIIHIIIIIIHIIIHIIIIHIIIIIIHIIIIIIHDIHHGIIFIHIDBHHDDD@DIFFFEE
+@HWUSI-EAS1737:7:1:16633:1206#CAGATC/2
+GAAACCCTTGGCCAAAAACTACCTCTCTGTTGCAGGCTCCCTGCAGCTCGATCTCAACCGCATGCCCAAGCCAGCC
++
+IIIHIIHGIIHHIIIIGIEIGDIGGBGGGGIIIIIIH>IIIIGEIBBEGFBHHDBEDEFBE<3CEAC>???;-8??