def aa_to_index(aa): """ :param aa: Three character amino acid name. :returns: Integer index as per BioPython, unknown/non-standard amino acids return 20. """ if Polypeptide.is_aa(aa, standard=True): return Polypeptide.three_to_index(aa) else: return 20
def aa_to_index(aa): if Polypeptide.is_aa(aa, standard=True): return Polypeptide.three_to_index(aa) else: return 20