def get_three_frame_orfs(sequence, starts=None, stops=None):
if not starts:<EOL><INDENT>starts = ['<STR_LIT>']<EOL><DEDENT>if not stops:<EOL><INDENT>stops = ['<STR_LIT>', '<STR_LIT>', '<STR_LIT>']<EOL><DEDENT>orfs = []<EOL>for frame in range(<NUM_LIT:3>):<EOL><INDENT>start_codon = None<EOL>orf = '<STR_LIT>'<EOL>for position in range(frame, len(sequence), <NUM_LIT:3>):<EOL><INDENT>codon = sequence[position:position + <NUM_LIT:3>]<EOL>if codon in starts:<EOL><INDENT>if start_codon is not None:<EOL><INDENT>orf += codon<EOL>continue<EOL><DEDENT>start_codon = position<EOL>orf = codon<EOL><DEDENT>else:<EOL><INDENT>if start_codon is None:<EOL><INDENT>continue<EOL><DEDENT>orf += codon<EOL>if codon in stops:<EOL><INDENT>orfs.append({'<STR_LIT:start>': start_codon + <NUM_LIT:1>, '<STR_LIT>': position + <NUM_LIT:3>, '<STR_LIT>': orf})<EOL>start_codon = None<EOL>orf = '<STR_LIT>'<EOL><DEDENT><DEDENT><DEDENT><DEDENT>return orfs<EOL>
Find ORF's in frames 1, 2 and 3 for the given sequence.

    Positions returned are 1-based (not 0)

    Return format [{'start': start_position, 'stop': stop_position, 'sequence': sequence}, ]

    Keyword arguments:
    sequence -- sequence for the transcript
    starts -- List of codons to be considered as start (Default: ['ATG'])
    stops -- List of codons to be considered as stop (Default: ['TAG', 'TGA', 'TAA'])