Add ref-path stubbification option -S to vg clip #4061
Merged
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.
Changelog Entry
To be copied to the draft changelog by merger:
Description
The end of
chr4
in a recent 16-drosophila graph is a big tangle, and we get an edge (from another haplotype) coming out the end of it:This has the effect of leaving the graph with only one tip, which in this case causes it to have 4 top level chains. This in turn causes
vg haplotypes
to crash (#4060) sincevg haplotypes
assumes one top-level chain per component.This PR adds a
-S
option tovg clip
that, for every reference path, makes sure that both of its endpoints are on tips in the graph. When used in conjunction with the usual stub remover (so-Ss
), it will make sure there are exactly two tips per reference path per component in the graph.If the graph has overlapping reference paths, then they will be chopped up by eachother, so probably best to avoid using in this case!!