Repository navigation
Ultima Genomics support (#166) - #171
Merged
Merged
Conversation
Ultima UG 100 reads (MyHeritage and Nebula/DNA360 WGS) are recognized from their read group (PL:ULTIMA) or --platform ultima, and keep their flow-space data through alignment: - align/realign: BWA-MEM -Y, with tp/t0 carried in the FASTQ comment and reversed for reads that change strand (samtools doesn't); read groups and the flow order kept; duplicates marked with GATK MarkDuplicates' flow mode. realign streams the BAM/CRAM into BWA without FASTQs. --gpu is refused. - vcf snp/indel: bcftools' -X ultima profile and its default call prior (-P 0 more than halved Ultima indel precision); vcf gatk: --flow-mode ADVANCED; vcf deepvariant: the ULTIMA model from Google's experimental image (deepvariant_ultima_image); freebayes warns. - bam to-ubam keeps tp, t0, tm, rq, a3 in read orientation. - info recognizes Ultima read names; example-genome lists GIAB HG008 Ultima data. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: a3eb6270-3c55-425b-b34b-2cb2e5dfd2f9
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: a3eb6270-3c55-425b-b34b-2cb2e5dfd2f9
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
There was a problem hiding this comment.
🟡 Changes recommended
Ultima handling can incorrectly reverse read-oriented flow arrays and overlook valid FASTQ comment tags, misassigning probabilities to bases or silently dropping flow metadata.
2 open issues
What changed in this PR
Adds Ultima Genomics support across alignment, variant calling, and uBAM conversion, addressing #166 with platform-specific processing and public example datasets.
Changes:
- Detects Ultima reads and adds BWA alignment with flow-tag preservation and flow-aware duplicate marking.
- Selects Ultima-specific caller settings and documents unsupported GPU paths.
- Adds regression tests, GIAB examples, usage guidance, and chr20 validation results.
| File | Description |
|---|---|
tests/test_ultima.py |
Tests detection, flow tags, alignment, and model selection. |
src/wgsextract_cli/core/ultima.py |
Adds shared Ultima detection and flow-tag utilities. |
src/wgsextract_cli/core/constants.py |
Recognizes Ultima read names. |
src/wgsextract_cli/core/config.py |
Adds the Ultima DeepVariant image setting. |
src/wgsextract_cli/commands/vcf/deepvariant.py |
Selects the ULTIMA model and experimental image. |
src/wgsextract_cli/commands/vcf/callers.py |
Enables GATK flow mode and caller warnings. |
src/wgsextract_cli/commands/vcf/basic.py |
Applies Ultima bcftools settings and default prior. |
src/wgsextract_cli/commands/vcf/__init__.py |
Exposes the ULTIMA model option. |
src/wgsextract_cli/commands/realign.py |
Detects Ultima inputs and streams realignment. |
src/wgsextract_cli/commands/align.py |
Adds Ultima alignment and duplicate marking. |
src/wgsextract_cli/commands/_microarray_vcf.py |
Applies the Ultima profile to microarray calling. |
src/wgsextract_cli/commands/_examples_catalog.py |
Adds public GIAB Ultima FASTQ and CRAM examples. |
src/wgsextract_cli/commands/_bam_ubam.py |
Preserves Ultima tags during uBAM conversion. |
site_src/workflows.md |
Documents Ultima alignment workflows. |
README.md |
Summarizes support, limitations, and validation results. |
Review effort: Balanced
…t space-separated FASTQ tags The flip filter now reads the stream's @rg lines and turns tp/t0 around only for reads whose read group says tp:reference (Ultima's default), as Ultima's and Broad's pipelines do; tp:read groups are left alone. A FASTQ comment after a space, not only a tab, counts as carrying flow tags. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: a3eb6270-3c55-425b-b34b-2cb2e5dfd2f9
This was referenced Oct 27, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Closes #166.
Ultima Genomics (UG 100) reads come from MyHeritage's low-pass WGS and Nebula/DNA360's 30x. They are single-end, ~300 bp, and their errors are mostly homopolymer lengths. Each read carries flow-space probabilities in
tp/t0tags, and its read group hasPL:ULTIMAand the flow order (FO). Ultima's and Broad's pipelines need those to call well. WGS Extract now recognizes Ultima data and keeps that information through the whole pipeline.Detection: an Ultima read group (
PL:ULTIMA), or--platform ultima(needed for SRA FASTQs, which have neither).inforecognizes Ultima read names.align/realign:-Y), as Ultima's and Broad's pipelines do.--gpu, minimap2/pbmm2 and--r2are refused.tp/t0ride in the FASTQ comment (samtools fastq -T→bwa -C). A streaming filter reverses them on reverse-strand reads before and after BWA; Picard'sATTRIBUTE_TO_REVERSEdoes this in Ultima's pipeline, andsamtools resetdoesn't.bwa -H.realignstreams the BAM/CRAM into BWA without writing FASTQs.MarkDuplicates --FLOW_MODE, using Ultima's flags. Without GATK it falls back tosamtools markdupand warns.Callers:
vcf snp/indeluse bcftools'-X ultimaprofile andcall's default prior. WGS Extract's-P 0more than halved Ultima indel precision (0.13 vs 0.29 on a chr20 slice).vcf gatkuses--flow-mode ADVANCED.vcf deepvariantuses theULTIMAmodel from Google's experimentalgoogle/deepvariant:gh1100-ultimaimage (Support Ultima sequencing data google/deepvariant#1100), configurable asdeepvariant_ultima_image.vcf freebayesand the GPU HaplotypeCaller warn. GPU DeepVariant refuses Ultima reads.bam to-ubamkeepstp,t0,tm,rqanda3in read orientation.Example genomes: GIAB HG008 Ultima data (an SRA FASTQ, and the 234x GRCh38 CRAM, which samtools can read over HTTPS by region).
Validation (real data)
GIAB HG008-N-D, whole chr20. Ultima's CRAM was downsampled to ~30x and run through
realignto hs38DH's chr20, then each caller. The comparison set is the same tissue's Illumina BAM (~40x, bcftools). Both are scored inside GIAB's "not in any difficult region" stratification (50.8 Mb). Alleles and genotype class must match.-X ultima)--flow-mode ADVANCEDAlso checked:
tm/a3tag counts are preserved.tests/test_ultima.py, including real BWA + GATK flow-mode runs.A whole-genome realign wasn't run: on the shared 8-core host it would take about a day. Whole chr20 at production depth exercised the same code paths.
MyHeritage's 2x low-pass data is too shallow for reliable genotypes without imputation, which is out of scope (noted in the README).