vgteam / vg

tools for working with genome variation graphs
https://biostars.org/tag/vg/
Other
1.08k stars 191 forks source link

I have a question about vg's GAM file. #4202

Closed pioneer-pi closed 2 months ago

pioneer-pi commented 6 months ago

In GAM file, each line represent the result of one sequence map to variation graph. In it, there is a field called "from_length", a field called "to_length", What's meaning of these two fields? In addition, if you have a file that state the detail of gam file about each field's meaning? Hope for replying, thank you.

The next is a example of sequence mapping result format: {"identity": 0.98999999999999999, "name": "09738cc9531622e0", "path": {"mapping": [ {"edit": [{"from_length": 4, "to_length": 4}], "position": {"is_reverse": true, "node_id": "180", "offset": "6"}}, {"edit": [{"from_length": 1, "to_length": 1}], "position": {"is_reverse": true, "node_id": "178"}}, {"edit": [{"from_length": 10, "to_length": 10}], "position": {"is_reverse": true, "node_id": "177"}}, {"edit": [{"from_length": 1, "to_length": 1}], "position": {"is_reverse": true, "node_id": "175"}}, {"edit": [{"from_length": 16, "to_length": 16}], "position": {"is_reverse": true, "node_id": "174"}}, {"edit": [{"from_length": 1, "to_length": 1}], "position": {"is_reverse": true, "node_id": "173"}}, {"edit": [{"from_length": 1, "to_length": 1}], "position": {"is_reverse": true, "node_id": "172"}}, {"edit": [{"from_length": 1, "to_length": 1}], "position": {"is_reverse": true, "node_id": "170"}}, {"edit": [{"from_length": 1, "to_length": 1}], "position": {"is_reverse": true, "node_id": "168"}}, {"edit": [{"from_length": 30, "to_length": 30}], "position": {"is_reverse": true, "node_id": "167"}}, {"edit": [{"from_length": 1, "to_length": 1}], "position": {"is_reverse": true, "node_id": "165"}}, {"edit": [{"from_length": 3, "to_length": 3}], "position": {"is_reverse": true, "node_id": "164"}}, {"edit": [{"from_length": 1, "to_length": 1}], "position": {"is_reverse": true, "node_id": "162"}}, {"edit": [{"from_length": 4, "to_length": 4}, {"sequence": "T", "to_length": 1}, {"from_length": 5, "to_length": 5}], "position": {"is_reverse": true, "node_id": "161"}}, {"edit": [{"from_length": 1, "to_length": 1}], "position": {"is_reverse": true, "node_id": "159"}}, {"edit": [{"from_length": 17, "to_length": 17}], "position": {"is_reverse": true, "node_id": "158"}}, {"edit": [{"from_length": 1, "to_length": 1}], "position": {"is_reverse": true, "node_id": "157"}}]}, " refpos": [{"is_reverse": true, "name": "x", "offset": "794"}], "score": 103, "sequence": "ACAATAAGAGAGCAGCGGTTCATTCCTGGACATATGAGACAAATGAACAATTGAGGGAAAGAGCAGGTTCCGGAATAGATTCGGTAACAGTAAAGATAAG"}

glennhickey commented 6 months ago

See vg.proto for the specification.

pioneer-pi commented 6 months ago

@glennhickey Thank you

pioneer-pi commented 6 months ago

@glennhickey Is it possible that in GAM line, one line edit has no from_length field, it only has to_length field, like the second field of the following sentence: {"edit": [{"from_length": 3, "to_length": 3}, {"sequence": "T", "to_length": 1}, {"from_length": 27, "to_length": 27}], "position": {"is_reverse": true, "node_id": "167"}}

glennhickey commented 6 months ago

If a field is missing it is assumed "0".