Java Program About Genome Analysis Project Given the starter code, and All the files required in the attachment. mainly about the inheitance. Martians have
Java Program About Genome Analysis Project Given the starter code, and All the files required in the attachment. mainly about the inheitance. Martians have come to earth and allowed us to study their genomes. It is discovered that their
DNA, like humans, consists of Adenine (A), Guanine (G), Cytosine (C) and Thymine (T) and can
be coded as sequences of these letters, e.g., GACCCATT
Your boss has provided you with the library class GenomeAnalyzer, which takes care of some
of the bookkeeping of analyzing genome strands. You cannot directly change the
GenomeAnalyzer class, but youll subclass it to add extensions to the code that is there.
GenomeAnalyzer already knows how to read from a file, check if the data in that file is valid (text
consisting only of G, T, A, and C) and it can detect some simple patterns in the DNA.
Part 1
Write a subclass of the given GenomeAnalyzer named MartianGenomeAnalyzer, and provide it
with the following methods:
int detectGenius() — a martian is a genius if it has the string, GAGA anywhere in its
genome. This method should call the superclass method findSimpleSequence to do its
job, and should return the index of the first G of the first instance of GAGA in the
genome, or -1 if not found.
int detectRepeater(letter) — a martian who tends to repeat his words can be detected if,
anywhere in his genome, the given letter is repeated five times. This method should call
the superclass method findSimpleSequence to do its job. It should return the index of the
match, or -1 if not found.
int detectGastroDisease() — a martian has gastro disease if it contains a string that
begins with G, followed by one or more Ts, followed by another G. So GTTTG and GTG
fit the pattern, but GTTTC does not. The method should return the index of the match, or
-1 if not found.
A main method that tests these methods with input files with both positive and negative
samples.
Part 2
Your boss wants you to test for various patterns in the DNA, as in the above task, but wants you
to refactor your code so that it is easy to run a series of detection tests (with a loop). You need a
list of detectors, each of a different subclass type, and you need to use polymorphism.
For this task, youll write a new subclass of GenomeAnalyzer, MartianGenomeSeriesAnalyzer,
which codes things in a more flexible manner than in the MartianGenomeAnalyzer (you are
replacing MartianGenomeAnalyzer).
Code an interface PatternDetector and a set of classes that implement that interface.
PatternDetector should provide the following methods:
int detect(GenomeAnalyzer analyzer); — detects if pattern exists in analyzer code
String labelString(); — a string describing the detector (for display)
String additionalInfo() — a string describing additional info about an analysis.
additionalInfo should have a default implementation that returns .
Provide three implementations for PatternDetector, one for each of the methods you wrote in
part 1. So youll have classes GeniusDetector, GastroDiseaseDetector, and RepeaterDetector,
all that implement PatternDetector and its methods.
MartianGenomeSeriesAnalyzer will have the following methods:
constructor
void addDetector(PatternDetector) — adds a detector to the series of tests to be run
void runAll — runs all the tests
Its main method should look something like:
public static void main(String args[]){
MartianGenomeSeriesAnalyzer seriesAnalyzer = new
MartianGenomeSeriesAnalyzer(“test.txt”);
seriesAnalyzer.addDetector(new GeniusDetector());
seriesAnalyzer.addDetector(new GastroDiseaseDetector());
// add more detectors
seriesAnalyzer.runAll();
}
Extra Credit
1. Recode the Detectors using Javas pattern matching facility (or not using it if you did use it in
the original) 5 points
2. Detect multiple matches within the same sequence. Add the method ArrayList
detect() to the PattenDetector, and implement that method for each of PatternDetector
subclasses. The function will return a list of the starting indexes for the matches found, or null.
The new detect methods should call the original one multiple times to do its job
15 points
Reading
The following probably wont help with the coding, but provide short introductions to DNA
sequencing terminology and computer science efforts in this area:
link on some of the CS questions involved (e.g. massive data). easy read
The Computer Science behind DNA Sequencing
Don't use plagiarized sources. Get Your Custom Essay onJava Program About Genome Analysis Project Given the starter code, and All the files required in the attachment. mainly about the inheitance. Martians haveFor $10/Page 0nly
good definitions, e.g., 3 letter combos are the words,
http://www.brooklyn.cuny.edu/bc/ahp/BioInfo/GP/GeneticCode.html
Purchase answer to see full
attachment
We've got everything to become your favourite writing service
Money back guarantee
Your money is safe. Even if we fail to satisfy your expectations, you can always request a refund and get your money back.
Confidentiality
We don’t share your private information with anyone. What happens on our website stays on our website.
Our service is legit
We provide you with a sample paper on the topic you need, and this kind of academic assistance is perfectly legitimate.
Get a plagiarism-free paper
We check every paper with our plagiarism-detection software, so you get a unique paper written for your particular purposes.
We can help with urgent tasks
Need a paper tomorrow? We can write it even while you’re sleeping. Place an order now and get your paper in 8 hours.
Pay a fair price
Our prices depend on urgency. If you want a cheap essay, place your order in advance. Our prices start from $11 per page.