#NEWLINE# def _validate_translate_inputs( self , sequence , reading_frame , start , stop ) : #NEWLINE# #INDENT# if ( not isinstance ( sequence , RNA ) ) : #NEWLINE# #INDENT# raise TypeError ( ( 'Sequence to translate must be RNA, not %s' % type ( sequence ) . __name__ ) ) #NEWLINE# #UNINDENT# if ( reading_frame not in self . reading_frames ) : #NEWLINE# #INDENT# raise ValueError ( ( '`reading_frame` must be one of %r, not %r' % ( self . reading_frames , reading_frame ) ) ) #NEWLINE# #UNINDENT# for ( name , value ) in ( ( 'start' , start ) , ( 'stop' , stop ) ) : #NEWLINE# #INDENT# if ( value not in self . _start_stop_options ) : #NEWLINE# #INDENT# raise ValueError ( ( '`%s` must be one of %r, not %r' % ( name , self . _start_stop_options , value ) ) ) #NEWLINE# #UNINDENT# #UNINDENT# if sequence . has_gaps ( ) : #NEWLINE# #INDENT# raise ValueError ( 'scikit-bio does not support translation of gapped sequences.' ) #NEWLINE# #UNINDENT# if sequence . has_degenerates ( ) : #NEWLINE# #INDENT# raise NotImplementedError ( 'scikit-bio does not currently support translation of degenerate sequences.`RNA.expand_degenerates` can be used to obtain all definite versions of a degenerate sequence.' )