ggonnella/gfapy

gfapy.error.NotFoundError: A link equivalent to ... does not exist

Opened this issue · 1 comments

Dear Giorgio

Thanks for your nice library!

I get this exception:

gfapy.error.NotFoundError: A link equivalent to:
L	edge_2	-	edge_1	+	*
does not exist, but is required by the following paths:
P	contig_4	edge_4+,edge_2-,edge_1+,edge_2+	*

When trying this .gfa file produced by Flye:

H	VN:Z:1.0
S	edge_1	GCCAGCCTAAGAAAGACGCAT	dp:i:1384
S	edge_2	CACGAACTGCACCTTTCAATT	dp:i:1370
S	edge_3	TATAGTCATAAATTATTAGTT	dp:i:453
S	edge_4	ACTTAGTGGTTTTGTATATTT	dp:i:858
L	edge_1	+	edge_2	+	0M	RC:i:1288
L	edge_2	+	edge_4	+	0M	RC:i:604
L	edge_2	+	edge_4	-	0M	RC:i:602
L	edge_3	+	edge_3	+	0M	RC:i:0
L	edge_3	-	edge_3	-	0M	RC:i:0
P	contig_3	edge_3+	*
P	contig_4	edge_4+,edge_2-,edge_1+,edge_2+	*

assembly graph (gfaviz)

Is this a Flye or a gfapy bug? (Made the plot using gfaviz which didn't complain.)

Could you perhaps change from an exception to printing a mere warning? This is my ugly monkey patch that allows me to continue working:

image