code: public static AminoAcidSequence translate(NucleotideSequence sequence, int frame) {
          return translate(sequence.getRange(frame, frame + (sequence.size() - frame) / 3 * 3));
      }
docs: Translate sequence in one of frames (-1, -2, -3 frames are not implemented, use {@link
  NucleotideSequence#getReverseComplement()}) discarding all incomplete codons on both boundaries.
  
  @param sequence nucleotide sequence to translate
  @param frame    frame (1, 2 or 3)
  @return translated amino acid sequence