For example, if your program processes this strand:
CGATGCATCCCTTTAATTAAit should return
HPFNwhich represents the protein sequence Histidine, Proline, Phenylalanine, Asparagine.
DnaToProtein
with a method named
convert
that converts a String representing a Strand of DNA to
a String representing the first-found protein as describe above. In
brief, find the first codon, find a stop codon after this, and convert
the codons between these. If no start or stop codons are found return an
empty string: "".
In implementing DnaToProtein
you must write and use another
class named CodonToProtein
which is started here. You'll
need to complete the method getCodonLabel
shown in the code. The
comments are intended to be enough of a specification, if you have
questions, use the class bulletin board.
To find the start and stop codons you must use one of two String methods
indexOf
that search for one String in another. The
specification for these can be found in in the online
javadoc for java.lang.String which is part of Javadoc for all
Java classes. You'll need the two-parameter indexOf
method
to find a stop codon that occurs after the start codon.
DnaToProteinTester
has
been started for you. You
should fill in the main
method with as many test cases as
you think are needed to test your code (and to test anyone else's code).
When testing the code you write to convert DNA to a protein, you can use
the testing class as well as the class that actually does the
conversion. Ultimately you'll want to run just the testing class since
it will thoroughly test your code every time it's run.
You can paste either into the NCBI ORF Finder although this probably won't help you determine exactly what was being done in the lab whose notebook has been lost.
Interpret the results of the ORF finder and make a best-guess as to what the research being done by the lab whose notebook is lost. Justify your answer appropriately --- your grade will be based on the quality of your justification (not the correctness of your result which can be argued).