neherlab / pangraph

A bioinformatic toolkit to align genome assemblies into pangenome graphs
https://neherlab.github.io/pangraph
MIT License
87 stars 7 forks source link

Is there any plan to add annotations to the block/horizontal alignments? #61

Open bhargava-morampalli opened 11 months ago

bhargava-morampalli commented 11 months ago

Hello,

I am trying to look at the upstream and downstream features around an AMR gene. I managed to get the block alignments but is there a way to get annotations from prokka into the plots? If you don't have bandwidth right now - please point to a starting point to how I can visualise the annotations if you can. That would be really helpful.

Thank you.

mmolari commented 11 months ago

Hi @bhargava-morampalli, thanks for reaching out. Adding annotations to the pangraph is indeed one of the main improvements we're planning on adding. Unfortunately we're not there yet, but in the meantime I can point you to some resources. The main one is the excellent mobile-gene-regions pipeline by @liampshaw, In particular the script plot_linear_blocks_altair.py can be used to generate visualizations like these (note that you can overlay annotations). If you want to interact with the graphs yourself and create your own script to add annotations, we have a python library to load and extract information from the graphs: pypangraph. Here you can retrieve the position of a given block in the genome coordinates using the block.alignment.pos dictionary, and connect this with your annotations. I'll keep this issue open and give you an update when we have a better working solution for annotations. In the meantime let me know if this is helpful! Cheers! Marco

liampshaw commented 11 months ago

Thanks @mmolari !

FYI for others who might follow this, @bhargava-morampalli also raised an issue on the mobile-gene-regions pipeline mentioned, regarding an error to do with calling pangraph - I don't understand what is going on but will investigate this week.