def test_interpertBlast(self): tempBlast = Blast("", "") tempBlast.makeDatabase("test_data/reference.fasta") tempBlast.aliasTool("test_data/reference.fasta", "test_data") tempBlast.query = "test_data/contigs_1.fasta" tempBlast.doBlast("test_data") tempBlast.interpertBlast("test_data") self.assertEqual(len(tempBlast.hitSet), 3)
def test_doBlast(self): tempBlast = Blast("", "") tempBlast.makeDatabase("test_data/reference.fasta") tempBlast.aliasTool("test_data/reference.fasta", "test_data") tempBlast.query = "test_data/contigs_1.fasta" tempBlast.doBlast("test_data") try: outputFile = open("test_data/blastResult.csv") testResult = True for line in outputFile: if "gi|49175990|ref|NC_000913.2|" not in line: testResult = False self.assertTrue(testResult) except IOError as error: self.fail(error)