31
|
1
|
|
2 import csv
|
|
3 import CGData
|
|
4 import CGData.BaseMatrix
|
|
5
|
|
6 class GenomicMatrix(CGData.BaseMatrix.BaseMatrix):
|
|
7
|
|
8 __format__ = {
|
|
9 "name" : "genomicMatrix",
|
|
10 "type" : "type",
|
|
11 "form" : "matrix",
|
|
12 "rowType" : "probeMap",
|
|
13 "colType" : "idMap",
|
|
14 "valueType" : "float",
|
|
15 "nullString" : "NA",
|
|
16 "links" : {
|
|
17 "dataSubType" : {}
|
|
18 }
|
|
19 }
|
|
20
|
|
21 def __init__(self):
|
|
22 CGData.BaseMatrix.BaseMatrix.__init__(self)
|
|
23
|
|
24 def init_blank(self, cols, rows):
|
|
25 super(GenomicMatrix, self).init_blank(cols=cols,rows=rows)
|
|
26 if 'cgdata' not in self:
|
|
27 self['cgdata'] = { 'type' : 'genomicMatrix' }
|
|
28
|
|
29 def get_probe_list(self):
|
|
30 return self.get_row_list()
|
|
31
|
|
32 def get_sample_list(self):
|
|
33 return self.get_col_list()
|
|
34
|
|
35 def get_data_subtype(self):
|
|
36 return self.get('cgdata', {}).get('dataSubType', None)
|
|
37
|