Ejemplo n.º 1
0
 def test_get_val2keys(self):
     v2ks = lcommon.get_val2keys(self.dict3)
     for v, ks in v2ks.iteritems():
         v2ks[v] = sorted(ks)
     dict3 = {1: ['sam12'], 2: ['sam12', 'sam23'], 3: ['sam23']}
     self.assertEqual(v2ks, dict3)
     self.assertRaises(lcommon.InputError, lcommon.get_val2key_1to1, self.dict3)
Ejemplo n.º 2
0
 def run(self):
     c2s = pickle.load(gzip.open(self.infile, 'rb'))
     filter_c2sams = filter_clones(c2s, self.sams, self.minsam, self.maxsam)
     sam2clones = lcommon.get_val2keys(filter_c2sams)
     for sam, clones in sam2clones.iteritems():
         infile = os.path.join(self.db_dir, sam, self.v)
         outfile = os.path.join(self.outdir, sam, self.v)
         self.addChildTarget(OverlapClones_Sample(infile, outfile, clones))