Prompt the user to enter three triplets.Loop through the DNA array and record all of the locations of the given triplets (codons)
1 次查看(过去 30 天)
显示 更早的评论
Write a script file called count_script that will do the following:
⦁ Import the text file sequence_long.txt into MATLAB
⦁ Prompt the user to enter three triplets.
⦁ Loop through the DNA array and record all of the locations of the given triplets (codons).
⦁ From Matlab, create a text file called report_count.txt and add to this file:
⦁ The total number of first codons found and first 10 locations (offsets) for the first codon.
⦁ The total number of second codons found and first 10 locations (offsets) for the second codon.
⦁ The total number of third codons found and first 10 locations (offsets) for the third codon.
So basically my question is how do I make a loop so it can look through the text file that contains DNA codons and make it identify the location of the codons the user inputs.
This is how far I got:
clc
longsequence=fopen('sequence_long.txt');
triplets=input('Enter three triplets :','s');
%triplets will be a set of three codons
and this is my other attempt:
filename='sequence_long.txt';
longsequence=importdata('sequence_long.txt');
sequence_long=longsequence.data;
triplets=input('Enter three triplets');
%triplets will be a set of three codons
but I don't know how to start the loop for the array file
0 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Matrices and Arrays 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!