필터 지우기
필터 지우기

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개)

카테고리

Help CenterFile Exchange에서 Matrices and Arrays에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by