Java Programming

 

      

 

DNA Gene Finder

 

Background Information:
DNA is composed of four bases given the symbols A, T, G, and C.
Here is a sample sequence of DNA
String dna = "cccatggggtttaaataataataggagagagagagagagttt";
Your goal is to find out if a gene is found in this section of DNA.
In this example a gene is composed of all of the bases between a start tag and an end tag.

In this DNA sequence the start tag is "atg" and a stop tag is "tag". Here is your task, broken down into steps:
1. Find the location of "atg" in string dna, our sample DNA.
2. Find the location of "tag" in string dna
3. Return all bases that are part of that gene or return "No gene found" if there is no match.
4. Return the length of the gene if one is found.

Your ouput should look like this:
This program searches pieces of dna to find genes.
The following DNA snippet was used: cccatggggtttaaataataataggagagagagagagagttt
The start tag was found at
The stop tag was found at
The code for the gene found is
The length of the gene is