def testBestHsp(self): """ The bestHsp function must return the HSP with the best score for all the HSPs for all the alignments matching a title. """ hsp1 = HSP(7) hsp2 = HSP(15) hsp3 = HSP(21) titleAlignments = TitleAlignments('subject title', 55) read = Read('id1', 'AAA') titleAlignment = TitleAlignment(read, [hsp1, hsp2]) titleAlignments.addAlignment(titleAlignment) read = Read('id2', 'AAA') titleAlignment = TitleAlignment(read, [hsp3]) titleAlignments.addAlignment(titleAlignment) self.assertEqual(hsp3, titleAlignments.bestHsp())
def testBestHsp(self): """ The bestHsp function must return the HSP with the best score for the HSPs all the alignments matching a title. """ hsp1 = LSP(7) hsp2 = LSP(15) hsp3 = LSP(21) titleAlignments = TitleAlignments('subject title', 55) read = Read('id1', 'AAA') titleAlignment = TitleAlignment(read, [hsp1, hsp2]) titleAlignments.addAlignment(titleAlignment) read = Read('id2', 'AAA') titleAlignment = TitleAlignment(read, [hsp3]) titleAlignments.addAlignment(titleAlignment) self.assertEqual(hsp1, titleAlignments.bestHsp())
def testBestHsp(self): """ The bestHsp function must return the HSP with the best score for all the HSPs for all the alignments matching a title. """ hsp1 = HSP(7) hsp2 = HSP(15) hsp3 = HSP(21) titleAlignments = TitleAlignments("subject title", 55) read = Read("id1", "AAA") titleAlignment = TitleAlignment(read, [hsp1, hsp2]) titleAlignments.addAlignment(titleAlignment) read = Read("id2", "AAA") titleAlignment = TitleAlignment(read, [hsp3]) titleAlignments.addAlignment(titleAlignment) self.assertEqual(hsp3, titleAlignments.bestHsp())