odgi: Error when sorting the graph using -Y option
Dear developers, Thank you so much for this tool!
I created a pangenome of Arabidopsis following the minigraph-cactus pangenome pipeline. Then, I installed odgi using conda to visualise the pangenome graph. The output of the minigraph-cactus pipeline is a .gfa.gz file that was unizipped to create the .og file using the following command:
odgi build -g Arabidopsis_pg/Arabidopsis_pg.gfa -o odgi/Arabidopsis_pg.og -t 20 -P -O
I first tried to visualise the output as follows:
odgi viz -i odgi/Arabidopsis_pg.og -o odgi/Arabidopsis_pg.png
And this is the output:

Then, I tried to sort the graph, in order to see if a better visualisation is possible, but this is the error that I got using the -Y option for sorting:
odgi sort -i odgi/Arabidopsis_pg.og -t 20 -P -Y -o odgi/Arabidopsis_pg_sorted.og odgi: /opt/conda/conda-bld/odgi_1657286605938/work/build/sdsl-lite-prefix/src/sdsl-lite-build/include/sdsl/int_vector.hpp:1360: sdsl::int_vector<<anonymous> >::reference sdsl::int_vector<<anonymous> >::operator[](const size_type&) [with unsigned char t_width = 1; sdsl::int_vector<<anonymous> >::reference = sdsl::int_vector_reference<sdsl::int_vector<1> >; sdsl::int_vector<<anonymous> >::size_type = long unsigned int]: Assertion idx < this->size()’ failed.
Aborted (core dumped)
`
When I try to randomly sort the graph (-r option), it works, but the output looks very strange:
odgi sort -i odgi/Arabidopsis_pg.og -t 20 -O -P -r -o odgi/Arabidopsis_pg_random_sorted.og

Do you have any idea about what can be the issue? Am I missing something in the steps to follow?
Thank you so much in advance for any help!
Cheers,
Lia
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 36 (19 by maintainers)
Hello @subwaystation,
You were correct. It turned out to be the problem of the GFA version. I haven’t tried the
odgi sortdeeply but a basic test with-Yworked when GFA v1.0 was used.And also thank you @glennhickey for the suggestion. I’m using a older version of cactus-pangenome but I will explore it.
Many thanks, Shangzhe
Please also note that minigraph-cactus can now produce ODGI output directly with
--chrom-ogfor chromosome graphs and/or--odgifor the full genome graph.Awesome! Thanks for your trials!