diff --git a/maxatac/analyses/average.py b/maxatac/analyses/average.py index 4352a55..8b4d392 100644 --- a/maxatac/analyses/average.py +++ b/maxatac/analyses/average.py @@ -24,7 +24,7 @@ def run_averaging(args): 4) Loop through each entry in the chromosome sizes dictionary and calculate the average across all inputs 5) Write the bigwig file - :param args: bigwig_files, output_dir, name, chromosomes, chromosome_sizes + :param args: bigwig_files, output_dir, name, chromosomes, chromosome_sizes, max_zooms :return: A bigwig file """ @@ -60,7 +60,7 @@ def run_averaging(args): header = [(x, chromosome_sizes_dictionary[x]) for x in sorted(args.chromosomes)] # Write the header to the file - output_bw.addHeader(header) + output_bw.addHeader(header, maxZooms = args.max_zooms) # TODO Use parallel processing to speed up. Must write chromosomes in same order as header # Loop through the chromosomes and average the values across files @@ -86,7 +86,7 @@ def run_averaging(args): ends=chrom_length, span=1, step=1, - values=chrom_vals.tolist() + values=chrom_vals.astype(np.float16).tolist() ) # Measure time of averaging @@ -99,4 +99,4 @@ def run_averaging(args): logging.info("Total averaging time: %d:%d:%d.\n" % (hours, mins, secs)) - logging.info("Results saved to: " + output_bigwig_filename) \ No newline at end of file + logging.info("Results saved to: " + output_bigwig_filename)