vg
tools for working with variation graphs
Public Attributes | List of all members
vg::Position Struct Reference

Public Attributes

int64 node_id = 1
 The Node on which the Position is. More...
 
int64 offset = 2
 The offset into that node's sequence at which the Position occurs. More...
 
bool is_reverse = 4
 True if we obtain the original sequence of the path by reverse complementing the mappings. More...
 
string name = 5
 If the position is used to represent a position against a reference path. More...
 

Detailed Description

A position in the graph is a node, direction, and offset. The node is stored by ID, and the offset is 0-based and counts from the start of the node in the specified orientation. The direction specifies which orientation of the node we are considering, the forward (as stored) or reverse complement.

Example:

seq+        G A T T A C A
offset+  → 0 1 2 3 4 5 6 7

seq-        C T A A T G T
offset-  → 0 1 2 3 4 5 6 7

Or both at once:

offset-    7 6 5 4 3 2 1 0 ←
seq+        G A T T A C A
offset+  → 0 1 2 3 4 5 6 7

A Position can also, with the name and offset fields, be used to represent a distance along a named Path. TODO: Is this an appropriate hack? Or should we add a new message?

Member Data Documentation

◆ is_reverse

bool vg::Position::is_reverse = 4

True if we obtain the original sequence of the path by reverse complementing the mappings.

◆ name

string vg::Position::name = 5

If the position is used to represent a position against a reference path.

◆ node_id

int64 vg::Position::node_id = 1

The Node on which the Position is.

◆ offset

int64 vg::Position::offset = 2

The offset into that node's sequence at which the Position occurs.


The documentation for this struct was generated from the following file: