Example #1
0
    def test_calmd(self):
        """Test for samtools calmd"""

        cmdline = SamtoolsCalmdCommandline(samtools_exe)
        cmdline.set_parameter("reference", self.reference)
        cmdline.set_parameter("input_bam", self.bamfile1)
        ## If there is no index file for the reference
        ## samtools calmd creates one at the time of calling

        if os.path.exists(self.referenceindexfile):
            #print("exists")
            stderr_calmd_expected = ""
        else:
            #print("doesnt exist")
            stderr_calmd_expected = "[fai_load] build FASTA index.\n"
        stdout, stderr = cmdline()
        self.assertEqual(stderr, stderr_calmd_expected)
    def test_calmd(self):
        """Test for samtools calmd."""
        self.create_fasta_index()
        cmdline = SamtoolsCalmdCommandline(samtools_exe)
        cmdline.set_parameter("reference", self.reference)
        cmdline.set_parameter("input_bam", self.bamfile1)
        # If there is no index file for the reference
        # samtools calmd creates one at the time of calling

        if os.path.exists(self.referenceindexfile):
            # print("exists")
            stderr_calmd_expected = ""
        else:
            # print("doesnt exist")
            stderr_calmd_expected = "[fai_load] build FASTA index.\n"
        stdout, stderr = cmdline()
        self.assertEqual(stderr, stderr_calmd_expected)