Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ref-path stubbification option -S to vg clip #4061

Merged
merged 1 commit into from
Sep 1, 2023
Merged

Conversation

glennhickey
Copy link
Contributor

@glennhickey glennhickey commented Aug 25, 2023

Changelog Entry

To be copied to the draft changelog by merger:

  • Add ref-path stubbification option -S to vg clip

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:

vg stats -HT chunk_4.vg
heads	7134050 
tails	

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) since vg haplotypes assumes one top-level chain per component.

This PR adds a -S option to vg 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!!

@glennhickey glennhickey merged commit 647d935 into master Sep 1, 2023
2 checks passed
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.

2 participants