def test_04_chromosome_batch(self): if ONLY and not "04" in ONLY: return if CHKTIME: t0 = time() test_chr = Chromosome(name="Test Chromosome", experiment_resolutions=[20000] * 3, experiment_hic_data=[ PATH + "/20Kb/chrT/chrT_A.tsv", PATH + "/20Kb/chrT/chrT_D.tsv", PATH + "/20Kb/chrT/chrT_C.tsv" ], experiment_names=["exp1", "exp2", "exp3"], silent=True) test_chr.find_tad(["exp1", "exp2", "exp3"], batch_mode=True, verbose=False, silent=True) tads = test_chr.get_experiment("batch_exp1_exp2_exp3").tads found = [tads[t]["end"] for t in tads if tads[t]["score"] > 0] # Values obtained with square root normalization. #self.assertEqual([3.0, 8.0, 16.0, 21.0, 28.0, 35.0, 43.0, # 49.0, 61.0, 66.0, 75.0, 89.0, 94.0, 99.0], found) self.assertEqual([ 3.0, 14.0, 19.0, 33.0, 43.0, 49.0, 61.0, 66.0, 71.0, 89.0, 94.0, 99.0 ], found) if CHKTIME: print "4", time() - t0
def test_04_chromosome_batch(self): if ONLY and ONLY != "04": return if CHKTIME: t0 = time() test_chr = Chromosome( name="Test Chromosome", experiment_resolutions=[20000] * 3, experiment_hic_data=[ PATH + "/20Kb/chrT/chrT_A.tsv", PATH + "/20Kb/chrT/chrT_D.tsv", PATH + "/20Kb/chrT/chrT_C.tsv", ], experiment_names=["exp1", "exp2", "exp3"], silent=True, ) test_chr.find_tad(["exp1", "exp2", "exp3"], batch_mode=True, verbose=False, silent=True) tads = test_chr.get_experiment("batch_exp1_exp2_exp3").tads found = [tads[t]["end"] for t in tads if tads[t]["score"] > 0] # Values obtained with square root normalization. # self.assertEqual([3.0, 8.0, 16.0, 21.0, 28.0, 35.0, 43.0, # 49.0, 61.0, 66.0, 75.0, 89.0, 94.0, 99.0], found) self.assertEqual([3.0, 14.0, 19.0, 33.0, 43.0, 49.0, 61.0, 66.0, 71.0, 89.0, 94.0, 99.0], found) if CHKTIME: print "4", time() - t0
def test_04_chromosome_batch(self): if ONLY and ONLY != '04': return if CHKTIME: t0 = time() test_chr = Chromosome(name='Test Chromosome', experiment_resolutions=[20000]*3, experiment_hic_data=[ PATH + '/20Kb/chrT/chrT_A.tsv', PATH + '/20Kb/chrT/chrT_D.tsv', PATH + '/20Kb/chrT/chrT_C.tsv'], experiment_names=['exp1', 'exp2', 'exp3'], silent=True) test_chr.find_tad(['exp1', 'exp2', 'exp3'], batch_mode=True, verbose=False, silent=True) tads = test_chr.get_experiment('batch_exp1_exp2_exp3').tads found = [tads[t]['end'] for t in tads if tads[t]['score'] > 0] # Values obtained with square root normalization. #self.assertEqual([3.0, 8.0, 16.0, 21.0, 28.0, 35.0, 43.0, # 49.0, 61.0, 66.0, 75.0, 89.0, 94.0, 99.0], found) self.assertEqual([3.0, 14.0, 19.0, 33.0, 43.0, 49.0, 61.0, 66.0, 71.0, 89.0, 94.0, 99.0], found) if CHKTIME: print '4', time() - t0
def test_04_chromosome_batch(self): test_chr = Chromosome(name='Test Chromosome', experiment_resolutions=[20000]*3, experiment_hic_data=['20Kb/chrT/chrT_A.tsv', '20Kb/chrT/chrT_D.tsv', '20Kb/chrT/chrT_C.tsv'], experiment_names=['exp1', 'exp2', 'exp3']) test_chr.find_tad(['exp1', 'exp2', 'exp3'], batch_mode=True, verbose=False) tads = test_chr.get_experiment('batch_exp1_exp2_exp3').tads found = [tads[t]['end'] for t in tads if tads[t]['score'] > 0] self.assertEqual([3.0, 8.0, 16.0, 21.0, 28.0, 35.0, 43.0, 49.0, 61.0, 66.0, 75.0, 89.0, 99.0], found)