vg
tools for working with variation graphs
Namespaces | Classes | Typedefs | Functions
xg Namespace Reference

Namespaces

 temp_file
 

Classes

class  XG
 
class  XGFormatError
 
class  XGPath
 

Typedefs

using nid_t = handlegraph::nid_t
 
typedef std::tuple< nid_t, bool, size_t > pos_t
 

Functions

int dna3bit (char c)
 
char revdna3bit (int i)
 
int get_thread_count (void)
 Uses OMP to get the count of threads. More...
 
pos_t make_pos_t (const nid_t &id, bool is_rev, const size_t &off)
 
nid_t id (const pos_t &pos)
 Extract the id of the node a pos_t is on. More...
 
bool is_rev (const pos_t &pos)
 Return true if a pos_t is on the reverse strand of its node. More...
 
size_t offset (const pos_t &pos)
 Get the offset along the selected strand of the node from a pos_t. More...
 
nid_tget_id (pos_t &pos)
 Get a reference to the Node ID of a pos_t. More...
 
bool & get_is_rev (pos_t &pos)
 Get a reference to the reverse flag of a pos_t. More...
 
size_t & 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 is_empty (const pos_t &pos)
 Return true if a pos_t is unset. More...
 
pos_t reverse (const pos_t &pos, size_t node_length)
 
pos_t 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 & operator<< (std::ostream &out, const pos_t &pos)
 Print a pos_t to a stream. More...
 
char reverse_complement (const char &c)
 
std::string reverse_complement (const std::string &seq)
 
void reverse_complement_in_place (std::string &seq)
 

Typedef Documentation

◆ nid_t

using xg::nid_t = typedef handlegraph::nid_t

◆ pos_t

typedef std::tuple<nid_t, bool, size_t> xg::pos_t

Function Documentation

◆ dna3bit()

int xg::dna3bit ( char  c)

◆ get_id()

nid_t& xg::get_id ( pos_t pos)
inline

Get a reference to the Node ID of a pos_t.

◆ get_is_rev()

bool& xg::get_is_rev ( pos_t pos)
inline

Get a reference to the reverse flag of a pos_t.

◆ get_offset()

size_t& xg::get_offset ( pos_t pos)
inline

Get a reference to the offset field of a pos_t, which counts along the selected strand of the node.

◆ get_thread_count()

int xg::get_thread_count ( void  )

Uses OMP to get the count of threads.

◆ id()

nid_t xg::id ( const pos_t pos)
inline

Extract the id of the node a pos_t is on.

◆ is_empty()

bool xg::is_empty ( const pos_t pos)
inline

Return true if a pos_t is unset.

◆ is_rev()

bool xg::is_rev ( const pos_t pos)
inline

Return true if a pos_t is on the reverse strand of its node.

◆ make_pos_t()

pos_t xg::make_pos_t ( const nid_t id,
bool  is_rev,
const size_t &  off 
)
inline

◆ offset()

size_t xg::offset ( const pos_t pos)
inline

Get the offset along the selected strand of the node from a pos_t.

◆ operator<<()

std::ostream& xg::operator<< ( std::ostream &  out,
const pos_t pos 
)
inline

Print a pos_t to a stream.

◆ revdna3bit()

char xg::revdna3bit ( int  i)

◆ reverse()

pos_t xg::reverse ( const pos_t pos,
size_t  node_length 
)
inline

Reverse a pos_t and get a pos_t at the same point between bases, going the other direction. To get a pos_t to the same base, subtract 1 from the resulting offset or call reverse_base_pos().

◆ reverse_base_pos()

pos_t xg::reverse_base_pos ( const pos_t pos,
size_t  node_length 
)
inline

Reverse a pos_t and get a pos_t at the same base, going the other direction.

◆ reverse_complement() [1/2]

char xg::reverse_complement ( const char &  c)
inline

◆ reverse_complement() [2/2]

std::string xg::reverse_complement ( const std::string &  seq)
inline

◆ reverse_complement_in_place()

void xg::reverse_complement_in_place ( std::string &  seq)
inline