Пример #1
0
 def test_genome_wide_norm_without_diag(self):
     """Tests functionality to extract ICCF values
     genome-wide with median normalization from synthetic Hi-C data
     with blanking the main diagonal."""
     arms = pd.DataFrame({
         "chrom": "chrSyn",
         "start": 0,
         "end": 4990000
     },
                         index=[0])
     cooler_file = cooler.Cooler(
         "testFiles/test2.mcool::/resolutions/10000")
     pairing_score = HT.get_pairing_score(cooler_file,
                                          50000,
                                          arms=arms,
                                          norm=True,
                                          blank_diag=True)
     expected = pd.read_csv(
         "testFiles/test_pairingScore_ICCF_genomeWide_withoutDiag_norm.csv",
         dtype={
             name: pairing_score.dtypes[name]
             for name in pairing_score.dtypes.index
         },
         index_col=0,
     )
     assert_frame_equal(pairing_score, expected)
Пример #2
0
 def test_specific_regions_without_diag(self):  # Simulated cooler
     """Tests functionality to extract ICCF values
     at specific regions from synthetic Hi-C data
     with blanking the main diagonal."""
     position_frame = pd.read_csv("testFiles/posPileups.csv")
     position_frame.loc[:, "mid"] = position_frame["pos"]
     arms = pd.DataFrame({
         "chrom": "chrSyn",
         "start": 0,
         "end": 4990000
     },
                         index=[0])
     cooler_file = cooler.Cooler(
         "testFiles/test2.mcool::/resolutions/10000")
     pairing_score = HT.get_pairing_score(
         cooler_file,
         50000,
         regions=position_frame,
         arms=arms,
         norm=False,
         blank_diag=True,
     )
     expected = pd.read_csv(
         "testFiles/test_pairingScore_ICCF_specificRegions_withoutDiag.csv")
     assert_frame_equal(pairing_score, expected)