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!