Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
self.matsizes = np.ceil(self.clr.chromsizes / self.resolution).astype(int)
self.chroms = natsorted(
list(set(self.CC.final_chroms) & set(self.clr.chromnames))
)
self.regions = {
chrom: cooler.util.parse_region_string(chrom) for chrom in self.chroms
}
if self.expected is not False:
if self.control:
warnings.warn(
"Can't do both expected and control shifts; defaulting to expected"
)
self.control = False
assert isinstance(self.expected, pd.DataFrame)
self.ExpSnipper = snipping.ExpectedSnipper(self.clr, self.expected)
self.expected_selections = {
chrom: self.ExpSnipper.select(region, region)
for chrom, region in self.regions.items()
}
self.expected = True