def setUp(self): self.data_fname = 'test/data/test.fcd' self.project_fname = 'test/data/test.fcp' self.probability_fname = 'test/data/test_probability.fcp' self.express_fname = 'test/data/test_express.fcp' self.binning_fname = 'test/data/test_binning.fcp' self.raw = h5py.File(self.project_fname, 'r') self.probability = fivec.FiveC(self.probability_fname, 'r') self.express = fivec.FiveC(self.express_fname, 'r') self.binning = fivec.FiveC(self.binning_fname, 'r')
def setUp(self): self.project_fname = 'test/data/test_probability.fcp' self.binned_fname = 'test/data/test_binned.hdf5' self.heatmap_fname = 'test/data/test.fch' self.data = h5py.File(self.binned_fname, 'r') self.heatmap = h5py.File(self.heatmap_fname, 'r') self.project = fivec.FiveC(self.project_fname, 'r', silent=True)
def test_fivec_project_express(self): subprocess.call("./bin/hifive 5c-normalize express -q -o test/data/test_temp.fcp -e 100 -d -w cis %s" % self.project_fname, shell=True) project = fivec.FiveC("test/data/test_temp.fcp", 'r', silent=True) self.assertTrue(numpy.allclose(self.express.corrections, project.corrections), "learned express correction values don't match target values") self.assertTrue(numpy.allclose(self.express.region_means, project.region_means), "region means don't match target values")
def test_fivec_project_probability(self): subprocess.call("./bin/hifive 5c-normalize probability -q -o test/data/test_temp.fcp -b 100 -l 0.5 -p %s" % self.project_fname, shell=True) project = fivec.FiveC("test/data/test_temp.fcp", 'r', silent=True) self.assertTrue(numpy.allclose(self.probability.corrections, project.corrections), "learned correction values don't match target values") self.assertTrue(numpy.allclose(self.probability.region_means, project.region_means), "region means don't match target values")
def test_fivec_project_binning(self): subprocess.call("./bin/hifive 5c-normalize binning -q -o test/data/test_temp.fcp -i 10 -t 1.0 -y cis -v len -n 5 -u even %s" % self.project_fname, shell=True) project = fivec.FiveC("test/data/test_temp.fcp", 'r', silent=True) self.assertTrue(numpy.allclose(self.binning.binning_corrections, project.binning_corrections), "learned binning correction values don't match target values")