Skip to content

feat: stochastic resolution of IUPAC ambiguity codes in reference gen…#136

Merged
joshfactorial merged 3 commits into
developfrom
feat/iupac-resolution
May 20, 2026
Merged

feat: stochastic resolution of IUPAC ambiguity codes in reference gen…#136
joshfactorial merged 3 commits into
developfrom
feat/iupac-resolution

Conversation

@joshfactorial
Copy link
Copy Markdown
Collaborator

…omes

IUPAC codes (R/Y/M/K/S/W/H/B/V/D) in reference FASTAs were previously silently mapped to N, producing excess-N reads indistinguishable from assembly gaps. gen-reads now resolves each code to one of its constituent bases at reference-load time using the per-contig seeded RNG, making results reproducible while avoiding systematic reference bias.

FastaStream now yields raw sequence strings; resolve_iupac_bases() in common::file_tools::fasta_stream performs the stochastic conversion. gen-mut-model and gen-gc-bias-model continue using simple Nucleotide::from conversion (IUPAC → N), appropriate for model-building from real VCF data.

Bumps version to 1.5.2.

joshfactorial and others added 3 commits May 20, 2026 10:43
…omes

IUPAC codes (R/Y/M/K/S/W/H/B/V/D) in reference FASTAs were previously
silently mapped to N, producing excess-N reads indistinguishable from
assembly gaps. gen-reads now resolves each code to one of its constituent
bases at reference-load time using the per-contig seeded RNG, making
results reproducible while avoiding systematic reference bias.

FastaStream now yields raw sequence strings; resolve_iupac_bases() in
common::file_tools::fasta_stream performs the stochastic conversion.
gen-mut-model and gen-gc-bias-model continue using simple Nucleotide::from
conversion (IUPAC → N), appropriate for model-building from real VCF data.

Bumps version to 1.5.2.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@joshfactorial joshfactorial merged commit fbb3ca1 into develop May 20, 2026
1 check 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.

1 participant