Example #1
0
 def __init__(self,name):
     super().__init__(name=name,type='Expr') 
     try:
         self.log('Loading Expr table')
         self.hdf5 = self._hdf5(name)
         self._expr = self.hdf5['expr']
     except KeyError as e:
         self.log('{} is empty: ({})',name,e)
         self._expr = pd.DataFrame()
     self.log('Building Expr Index')
     self._expr_index = defaultdict(lambda: None,{gene:index for index,gene in enumerate(self._expr.index)}) 
     try:
         self.log('Loading RefGen')
         self.refgen = RefGen(self.refgen)
     except TypeError as e:
         self.log.warn('RefGen for {} not set!',self.name)
     except NameError as e:
         self.log.warn('Refgen for {} not available, must be reset!',self.name)
Example #2
0
 def _parent_refgen(self):
     return RefGen(self._global['parent_refgen'])
Example #3
0
 def __init__(self,name):
     super().__init__(name,type='Ontology')
     if self.refgen:
         self.refgen = RefGen(self.refgen)