Ejemplo n.º 1
0
 def setUp(self):
     self.data_fname = 'test/data/test.hcd'
     self.project_fname = 'test/data/test.hcp'
     self.probbin_fname = 'test/data/test_probbin.hcp'
     self.probpois_fname = 'test/data/test_probpois.hcp'
     self.express_fname = 'test/data/test_express.hcp'
     self.binning_fname = 'test/data/test_binning.hcp'
     self.data = h5py.File(self.project_fname, 'r')
     self.probbin = hic.HiC(self.probbin_fname, 'r')
     self.probpois = hic.HiC(self.probpois_fname, 'r')
     self.express = hic.HiC(self.express_fname, 'r')
     self.binning = hic.HiC(self.binning_fname, 'r')
Ejemplo n.º 2
0
 def setUp(self):
     self.project_fname = 'test/data/test_probbin.hcp'
     self.binned_fname = 'test/data/test_binned.hdf5'
     self.heatmap_fname = 'test/data/test.hch'
     self.data = h5py.File(self.binned_fname, 'r')
     self.heatmap = h5py.File(self.heatmap_fname, 'r')
     self.project = hic.HiC(self.project_fname, 'r', silent=True)
Ejemplo n.º 3
0
 def test_hic_project_binning(self):
     subprocess.call(
         "./bin/hifive hic-normalize binning -q -m 20000 -o test/data/test_temp.hcp -r 5 -y cis -t 1.0 -v len,distance -s 3,3 -u even,fixed-const %s"
         % (self.project_fname),
         shell=True)
     project = hic.HiC("test/data/test_temp.hcp", 'r', silent=True)
     self.assertTrue(
         numpy.allclose(self.binning.binning_corrections,
                        project.binning_corrections),
         "learned binning correction values don't match target values")
Ejemplo n.º 4
0
 def test_hic_project_express(self):
     subprocess.call(
         "./bin/hifive hic-normalize express -q -m 20000 -o test/data/test_temp.hcp -e 100 -w cis -f 10 %s"
         % (self.project_fname),
         shell=True)
     project = hic.HiC("test/data/test_temp.hcp", '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.chromosome_means,
                        project.chromosome_means),
         "chromosome means don't match target values")
Ejemplo n.º 5
0
 def test_hic_project_probability_poisson(self):
     subprocess.call(
         "./bin/hifive hic-normalize probability -q -m 20000 -o test/data/test_temp.hcp -b 15 -l 0.4 -g 0.0015 -p -a poisson %s"
         % (self.project_fname),
         shell=True)
     project = hic.HiC("test/data/test_temp.hcp", 'r', silent=True)
     self.assertTrue(
         numpy.allclose(self.probpois.corrections,
                        project.corrections,
                        atol=1e-1),
         "learned correction values don't match target values")
     self.assertTrue(
         numpy.allclose(self.probpois.chromosome_means,
                        project.chromosome_means,
                        atol=1e-4),
         "chromosome means don't match target values")