def test_view(self): """Test for samtools view.""" cmdline = SamtoolsViewCommandline(samtools_exe) cmdline.set_parameter("input_file", self.bamfile1) stdout_bam, stderr_bam = cmdline() self.assertTrue( stderr_bam.startswith(""), "SAM file viewing failed: \n%s\nStdout:%s" % (cmdline, stdout_bam)) cmdline.set_parameter("input_file", self.samfile1) cmdline.set_parameter("S", True) stdout_sam, stderr_sam = cmdline() self.assertTrue( stdout_sam.startswith("HWI-1KL120:88:D0LRBACXX:1:1101:1780:2146"), "SAM file viewing failed:\n%s\nStderr:%s" % (cmdline, stderr_sam))
def test_view(self): """Test for samtools view""" cmdline = SamtoolsViewCommandline(samtools_exe) cmdline.set_parameter("input_file", self.bamfile1) stdout_bam, stderr_bam = cmdline() self.assertTrue(stderr_bam.startswith(""), "SAM file viewing failed: \n%s\nStdout:%s" % (cmdline, stdout_bam)) cmdline.set_parameter("input_file", self.samfile1) cmdline.set_parameter("S", True) stdout_sam, stderr_sam = cmdline() self.assertTrue( stderr_sam.startswith("[samopen] SAM header is present:"), "SAM file viewing failed:\n%s\nStderr:%s" % (cmdline, stderr_sam), )
def test_view(self): """Test for samtools view""" cmdline = SamtoolsViewCommandline(samtools_exe) cmdline.set_parameter("input_file", self.bamfile1) stdout_bam, stderr_bam = cmdline() self.assertTrue( stderr_bam.startswith(""), "SAM file viewing failed: \n%s\nStdout:%s" % (cmdline, stdout_bam)) cmdline.set_parameter("input_file", self.samfile1) cmdline.set_parameter("S", True) stdout_sam, stderr_sam = cmdline() self.assertTrue( stderr_sam.startswith("[samopen] SAM header is present:"), "SAM file viewing failed:\n%s\nStderr:%s" % (cmdline, stderr_sam))
def test_view(self): """Test for samtools view.""" cmdline = SamtoolsViewCommandline(samtools_exe) cmdline.set_parameter("input_file", self.bamfile1) stdout_bam, stderr_bam = cmdline() self.assertTrue(stderr_bam.startswith(""), "SAM file viewing failed: \n%s\nStdout:%s" % (cmdline, stdout_bam)) cmdline.set_parameter("input_file", self.samfile1) cmdline.set_parameter("S", True) stdout_sam, stderr_sam = cmdline() self.assertTrue( stdout_sam.startswith("HWI-1KL120:88:D0LRBACXX:1:1101:1780:2146"), "SAM file viewing failed:\n%s\nStderr:%s" % (cmdline, stderr_sam))