vg
tools for working with variation graphs
Public Member Functions | Private Attributes | Friends | List of all members
vg::PhasedGenome::Haplotype Class Reference

#include <phased_genome.hpp>

Public Member Functions

 Haplotype (NodeTraversal node_traversal)
 Construct a haplotype with a single node. More...
 
template<typename NodeTraversalIterator >
 Haplotype (NodeTraversalIterator first, NodeTraversalIterator last)
 Construct a haplotype with an iterator that yields NodeTraversals. More...
 
 ~Haplotype ()
 
HaplotypeNodeappend_left (NodeTraversal node_traversal)
 
HaplotypeNodeappend_right (NodeTraversal node_traversal)
 

Private Attributes

PhasedGenome::HaplotypeNodeleft_telomere_node
 Leftmost node in walk. More...
 
PhasedGenome::HaplotypeNoderight_telomere_node
 Rightmost node in walk. More...
 
unordered_map< const Snarl *, pair< HaplotypeNode *, HaplotypeNode * > > sites
 

Friends

class PhasedGenome
 
class HaplotypeNode
 

Detailed Description

Specialized linked list that tracks a walk through the variation graph and maintains an index of sites.

Constructor & Destructor Documentation

◆ Haplotype() [1/2]

vg::PhasedGenome::Haplotype::Haplotype ( NodeTraversal  node_traversal)

Construct a haplotype with a single node.

◆ Haplotype() [2/2]

template<typename NodeTraversalIterator >
vg::PhasedGenome::Haplotype::Haplotype ( NodeTraversalIterator  first,
NodeTraversalIterator  last 
)

Construct a haplotype with an iterator that yields NodeTraversals.

◆ ~Haplotype()

vg::PhasedGenome::Haplotype::~Haplotype ( )

Member Function Documentation

◆ append_left()

PhasedGenome::HaplotypeNode * vg::PhasedGenome::Haplotype::append_left ( NodeTraversal  node_traversal)
inline

Add a haplotype node for this node traversal to left end of haplotye and return new node. Does not maintain indices; intended for use by the PhasedGenome for initial haplotype build.

◆ append_right()

PhasedGenome::HaplotypeNode * vg::PhasedGenome::Haplotype::append_right ( NodeTraversal  node_traversal)
inline

Add a haplotype node for this node traversal to right end of haplotye and return new node. Does not maintain indices; intended for use by the PhasedGenome for initial haplotype build.

Friends And Related Function Documentation

◆ HaplotypeNode

friend class HaplotypeNode
friend

◆ PhasedGenome

friend class PhasedGenome
friend

Member Data Documentation

◆ left_telomere_node

PhasedGenome::HaplotypeNode* vg::PhasedGenome::Haplotype::left_telomere_node
private

Leftmost node in walk.

◆ right_telomere_node

PhasedGenome::HaplotypeNode* vg::PhasedGenome::Haplotype::right_telomere_node
private

Rightmost node in walk.

◆ sites

unordered_map<const Snarl*, pair<HaplotypeNode*, HaplotypeNode*> > vg::PhasedGenome::Haplotype::sites
private

Index of the location in the haplotype of nested sites. Locations of sites are stored as the nodes on haplotype that correspond to the start and end node of the site. The pair of haplotype nodes is stored in left-to-right order along the haplotype (i.e. .first->prev and .second->next are outside the bubble).


The documentation for this class was generated from the following files: