def METHOD_NAME(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}",
    )