Steps followed: I have a pangenome constructed. I have the graphs in gbz, xg formats and have used them downstream. Now for visualization, I have used odgi for 1d visualisation as follows: Step 1: convert to gfa for odgi to use
vg view -g pangenome_graph.giraffe.gbz > pangenome_graph.vis.gfa
or
vg convert -f pangenome_graph.giraffe.gbz > pangenome_graph.vis.gfa
or
vg convert pangenome_graph.giraffe.gbz \
--rgfa-path Pseudomolecule_01 \
--rgfa-path Pseudomolecule_02 \
--rgfa-path Pseudomolecule_03 \
--rgfa-path Pseudomolecule_04 \
--rgfa-path Pseudomolecule_05 \
--rgfa-path Pseudomolecule_06 \
--rgfa-path Pseudomolecule_07 \
--rgfa-path Pseudomolecule_08 \
--rgfa-path Pseudomolecule_09 \
--rgfa-path Pseudomolecule_10 \
--rgfa-path Pseudomolecule_11 \
--rgfa-path Pseudomolecule_12 \
--rgfa-path Pseudomolecule_13 \
--rgfa-path Pseudomolecule_14 \
--rgfa-path Pseudomolecule_15 \
--rgfa-path Pseudomolecule_16 \
--rgfa-path Pseudomolecule_17 \
--rgfa-path Pseudomolecule_18 \
--rgfa-path Pseudomolecule_19 \
-f > pangenome_graph_filtered.gfa
Step 2: convert to odgi format og
odgi build -g /data/pangenome_graph_filtered.gfa -o /data/pangenome_graph_filtered.vis.og
Step 3: visualize
odgi viz -i /data/pangenome_graph_filtered.vis.og -o /data/pangenome_graph_filtered.vis.png
Outputs: Following the first command in step 1 gave a graph with both Pseudomolecules and Scaffolds but smaller file size. The second command gave a similar graph just larger file size.
The third command removed all the Pseudomolecules and retained only Scaffolds.
Expected output: Retain only the Pseudomolecules_01 through 19 and remove all the Scaffolds_000 through 917. I am trying to create output like the ones here: https://zenodo.org/records/8288999
How do I go about doing this? I have tried vg paths also, but not able to filter it the way I want.
Note: I saw I can extract a subgraph as shown here (https://github.com/vgteam/vg/wiki/Visualization) but don't know how to use it since I have numerous 'n' no of node IDs.
For reference: vg convert
vg view
vg paths
odgi build
odgi viz