calculate the number of times each codon appears in a .mat file
조회 수: 1 (최근 30일)
이전 댓글 표시
Hello,
I have an assignment that involves a given mat file. each row in the file is composed of a DNA sequence and the task is to find for each sequence the number of times each codon appears in it. I have very basic knowledge in MATLAB . Can someone help me solve it?
Thank you!!!
댓글 수: 0
답변 (1개)
Ive J
2022년 2월 28일
Maybe this example would help:
% create a random DNA seq
dna_codes = ['A', 'T', 'G', 'C'];
dna_str = string(dna_codes(randi(numel(dna_codes),1, 1000)));
count(dna_str, 'ATG') % count how many times ATG codon (M) has been repeated
댓글 수: 2
Ive J
2022년 3월 1일
In that case just use:
% create a random DNA seq
dna_codes = ['A', 'T', 'G', 'C'];
dna_str = string(dna_codes(randi(numel(dna_codes),1, 1000)));
res = codoncount(dna_str)
참고 항목
카테고리
Help Center 및 File Exchange에서 Genomics and Next Generation Sequencing에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!