예제 #1
0
    def test_sampe(self):
        """Test for generating samfile by paired end sequencing"""
        ##Generate sai files from paired end data
        self.do_aln(self.infile1, self.saifile1)
        self.do_aln(self.infile2, self.saifile2)

        cmdline = BwaSampeCommandline()
        cmdline.set_parameter("reference", self.reference_file)
        cmdline.set_parameter("sai_file1", self.saifile1)
        cmdline.set_parameter("sai_file2", self.saifile2)
        cmdline.set_parameter("read_file1", self.infile1)
        cmdline.set_parameter("read_file2", self.infile2)
        stdout, stderr = cmdline(stdout=self.samfile)

        with open(self.samfile, "r") as handle:
            headline = handle.readline()
        self.assertTrue(headline.startswith("@SQ"),
                        "Error generating sam files:\n%s\nOutput starts:%s" \
                        % (cmdline, headline))
예제 #2
0
        def test_sampe(self):
            """Test for generating samfile by paired end sequencing."""
            self.create_fasta_index()

            # Generate sai files from paired end data
            self.do_aln(self.infile1, self.saifile1)
            self.do_aln(self.infile2, self.saifile2)

            cmdline = BwaSampeCommandline(bwa_exe)
            cmdline.set_parameter("reference", self.reference_file)
            cmdline.set_parameter("sai_file1", self.saifile1)
            cmdline.set_parameter("sai_file2", self.saifile2)
            cmdline.set_parameter("read_file1", self.infile1)
            cmdline.set_parameter("read_file2", self.infile2)
            stdout, stderr = cmdline(stdout=self.samfile)

            with open(self.samfile) as handle:
                headline = handle.readline()
            self.assertTrue(
                headline.startswith("@SQ"),
                f"Error generating sam files:\n{cmdline}\nOutput starts:{headline}",
            )
예제 #3
0
    def test_sampe(self):
        """Test for generating samfile by paired end sequencing"""
        ##Generate sai files from paired end data
        self.do_aln(self.infile1, self.saifile1)
        self.do_aln(self.infile2, self.saifile2)

        cmdline = BwaSampeCommandline()
        cmdline.set_parameter("reference", self.reference_file)
        cmdline.set_parameter("sai_file1", self.saifile1)
        cmdline.set_parameter("sai_file2", self.saifile2)
        cmdline.set_parameter("read_file1", self.infile1)
        cmdline.set_parameter("read_file2", self.infile2)
        stdout, stderr = cmdline(stdout=self.samfile)

        with open(self.samfile, "r") as handle:
            headline = handle.readline()
        self.assertTrue(headline.startswith("@SQ"),
                        "Error generating sam files:\n%s\nOutput starts:%s" \
                        % (cmdline, headline))