Thanks for your reply, actually, I want to have many nodes Postion, I find user Can get this information from P or W lines in gfa file.
After constructing the graph pangenome with VG, how can I quickly transform the node information of the graph into the original linear reference coordinates (i.e., which sample a node comes from and its specific position)?
2 answers
You can use vg find -P for this. This command is not really designed to be used frequently throughout the genome (each invocation loads the entire graph into memory), but for a small-ish number of queries, it should be fine. You can also make multiple queries at a time by repeating the -n argument or writing them to a file and using -N.
Not directly. The P and W lines hold the list of nodes, but not the lengths of the node sequences. You would have to first build a map of node lengths from the S lines and then iterate over the nodes in the P/W line. I don't fully know your use case, but I think there's a pretty good chance it would be simpler and easier to prepare a file that lists the nodes you want to query than then use vg find -P -N.
Thanks , by W S lines, I get nodes Postion.
Log in to answer this question.