Repository navigation
Tag the H2009 ONT test uBAM with its read group (merge right after lrsomatic#207) - #5
Merged
Merged
Conversation
Every record of headered_H2009_ONT_UL_chr19_downsampled.bam now carries RG:Z:<the @rg ID already in its header>, as real dorado output does (samtools addreplacerg -m overwrite_all -R <ID>). Reads, qualities and all other tags are unchanged. test_sheet_2_rgtagged.csv is test_sheet_2.csv with sample3 reading this file. lrsomatic needs it to regression-test MINIMAP2_ALIGN's `samtools reset -x RG` (IntGenomicsLab/lrsomatic#207): none of the existing test uBAMs has a record-level RG tag, so dropping it could not be detected. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ljwharbers
added a commit
to IntGenomicsLab/lrsomatic
that referenced
this pull request
Sep 30, 2026
clair_only now reads test_sheet_2_rgtagged.csv (IntGenomicsLab/test-datasets#5, must be merged first): test_sheet_2 with sample3's uBAM carrying dorado's RG on every record, as real dorado output does. None of the existing test uBAMs has a record-level RG tag, so the read-group assertion could not see a MINIMAP2_ALIGN that keeps it. Checked on Mindwell from dd3127f: with -x RG the test passes and the snapshot is byte-identical to the one from test_sheet_2; with ext.args3 = "" the read-group assertion fails, with all 3122 sample3 records carrying the undeclared dorado RG, while no other sample or snapshot entry changes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
7 of 8 tasks
ljwharbers
added a commit
to IntGenomicsLab/lrsomatic
that referenced
this pull request
Sep 30, 2026
All six pipeline tests pass on Mindwell (apptainer) with 382ba38. The only change in every snapshot is LONGPHASE_MODCALL's longphase version (2.0.1 -> 2.0.2) plus the timestamp; no output md5 moves. So the chr19 test data is too small to trigger 2.0.1's CRAM misread, which is why the tests never showed it. clair_only was run on a local copy of test_sheet_2_rgtagged.csv, as IntGenomicsLab/test-datasets#5 is not merged yet. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
headered_H2009_ONT_UL_chr19_downsampled.bam (+ .bai) itself now carries RG:Z:<its header's dorado @rg ID> on every record, and the separate _rgtagged copy and test_sheet_2_rgtagged.csv are gone. Every lrsomatic pipeline test that reads this file (sample1 tumour and sample3 in samplesheet_lr-somatic.csv, sample1/3/5 in test_sheet_2.csv) now gets an RG-tagged uBAM, as real dorado output is. Merge only once IntGenomicsLab/lrsomatic#207 is in dev: without its `samtools reset -x RG`, the aligned records carry two RG tags and dev's BAM snapshots change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Tags every record of
data/aligned/headered_H2009_ONT_UL_chr19_downsampled.bamwith the read group already declared in its header (RG:Z:df8348f0…_dna_r10.4.1_e8.2_400bps_sup@v5.0.0), as real dorado output does, and replaces the file (+.bai) in place.dev. Before that,devhas nosamtools reset -x RGinMINIMAP2_ALIGN: the uBAM'sRGtag would be carried through next to the pipeline's-Rread group, so dev's aligned BAMs (and their snapshot md5s) change, and every open lrsomatic PR'sdefaulttest would fail.Why: lrsomatic #207 drops the uBAM's own
RGtag before alignment. Without that, each aligned record carried twoRGtags; CRAM keeps one per record, and it kept dorado's, which has no@RGline in the aligned header. None of the test uBAMs had a record-levelRGtag (the ONT ones have dorado's@RGin the header only), so no test could see it. This file is sample1's tumour and sample3 insamplesheet_lr-somatic.csv(all-profile testtests) and sample1/3/5 intest_sheet_2.csv(clair_only, which asserts every record's RG is declared in its header).What:
samtools addreplacerg -m overwrite_all -R <ID> --no-PG, re-indexed. 2305 records before and after; read names, sequences, qualities and all other tags are identical; the header is unchanged.Validated on Mindwell (apptainer): with lrsomatic#207,
clair_onlypasses on the tagged file with its snapshot byte-identical to the untagged run; with-x RGremoved, the read-group assertion fails (all 3122 sample3 records carry the undeclared dorado RG) while no snapshot entry changes.(An earlier version of this PR added the tagged file as a copy plus a
test_sheet_2_rgtagged.csv; replaced by tagging the original in place.)🤖 Generated with Claude Code