def test_blast_identity(self): x = [blast_identity(699, 5, 35, 13), blast_identity(337, 2, 4, 12)] _compare_identity(x, self.BLAST_IDENTITY) nM = np.array([699, 337]) nMM = np.array([5, 2]) nIns = np.array([35, 4]) nDel = np.array([13, 12]) ids = blast_identity(nM, nMM, nIns, nDel) np.testing.assert_almost_equal(ids, self.BLAST_IDENTITY, decimal=4)
def bam_blast_identity(): x = self.transcript() nM = x.count("M") nMM = x.count("R") nIns = x.count("I") nDel = x.count("D") return statistics.blast_identity(nM, nMM, nIns, nDel)
def pbi_blast_identity(): return statistics.blast_identity(self.nM, self.nMM, self.nIns, self.nDel)
def blast_identity(self): assert (self.pbiFlags & PBI_FLAGS_MAPPED) return blast_identity(self.nM, self.nMM, self.nIns, self.nDel)