フィルターのクリア

takes a DNA strand s as input and returns the codon usage as a vector and structure

1 回表示 (過去 30 日間)
KayLynn
KayLynn 2013 年 11 月 13 日
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 件)

カテゴリ

Help Center および File ExchangeGenomics and Next Generation Sequencing についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by