pmelsted / bifrost

Bifrost: Highly parallel construction and indexing of colored and compacted de Bruijn graphs
BSD 2-Clause "Simplified" License
204 stars 25 forks source link

Update a k-mer #49

Closed LucasBarbosaRocha closed 2 years ago

LucasBarbosaRocha commented 3 years ago

Hey, Guillaume...

You developed Bifrost for De Bruijn graphs and as a researcher of this type of graph, could you answer a question for me?

I have a graph of De Bruijn and I want to perform the editing operations (substitution, insertion, deletion) on the labels of the vertices in the De Bruijn graph.

How should I proceed? What would you think about that? Do I change a label and propagate to the other labels (at other vertices)? Will your Bifrost tool perform this type of operation in the future?

Any help will be appreciated.

Best Wishes, Lucas B. Rocha

GuillaumeHolley commented 2 years ago

Hi @LucasBarbosaRocha,

Bifrost does not support editing the sequence in the nodes of the graph because changing these sequences would change the topology of the graph itself. If you really need to change the sequence of a unitig, you must delete the unitig from the graph and reinsert its edited sequence (using CompactedDBG::add() and CompactedDBG::remove()). Bear in mind that using these operations can (and most likely will) change the topology of the graph. I am not planning to add edit operations of the unitig sequences in the future.

Best, Guillaume