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

gfaffix invalidates graph by removing self-looping edge #11

Closed
glennhickey opened this issue Aug 4, 2023 · 5 comments
Closed

gfaffix invalidates graph by removing self-looping edge #11

glennhickey opened this issue Aug 4, 2023 · 5 comments

Comments

@glennhickey
Copy link

This issue comes courtesy of ComparativeGenomicsToolkit/cactus#1123

Note that to reproduce, you need a vg version < 1.50.0 due to this issue!

gfaffix --version
gfaffix 0.1.4b

vg version
vg version v1.49.0 "Peschici"
wget -q http://public.gi.ucsc.edu/~hickey/debug/gfaffix-crash-aug4-2023/NW_017567117.1.vg.gfa.gz
gzip -d NW_017567117.1.vg.gfa.gz

vg validate NW_017567117.1.vg.gfa
graph: valid

gfaffix NW_017567117.1.vg.gfa --output_refined NW_017567117.1.vg.gfaffixed.gfa --check_transformation --dont_collapse GCF_0016612551* > /dev/null

vg validate NW_017567117.1.vg.gfaffixed.gfa
graph invalid: missing edge between 691th step (86210:1) and 692th step (86210:0) of path GCA_0193217651#0#JAHTLY010002216.1#0
graph invalid: missing edge between 692th step (86210:1) and 691th step (86210:1) of path GCA_0193217651#0#JAHTLY010002216.1#0
graph: invalid
@danydoerr
Copy link
Member

Ouch. Thanks for reporting! I'll try to fix this as soon as possible.

danydoerr pushed a commit that referenced this issue Aug 6, 2023
@mjhubisz
Copy link

Hi,
I stumbled onto this after getting an error very much like ComparativeGenomicsToolkit/cactus#1123, but we are using newest release of cactus (via docker). I am still getting the same results as glenn posted here, can you check?

root@c0cdf4b8c2e2:/data# gfaffix --version
gfaffix 0.1.5
root@c0cdf4b8c2e2:/data# vg version
vg version v1.51.0 "Quellenhof"
Compiled with g++ (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0 on Linux
Linked against libstd++ 20230528
Built by anovak@courtyard.gi.ucsc.edu

root@c0cdf4b8c2e2:/data# wget -q http://public.gi.ucsc.edu/~hickey/debug/gfaffix-crash-aug4-2023/NW_017567117.1.vg.gfa.gz^C
root@c0cdf4b8c2e2:/data# gzip -d NW_017567117.1.vg.gfa.gz
root@c0cdf4b8c2e2:/data# vg validate NW_017567117.1.vg.gfa
graph: valid
root@c0cdf4b8c2e2:/data# gfaffix NW_017567117.1.vg.gfa --output_refined NW_017567117.1.vg.gfaffixed.gfa --check_transformation --dont_collapse GCF_0016612551* > /dev/null
root@c0cdf4b8c2e2:/data# vg validate NW_017567117.1.vg.gfaffixed.gfa
graph invalid: missing edge between 691th step (86210:1) and 692th step (86210:0) of path GCA_0193217651#0#JAHTLY010002216.1#0
graph invalid: missing edge between 692th step (86210:1) and 691th step (86210:1) of path GCA_0193217651#0#JAHTLY010002216.1#0
graph: invalid

@danydoerr
Copy link
Member

@mjhubisz Thanks for the report & the data. I'll have a look early next week.

@danydoerr
Copy link
Member

@mjhubisz Turns out the fix was reversed by subsequent commit a0395b5 and thus didn't made it into the release. It's a shame that this remained unnoticed for so long. Current main on git should work now, I'll push a release soon.

@mjhubisz
Copy link

Thanks so much!

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

No branches or pull requests

3 participants