Could a minimum window size for GC (%) in "Coverage across reference" be added?

4 views
Skip to first unread message

Phillip SanMiguel

unread,
Dec 3, 2025, 1:53:48 PM (13 days ago) Dec 3
to QualiMap

Hi Qualimap developers,

I work at the Purdue Genomics Core Facility and have been using Qualimap for years with great results. However, I've noticed an issue with the "Coverage across reference" analysis that has become problematic in recent years.

The Problem:

The -nw parameter (default 400 windows) appears to apply 400 windows to each contig individually rather than globally across the reference. For short references or assemblies with many small contigs, this creates windows that are only a few bases wide, making the coverage and GC content plots uninformative.

For example:

  • A 5 kb viral genome: 400 windows = ~12 bases per window
  • A 2 kb plasmid: 400 windows = ~5 bases per window

This used to produce useful results years ago, so I suspect the behavior changed at some point (perhaps windows used to be allocated globally?).

Proposed Solutions:

  1. Add a minimum window size parameter (e.g., --min-window-size 50) that would override -nw when it would create windows smaller than the specified threshold
  2. Alternatively, allocate windows globally across all contigs rather than per-contig
  3. Most ideally: implement sliding windows instead of non-overlapping windows for better resolution

Current Workaround:

I can calculate -nw based on reference length to achieve ~50 bp windows:

bash
NUM_WINDOWS=$((REF_LENGTH / 50)) [ $NUM_WINDOWS -gt 400 ] && NUM_WINDOWS=400 qualimap bamqc -bam input.bam -nw $NUM_WINDOWS

However, this doesn't work well for multi-contig assemblies where contig sizes vary significantly.

Would any of these solutions be feasible to implement? The coverage across reference plots are extremely valuable for our core facility's QC reports, and this would greatly improve their utility for small reference projects.

Thanks for your consideration and for maintaining such a useful tool!

Best regards, 

Phillip SanMiguel

Konstantin Okonechnikov

unread,
Dec 7, 2025, 9:15:45 AM (9 days ago) Dec 7
to qual...@googlegroups.com
Dear Phillip,

Thanks a lot for useful suggestions! I did not came across with any windows size issues and there were no updates quite long for this,  but will got into the code to figure out if there was a bug there.  Do you know from which version you start observing a problem? 

Also, I created the issue in our repo where copied your request:

Probably the minimum window size param would be optimal, will start from this implementation. Also, it would be awesome if you could share or suggest where to download test data, so it could be quickly used for verification.  

Best regards,
   Konstantin



--
You received this message because you are subscribed to the Google Groups "QualiMap" group.
To unsubscribe from this group and stop receiving emails from it, send an email to qualimap+u...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/qualimap/703b7e4d-c445-401b-a184-befcd7cf3a64n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages