From d4380aa6490d1f95ca3520bd6562f46f9b97bf9d Mon Sep 17 00:00:00 2001 From: "Akshata N. Rudrapatna" <139808049+ANRudrapatna@users.noreply.github.com> Date: Tue, 14 Jul 2026 15:33:15 -0400 Subject: [PATCH] Update predict.py Issue: the default behavior of maxATAC functions that generate averaged/normalized bigWig files is to generate bigWig files with 10 zoom levels (i.e., pre-computed summary statistics that enable quick zooming of bigWig files). This is extremely memory-intensive, but lower values of this parameter result in delayed loading of files in e.g., IGV. Solution: Added a new argument ("max_zooms") for the maxATAC average and normalize functions in parser.py, which defaults to 5. This will allow users to specify how many zoom levels they wish to retain in the final bigWig file (0-10). I successfully tested the argument for the above functions by specifying all possible values of --max_zooms in my function call. Also added code to convert values in the array used to generate the bigWig file from FP32 to FP16 values. This code was also successfully tested and resulted in additional memory savings of ~4%. --- maxatac/analyses/predict.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/maxatac/analyses/predict.py b/maxatac/analyses/predict.py index f6c9c47..32565b2 100644 --- a/maxatac/analyses/predict.py +++ b/maxatac/analyses/predict.py @@ -119,7 +119,8 @@ def run_prediction(args): write_predictions_to_bigwig(prediction_bedgraph, output_filename=outfile_name_bigwig, chrom_sizes_dictionary=chrom_sizes_dict, - chromosomes=chrom_list + chromosomes=chrom_list, + max_zooms = args.max_zooms ) # If a cutoff file is provided, call peaks @@ -160,7 +161,6 @@ def run_prediction(args): index=False, header=False) - # Measure end time of training stopTime = timeit.default_timer() totalTime = stopTime - startTime