def test_bases(self): """AminoAcidUsage bases should return most likely base freqs""" a = AminoAcidUsage('GGG') self.assertEqual(a.bases(), {'G':9.0/12,'U':1.0/12,'C':1.0/12,'A':1.0/12}) a = AminoAcidUsage('CAGTWERQWE') exp = a.codons().bases() exp.normalize() self.assertFloatEqual(a.bases(), exp)
def test_bases(self): """AminoAcidUsage bases should return most likely base freqs""" a = AminoAcidUsage('GGG') self.assertEqual(a.bases(), { 'G': 9.0 / 12, 'U': 1.0 / 12, 'C': 1.0 / 12, 'A': 1.0 / 12 }) a = AminoAcidUsage('CAGTWERQWE') exp = a.codons().bases() exp.normalize() self.assertFloatEqual(a.bases(), exp)