takes a DNA strand s as input and returns the codon usage as a vector and structure
3 次查看(过去 30 天)
显示 更早的评论
I am trying to do the following:Write a function takinga DNA strand s as input, calls the findorf(s) function to find the ORF, and returns the codon usage of the sequence as both a vector (each element corresponding to the count of a codon, where codons are in alphabetical order) and as a struct with each codon as a field, and its count as the number of occurence of that codon. The returned structure should contain all possible codons, with codons not occurring in the sequence having a count of 0.
I have the following code for the function above: function out=getcodonusage(z)
orf = findorf(z); NUCS='ATCG';
[x, y, z]=meshgrid(1:4,1:4,1:4); I = [ x(:) y(:) z(:)]; CODS=NUCS(I); for i=1:size(CODS,1) out.(CODS(i,:)) = sum(strcmpi(orf,CODS(i,:))); end
When i run this code in the command window, I get an error that says too many output arugments. If someone could pelase help me, I would appreciate it.
0 个评论
回答(0 个)
另请参阅
类别
在 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!