Skip to content

layers construction#25

Merged
yumisims merged 2 commits into
masterfrom
layers
Jul 6, 2026
Merged

layers construction#25
yumisims merged 2 commits into
masterfrom
layers

Conversation

@yumisims

Copy link
Copy Markdown
Contributor

This PR adds support in PretextMap for generating separate layers based on mapping quality (MAPQ). By default, two layers are created: one for MAPQ ≥ 0 and one for MAPQ ≥ 10

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds multi-layer output generation in PretextMap, allowing separate layers to be produced based on MAPQ thresholds (optionally configured via --mapqLayers), and appending per-layer data to the output file with additional header metadata.

Changes:

  • Introduces mapq_layer storage (per-threshold image sets + per-layer read counts) and routes read-pairs into all qualifying layers.
  • Adds --mapqLayers CLI parsing (sorting + deduplication) and updates memory sizing to scale with the number of layers.
  • Extends the output header with optional layer metadata and updates texture writing/status output to be layer-aware.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread PretextMap.cpp
Comment thread PretextMap.cpp
Comment on lines +2292 to +2296
while (*cursor == ' ' || *cursor == '\t') ++cursor;
if (*cursor == ',')
{
++cursor;
}
Comment thread PretextMap.cpp
Comment on lines 392 to +413
global_variable
u32
Min_Map_Quality = 10;

#define Max_MapQ_Layers 16
#define MapQ_Layer_Header_Extension_Size 18

struct
mapq_layer
{
u32 threshold;
volatile u64 totalGoodReads;
volatile u16 ***images;
};

global_variable
u32
MapQ_Layer_Thresholds[Max_MapQ_Layers] = {10};

global_variable
u32
Number_of_MapQ_Layers = 1;
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@yumisims
yumisims merged commit 2eff0fd into master Jul 6, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants