def test_translate_gi_to_tax_id(taxa_db_simple): tup = ['query', 'gi|4|else', 90., 80, 60, 2, 30, 80, 1100, 1150, 1e-7, 64.5] blast1 = metagenomics.BlastRecord(*tup) tup[1] = 5 expected = metagenomics.BlastRecord(*tup) assert metagenomics.translate_gi_to_tax_id(taxa_db_simple, blast1) == expected
def test_translate_gi_to_tax_id(taxa_db_simple): tup = ['query', 'gi|4|else', 90., 80, 60, 2, 30, 80, 1100, 1150, 1e-7, 64.5, []] blast1 = metagenomics.BlastRecord(*tup) tup[1] = 5 expected = metagenomics.BlastRecord(*tup) assert metagenomics.translate_gi_to_tax_id(taxa_db_simple, blast1) == expected