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 1-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 protein-coding 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 directory/folder.
Next load the file into MATLAB using the load function as shown below.
file = load('chr1_sect.mat')
You can find the size of the DNA array by using the script line:
numBases = length(file.dna)
Part (b)
Iterate through the codons (the three-base segments shown above) in your DNA vector until you identify the location
of the start codon: ATG (or [143] 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 protein-coding 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(1:3) and dna(4:6) are valid groupings; while
dna(2:4), 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 Protein-Coding Segments: 1300
Average Length: 99.11
Maximum Length: 1200
Minimum Length: 9
You are welcome to use built-in 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 chr1 sect.mat darr.
Problem. Solve using matlab please. how DNA is a

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!