diff --git a/integration-test/bam-readcount_test.py b/integration-test/bam-readcount_test.py index 230a1aa..8912a73 100755 --- a/integration-test/bam-readcount_test.py +++ b/integration-test/bam-readcount_test.py @@ -70,20 +70,21 @@ def test_bamreadcount_normal_as_list(self): self.assertEqual(0, rv) self.assertFilesEqual(expected_file, output_file) - def test_bamreadcount_perlib(self): - """test per lib output is as expected""" - expected_file = "expected_per_lib" - bam_file = "test.bam" + def test_bamreadcount_when_lib_absent(self): + """test that we can run if there was no LB in the header""" + expected_file = "expected_all_lib" + bam_file = "test_bad_rg.bam" ref_fasta = "ref.fa" - site_list = "site_list" + regions = "21:10402985-10402985 21:10405200-10405200" output_file = self.tempFile("output") - cmdline = " ".join([self.exe_path, '-p', '-f', ref_fasta, '-l', site_list, bam_file, '>', output_file]) + cmdline = " ".join([self.exe_path, '-f', ref_fasta, bam_file, regions, '>', output_file]) print "Executing", cmdline print "CWD", os.getcwd() rv = subprocess.call(cmdline, shell=True) print "Return value:", rv self.assertEqual(0, rv) - self.assertFilesEqual(expected_file, output_file) + self.assertFilesEqual(expected_file, output_file) + def test_bamreadcount_indel_centric_normal(self): """test all lib output, but with insertion centric counting""" expected_file = "expected_insertion_centric_all_lib" diff --git a/test-data/test_bad_rg.bam b/test-data/test_bad_rg.bam new file mode 100644 index 0000000..3761607 Binary files /dev/null and b/test-data/test_bad_rg.bam differ diff --git a/test-data/test_bad_rg.bam.bai b/test-data/test_bad_rg.bam.bai new file mode 100644 index 0000000..807ab1a Binary files /dev/null and b/test-data/test_bad_rg.bam.bai differ