Skip to content

fix --mgSplitWholeGenomeRef option bug - #2011

Open
glennhickey wants to merge 2 commits into
masterfrom
mgsplit-wg
Open

glennhickey wants to merge 2 commits into
masterfrom
mgsplit-wg

Conversation

@glennhickey

Copy link
Copy Markdown
Collaborator

Fix issue where second reference wouldn't get chromosome binned like everything else, allowing for bits of it to bleed into different chromsomes. Only an issue in the new --mgSplitWholeGenome option. The reason was that all references would appear full-genome in every chromosome. But only the first reference is properly post-processed out.

This patch takes the simple and easy fix: just use the first reference whole-genome. Since the whole point is better mapq, it should be fine (and even a bit faster).

Caught this because the bug resulted in invalid rGFA, with different ranks getting applied to different segments of the same contig.

9b0ce2d passed name= and cores= to merge_pafs_sized, but toil's
FunctionWrappingJob pops memory/cores/disk/accelerators/preemptible/checkpoint/
name out of the kwargs before calling the function, using "name" as the job's
unitName.  Both were swallowed: the merged file kept the default 'merged.paf' for
the GAF merge too, and the bgzip ran on one thread, which is what that commit was
meant to fix.  Rename them merged_name and gzip_cores; gzip_cores is still passed
on to the child as cores=, where toil eating it is the point.

Visible in an HPRC log as jobs literally named "merged.gaf" and "merged.paf"
either side of `bgzip .../merged.paf --threads 1`.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XScUpHRSBsui9Y67uQxA6a
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