Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions maxatac/analyses/normalize.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def run_normalization(args):
3) Find the genomic min and max values by looping through each chromosome
5) Loop through each chromosome and minmax normalize the values based on the genomic values.

:param args: signal, output_dir, chromosome_sizes, chromosomes, max_percentile, method, blacklist
:param args: signal, output_dir, chromosome_sizes, chromosomes, max_percentile, method, blacklist, max_zooms

:return: A minmax normalized bigwig file
"""
Expand Down Expand Up @@ -83,7 +83,7 @@ def run_normalization(args):
with pyBigWig.open(args.signal) as input_bw, pyBigWig.open(output_filename, "w") as output_bw:
header = [(x, chromosome_length_dictionary[x]) for x in sorted(args.chromosomes)]

output_bw.addHeader(header)
output_bw.addHeader(header, maxZooms = args.max_zooms)

# For every chromosome in header, perform normalization
for chrom_name, chrom_length in header:
Expand Down Expand Up @@ -115,7 +115,7 @@ def run_normalization(args):
ends=chrom_length,
span=1,
step=1,
values=normalized_signal.tolist()
values=normalized_signal.astype(np.float16).tolist()
)

# Measure time of averaging
Expand Down