vg: How to find node Position and source(sample) ?
1
0
Entering edit mode
5 months ago

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)?

vg • 714 views
ADD COMMENT
1
Entering edit mode
4 months ago

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.

ADD COMMENT
0
Entering edit mode

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.

ADD REPLY
0
Entering edit mode

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.

ADD REPLY

Login before adding your answer.

Traffic: 1619 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6