Question: Problem. Solve using matlab please. how DNA is a good example of how a huge amount of information can be stored in a vector. In
Problem. Solve using matlab please. how DNA is a good example of how a huge amount of information can be stored in a vector. In
this problem, you will use iteration and logical expressions to analyze a segment of human DNA stored as a D array.
For the sake of programming convenience, you can find the DNA file here darr. uses numeric values instead of the usual
alphabetic abbreviations A C G and T as shown in the key below.
DNA Letter to
Number Conversion
Your task is to write a script to calculate the lengths of every proteincoding segment in the DNA as shown in the
example below.
Part a
Begin by downloading the DNA segment file darr on Canvas into your current working directoryfolder
Next load the file into MATLAB using the load function as shown below.
file loadchrsectmat'
You can find the size of the DNA array by using the script line:
numBases lengthfiledna
Part b
Iterate through the codons the threebase segments shown above in your DNA vector until you identify the location
of the start codon: ATG or after conversion After finding the start codon, continue iterating until reaching the
first stop codon: either TAA, TAG, or TGA. Record the length of this proteincoding segment in a new array and begin
looking for the next start codon. We will ignore any new start codons that may appear before we first encounter one o
the stop codons.
Note: Remember, it is only meaningful to compare intact codons sets of three starting from the first element in our
vector we will assume this is the only biologically correct reading dna: and dna: are valid groupings; while
dna: which splits up two codons, is not valid.
Part c
After reaching the end of the DNA vector, print the following statistics to the command window in the format shown
below the values shown are for illustration only
Total ProteinCoding Segments:
Average Length:
Maximum Length:
Minimum Length:
You are welcome to use builtin MATLAB functions mean, max, and min if you find them helpful. As with all things
programming, it is much easier to start with a small test case where you know the answer first. Try creating your own
DNA vector with the numbers in the above example and confirm that you recover the correct answer before using the
full sequence stored in chr sectmat darr.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
