vg
tools for working with variation graphs
Namespaces | Typedefs | Functions
types.hpp File Reference
#include <cstdint>
#include <iostream>
#include <tuple>
#include <handlegraph/types.hpp>

Namespaces

 vg
 

Typedefs

typedef handlegraph::nid_t vg::id_t
 
typedef size_t vg::off_t
 
typedef std::tuple< id_t, bool, off_t > vg::pos_t
 

Functions

pos_t vg::make_pos_t (id_t id, bool is_rev, off_t off)
 Create a pos_t from a Node ID, an orientation flag, and an offset along that strand of the node. More...
 
id_t vg::id (const pos_t &pos)
 Extract the id of the node a pos_t is on. More...
 
bool vg::is_rev (const pos_t &pos)
 Return true if a pos_t is on the reverse strand of its node. More...
 
off_t vg::offset (const pos_t &pos)
 Get the offset along the selected strand of the node from a pos_t. More...
 
id_t & vg::get_id (pos_t &pos)
 Get a reference to the Node ID of a pos_t. More...
 
bool & vg::get_is_rev (pos_t &pos)
 Get a reference to the reverse flag of a pos_t. More...
 
off_t & vg::get_offset (pos_t &pos)
 Get a reference to the offset field of a pos_t, which counts along the selected strand of the node. More...
 
bool vg::is_empty (const pos_t &pos)
 Return true if a pos_t is unset. More...
 
pos_t vg::reverse (const pos_t &pos, size_t node_length)
 
pos_t vg::reverse_base_pos (const pos_t &pos, size_t node_length)
 Reverse a pos_t and get a pos_t at the same base, going the other direction. More...
 
std::ostream & vg::operator<< (std::ostream &out, const pos_t &pos)
 Print a pos_t to a stream. More...
 

Detailed Description

Contains typedefs for basic types useful for talking about graphs and basic operations using them.