def test_generate_taxonomic_agreement_summary_standard(self): """Test computing the taxonomic agreement for seqs in OTUs.""" exp = {'A': [3, ['1', '2', '3'], [100.0, 66.66666666666666, 33.33333333333333], [['A'], ['B', 'Z'], ['C', 'D', 'T']]]} obs = _generate_taxonomic_agreement_summary(self.otu_map1, self.tax_map1, 3) self.assertFloatEqual(obs, exp)
def test_generate_taxonomic_agreement_summary_ref_only(self): """Test computing the taxonomic agreement for OTU with only a ref.""" exp = {'A': [2, [100.0, 100.0, 0.0], [['A'], ['B'], ['C', 'D']]], 'B': [1, [0.0, 0.0, 0.0], [['A'], ['Z'], ['T']]]} obs = _generate_taxonomic_agreement_summary(self.otu_map2, self.tax_map1, 3) self.assertEqual(obs, exp)
def test_generate_taxonomic_agreement_summary_ref_only(self): """Test computing the taxonomic agreement for OTU with only a ref.""" exp = { 'A': [2, ['1', '2'], [100.0, 100.0, 50.0], [['A'], ['B'], ['C', 'D']]], 'B': [1, ['3'], [100.0, 100.0, 100.0], [['A'], ['Z'], ['T']]] } obs = _generate_taxonomic_agreement_summary(self.otu_map2, self.tax_map1, 3) self.assertFloatEqual(obs, exp)
def test_generate_taxonomic_agreement_summary_standard(self): """Test computing the taxonomic agreement for seqs in OTUs.""" exp = { 'A': [ 3, ['1', '2', '3'], [100.0, 66.66666666666666, 33.33333333333333], [['A'], ['B', 'Z'], ['C', 'D', 'T']] ] } obs = _generate_taxonomic_agreement_summary(self.otu_map1, self.tax_map1, 3) self.assertFloatEqual(obs, exp)