finding the number of occurences
2 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
I have values as
gene =
{6x5 cell}
{6x5 cell}
{5x4 cell}
{4x5 cell}
{3x5 cell}
{2x4 cell}
It consists of values as
gene{1,1}
'Genes' 'T0&T2' 'T2&T4' 'T4&T6' 'perc'
'YAR029W' 'd' 'd' 'd' 60
'YAR062W' 'du' 'ud' 'du' 60
'YBL095W' 'du' 'ud' 'du' 60
'YBR074W' 'du' 'ud' 'du' 60
'YBR138C' 'du' 'ud' 'du' 60
'YBR285W' 'du' 'ud' 'du' 60
I need as
'Genes' 'T0&T2' '' 'perc'
'YAR029W' 'd' '' 60
'YAR062W' 'du' 3 60
'YBL095W' 'du' 3 60
'YBR074W' 'du' 3 60
'YBR138C' 'du' 3 60
'YBR285W' 'du' 3 60
3 is the number of occurences it varies for other genes,please help
1 Commento
Azzi Abdelmalek
il 3 Set 2012
Modificato: Azzi Abdelmalek
il 3 Set 2012
can you explain how occurrence is equal to 3 in this case. do you mean it's the columns number?
Risposta accettata
Andrei Bobrov
il 3 Set 2012
r = cell(size(gene))
for jj = 1:numel(r)
r{jj}(:,[1:2,4]) = gene{jj}(:,[1:2,end]);
r{jj}(:,3) = [repmat({''},2,1);repmat({3},size(r{jj},1)-2,1)];
end
0 Commenti
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Genomics and Next Generation Sequencing in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!