Mercurial > repos > vipints > deseq_hts
comparison deseq-hts_2.0/src/genes_cell2struct.m @ 10:2fe512c7bfdf draft
DESeq2 version 1.0.19 added to the repo
author | vipints <vipin@cbio.mskcc.org> |
---|---|
date | Tue, 08 Oct 2013 08:15:34 -0400 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
9:e27b4f7811c2 | 10:2fe512c7bfdf |
---|---|
1 function genes_cell2struct(anno_fname) | |
2 % GENES_CELL2STRUCT Converts genes stored as a cell to struct. | |
3 % | |
4 % genes_cell2struct(anno_fname) | |
5 % | |
6 % -- input -- | |
7 % anno_fname: name of file where genes as cell are stored | |
8 % | |
9 % -- output -- | |
10 % genes as a struct | |
11 | |
12 load(anno_fname, 'genes'); | |
13 if iscell(genes) | |
14 genes_cell = genes; | |
15 clear genes; | |
16 for g = 1:length(genes_cell), | |
17 gene = genes_cell{g}; | |
18 for e = 1:length(gene.exons) | |
19 gene.exons{e} = double(gene.exons{e}); | |
20 end | |
21 gene.exons = reshape(gene.exons, 1, length(gene.exons)); | |
22 gene.id = double(gene.id); | |
23 gene.start = double(gene.start); | |
24 gene.stop = double(gene.stop); | |
25 genes(g) = gene; | |
26 end | |
27 save(anno_fname, 'genes'); | |
28 end |