def setUp(self): self.opts = rapi.opts() self.opts.share_ref_mem = False # for Travis rapi.init(self.opts) self.ref = rapi.ref(stuff.MiniRef) aligner = rapi.aligner(self.opts) self.batch = rapi.read_batch(2) reads = stuff.get_mini_ref_seqs() for row in reads: self.batch.append(row[0], row[1], row[2], rapi.QENC_SANGER) self.batch.append(row[0], row[3], row[4], rapi.QENC_SANGER) aligner.align_reads(self.ref, self.batch)
def test_ref_contigs(self): r = rapi.ref(MiniRef) try: contigs = [ c for c in r ] self.assertEquals(1, len(contigs)) self.assertEquals(len(r), len(contigs)) c0 = contigs[0] self.assertEquals('chr1', c0.name) self.assertEquals(60000, c0.len) for v in (c0.assembly_identifier, c0.species, c0.uri, c0.md5): self.assertIsNone(v) finally: r.unload()
def test_ref_load_unload(self): r = rapi.ref(MiniRef) self.assertEqual(MiniRef, r.path) self.assertEqual(1, len(r)) r.unload()
def setUp(self): self.opts = rapi.opts() self.opts.share_ref_mem = False # for Travis rapi.init(self.opts) self.ref = rapi.ref(stuff.MiniRef)