Finding an Open Reading Frame (ORF) in a DNA Sequence

Overview & Concepts

Students create Java classes to parse a DNA sequence to find an Open Reading Frame.

Grade Level: 

Concepts Covered: 

Java concepts covered: ArrayLists, classes, static methods, object methods, passing parameters, returning values from methods.

Prior Knowledge Required: 

Open Reading Frame (ORF), In-frame sequence, DNA, Nucleotides, Codons, Java String methods

Activity Notes

Days to Teach: 

2 Days


  • Java
  • Java IDE
  • DNA sequence to be used
  • Rules for Open Reading Frames

Teaching Tips / Activity Overview: 

  1. Depending on your students backgrounds, assign reading so that they will understand about the transcription of an Open Reading Frame from a DNA sequence to messenger RNA followed by translation to a protein. Explain start and stop codons and the rules that determine what section of a DNA sequence constitute an Open Reading Frame.
  2. Have students manually identify an ORF in a DNA sequence.  Use DNA Sequence #1.
  3. Have students code a program to identify an Open Reading Frame in a sequence of DNA.  Use String DNA sequence #2.
  4. Require students to use ArrayLists and objects to accomplish this task. Have them develop the program in steps:

a) Parse the string to find stop and start codons.

b) Create an object to record the position of the start and stop codon and whether the codon is a start or stop codon.

c) Create an ArrayList of these objects. Each element will represent a start or stop codon.

d) Identify sequence(s) which start with a start codon, end with a stop codon, contain at least 300 nucleotides, and are in frame.

e) Store all sequences that meet this criteria in an ArrayList whose elements consist of objects made up of each sequence, the position of its start codon, and the position of its stop codon.

f) Create the appropriate to String methods to print the original sequence and each ORF located in it. Report sequences in line widths of 80.

5.  See DNA Sequence #3 in the DNA Sequences file for an example of the expected output.



Programs will be graded with respect to the correct output, the correct use of ArrayLists and objects to solve the problem, and the algorithm used to determine ORFs.


  • Additional sequences can be obtained online and analyzed with the program.
  • ORFs can be translated into messenger RNA.
  • Messenger RNA can be translated into proteins.


Kjell, Bradley, “Part 6: Object Oriented Programming”, “Chapter 54: ArrayLists and Iterators”, Introduction to Computer Science Using Java,


This lesson and teacher notes were produced by Cynthia Lang, adapted from University of Wisconsin BioWeb: and Bioinformatics Exercises, developed by Paul Craig, Department of Chemistry, Rochester Institute of Technology:

Academic Standards
Categories & Tags

wholesale jordans shoes

wholesale nike shoes