pangenome / odgi

Optimized Dynamic Genome/Graph Implementation: understanding pangenome graphs
https://doi.org/10.1093/bioinformatics/btac308
MIT License
194 stars 39 forks source link

Is odgi overlap optimized for reciprocal overlaps? #502

Open cgroza opened 1 year ago

cgroza commented 1 year ago

Hi,

Currently comparing a large number of paths in a pangenome graph. If odgi overlap knows that A overlaps B, will it skip checking if B overlaps A? I looked at the source code and from what I gather it seems like it will but I could be wrong.

Just looks like a quick optimization that could save a lot of time when comparing large number of paths.

AndreaGuarracino commented 1 year ago

Hi @cgroza, odgi overlap does not keep this kind of memory, so there is no such optimization. It would be achievable by increasing the memory usage while keeping all already detected pairs in memory.

cgroza commented 1 year ago

I see, maybe there could be a memory efficient way to store this in memory (like a pair of integers). Then, odgi would not output a full matrix, but a sparse one? This is most useful for comparing large numbers of paths on a pangenome. I am thinking sets of epigenomic annotations on a pangenome.