#NEWLINE# def _set_amino_acids( self , amino_acids ) : #NEWLINE# #INDENT# amino_acids = Protein ( amino_acids ) #NEWLINE# if ( len ( amino_acids ) != self . _num_codons ) : #NEWLINE# #INDENT# raise ValueError ( ( '`amino_acids` must be length %d, not %d' % ( self . _num_codons , len ( amino_acids ) ) ) ) #NEWLINE# #UNINDENT# indices = ( amino_acids . values == b'M' ) . nonzero ( ) [ 0 ] #NEWLINE# if ( indices . size < 1 ) : #NEWLINE# #INDENT# raise ValueError ( '`amino_acids` must contain at least one M (methionine) character' ) #NEWLINE# #UNINDENT# self . _amino_acids = amino_acids #NEWLINE# self . _m_character_codon = self . _index_to_codon ( amino_acids [ 0 ] )