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

collapse/combine/edit path names of existing graph? #463

Open dduchen opened 1 year ago

dduchen commented 1 year ago

Hello, This is similar to a previous issue ' Using ODGI to remove complex regions #427 ', in which I'm also following the tutorial to remove complex regions from the HPRC pangenome graph: https://odgi.readthedocs.io/en/latest/rst/tutorials/remove_artifacts_and_complex_regions.html

After odgi extract, and odgi explode, the largest component .og has many newly added paths - even of the full-length reference paths I retained during the odgi extract - for example, retaining both GRCh38 + CHM13 reference paths: grch38#chr14:0-18711332 grch38#chr14:18862644-107043718 grch38#chr14:0-106883718 grch38#chr14:0-19511713 grch38#chr14:19611713-107043718 grch38#chr14:18223528-107043718 chm13#chr14:634979-101161492 chm13#chr14:31287-101161492 chm13#chr14:0-11328345 chm13#chr14:0-10089847 chm13#chr14:11183936-101161492 chm13#chr14:0-2206860 chm13#chr14:11327303-101161492 chm13#chr14:2386765-101161492 chm13#chr14:2812197-101161492 chm13#chr14:0-12628 chm13#chr14:0-11183943 chm13#chr14:0-207371 chm13#chr14:12702349-101161492 chm13#chr14:0-2395653

Are all included as separate paths in the resultant sorted .og graph.

Is there a recommended way to combine/collapse the paths of the same sample, either via odgi or vg? Separately - if I want to exclude the coordinate positions from a named path later on, is there a way to edit path names embedded within an existing graph?

Thanks!

malearimond commented 1 year ago

Hi, I have the same problem that I used odgi extract and all the new path names include the coordinates with a colon so I cant use them as an input for Sequence Tube Map. Did you already found a way to change the name of the paths? Thanks in advance for your help! Best regards Male