Ejemplo n.º 1
0
 def compute(self, maker, model, release):
     mset = self.kb.get_snp_markers_set(maker, model, release)
     if not mset:
         raise ValueError("SNPMarkersSet[%s,%s,%s] has not been defined." % (maker, model, release))
     # projector = (np.arange(0, 100), np.array([101, 109]), np.arange(110,N))
     # selector = kb.build_selector(
     # s = self.kb.get_gdo_iterator(mset, selector, projector)
     s = self.kb.get_gdo_iterator(mset)
     # --
     start = time.clock()
     counts = algo.count_homozygotes(s)
     print "counts on %d:" % counts[0], time.clock() - start
     start = time.clock()
     mafs = algo.maf(None, counts)
     print "mafs on %d:" % counts[0], time.clock() - start
     start = time.clock()
     hwe = algo.hwe(None, counts)
     print "hwe on %d:" % counts[0], time.clock() - start
Ejemplo n.º 2
0
 def compute(self, maker, model, release):
     mset = self.kb.get_snp_markers_set(maker, model, release)
     if not mset:
         raise ValueError('SNPMarkersSet[%s,%s,%s] has not been defined.' %
                          (maker, model, release))
     # projector = (np.arange(0, 100), np.array([101, 109]), np.arange(110,N))
     # selector = kb.build_selector(
     # s = self.kb.get_gdo_iterator(mset, selector, projector)
     s = self.kb.get_gdo_iterator(mset)
     #--
     start = time.clock()
     counts = algo.count_homozygotes(s)
     print 'counts on %d:' % counts[0], time.clock() - start
     start = time.clock()
     mafs = algo.maf(None, counts)
     print 'mafs on %d:' % counts[0], time.clock() - start
     start = time.clock()
     hwe = algo.hwe(None, counts)
     print 'hwe on %d:' % counts[0], time.clock() - start
Ejemplo n.º 3
0
def do_check(s):
  counts = algo.count_homozygotes(s)
  mafs = algo.maf(None, counts)
  hwe  = algo.hwe(None, counts)
  return mafs, hwe
Ejemplo n.º 4
0
def do_check(s):
    counts = algo.count_homozygotes(s)
    mafs = algo.maf(None, counts)
    hwe = algo.hwe(None, counts)
    return mafs, hwe