maickrau / GraphAligner

MIT License
256 stars 30 forks source link

core dumped #14

Closed csuzhang closed 2 years ago

csuzhang commented 4 years ago

Hi I got an error: "GraphAligner: src/GfaGraph.cpp:270: static GfaGraph GfaGraph::LoadFromStream(std::istream&, bool): Assertion `dummyc == 'M'' failed. Aborted (core dumped)" when running the command

GraphAligner -g athal_wtdbg2.gfa -f athal.fastq.gz -a athal.json where athal_wtdbg.gfa was generated by https://github.com/ruanjue/wtdbg2/blob/master/scripts/wtdbg-dot2gfa.pl with the command gzip -dc athal_wtdbg.ctg.dot.gz | wtdbg-dot2gfa.pl > athal_wtdbg.gfa

maickrau commented 4 years ago

Hi,

The graph loading didn't expect soft clips in the edge overlap, the crash is fixed in 466a7db but the graphs still can't be used in GraphAligner.

The script produces nodes whose sequence is *, which is not currently supported, see #12. I can't see from the script where it takes the sequence from and as far as I can tell it's not the same as in the final contig fasta, so I don't know where you could get the sequences.

ekg commented 4 years ago

You can reduce the overlaps with gimbricate: https://github.com/ekg/gimbricate and seqwish https://github.com/ekg/seqwish.

The nodes will need to be defined as sequences though, and the overlaps should be approximately correct.

This is the procedure:

gimbricate -g h.gfa -n -p h.paf -f h.fasta >h.gimbry.gfa
seqwish -s h.fasta -p h.paf -g h.seqwish.gfa
maickrau commented 2 years ago

Newest version checks that the graph file has appropriate overlaps and prints a useful error message instead of crashing with a mysterious message. If you get other errors please open a new issue.