Beispiel #1
0
    def test_bam_has_index(self):
        """Check if BAM file has an index."""
        # RPF file has an index
        has_index = ribocore.bam_has_index(CFG.RIBO_FILE)
        self.assertTrue(has_index)

        # RNA file doesn't have an index
        has_index = ribocore.bam_has_index(CFG.RNA_FILE)
        self.assertFalse(has_index)
Beispiel #2
0
    def test_bam_has_index(self):
        """Check if BAM file has an index."""
        # RPF file has an index
        has_index = ribocore.bam_has_index(CFG.RIBO_FILE)
        self.assertTrue(has_index)

        # RNA file doesn't have an index
        has_index = ribocore.bam_has_index(CFG.RNA_FILE)
        self.assertFalse(has_index)
Beispiel #3
0
    def test_create_bam_index(self):
        """Index a BAM file."""
        ribocore.create_bam_index(CFG.RNA_FILE)

        # check if index exists
        has_index = ribocore.bam_has_index(CFG.RNA_FILE)
        self.assertTrue(has_index)

        # remove index
        os.remove('{}.bai'.format(CFG.RNA_FILE))
Beispiel #4
0
    def test_create_bam_index(self):
        """Index a BAM file."""
        ribocore.create_bam_index(CFG.RNA_FILE)

        # check if index exists
        has_index = ribocore.bam_has_index(CFG.RNA_FILE)
        self.assertTrue(has_index)

        # remove index
        os.remove('{}.bai'.format(CFG.RNA_FILE))