Skip to content

Conversation

@faithokamoto
Copy link
Contributor

Changelog Entry

To be copied to the draft changelog by merger:

  • Add option vg haplotypes --ban-sample

Description

Per Jouni's suggestion on a previous PR, this partially redos #4758 to add --ban-sample as an option which will prevent the sampler from selecting any haplotypes from a particular sample. Useful when you want to do a poor man's leave-one-out experiment without actually rebuilding the entire graph.

@jltsiren
Copy link
Contributor

It would be a bit faster to convert the banned sample names into integer ids. Then you could use the sample field in PathName directly for checking if the sample has been banned, instead of first converting the PathName into FullPathName. But I'm not sure if the difference is meaningful.

@faithokamoto
Copy link
Contributor Author

faithokamoto commented Dec 17, 2025

Yeah, I don't think the small speed differential would be worth the more confusing code. If this ever becomes a bottleneck I'd reconsider. Think I can just merge this, then?

@jltsiren
Copy link
Contributor

You can merge this. I'll check before the next release if the performance impact is noticeable.

@faithokamoto faithokamoto merged commit 06dd299 into master Dec 17, 2025
2 checks passed
@faithokamoto faithokamoto deleted the ban-sample-opt branch December 17, 2025 20:01
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.

4 participants