vg
tools for working with variation graphs
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
vg::GBWTTraversalFinder Class Reference

#include <traversal_finder.hpp>

Inheritance diagram for vg::GBWTTraversalFinder:
vg::TraversalFinder

Public Member Functions

 GBWTTraversalFinder (const HandleGraph &graph, const gbwt::GBWT &gbwt)
 
virtual ~GBWTTraversalFinder ()
 
virtual vector< SnarlTraversalfind_traversals (const Snarl &site)
 
virtual vector< Traversalfind_traversals (const handle_t &snarl_start, const handle_t &snarl_end)
 
virtual pair< vector< SnarlTraversal >, vector< vector< gbwt::size_type > > > find_gbwt_traversals (const Snarl &site, bool return_paths=true)
 
virtual pair< vector< Traversal >, vector< vector< gbwt::size_type > > > find_gbwt_traversals (const handle_t &snarl_start, const handle_t &snarl_end, bool return_paths=true)
 
virtual pair< vector< SnarlTraversal >, vector< gbwt::size_type > > find_path_traversals (const Snarl &site)
 
virtual pair< vector< Traversal >, vector< gbwt::size_type > > find_path_traversals (const handle_t &snarl_start, const handle_t &snarl_end)
 
const gbwt::GBWT & get_gbwt ()
 
- Public Member Functions inherited from vg::TraversalFinder
virtual ~TraversalFinder ()=default
 

Protected Member Functions

vector< pair< vector< gbwt::node_type >, gbwt::SearchState > > get_spanning_haplotypes (handle_t start, handle_t end)
 

Protected Attributes

const HandleGraphgraph
 
const gbwt::GBWT & gbwt
 

Detailed Description

Rerturn all traversals of a snarl that correspond to haplotypes stored in a GBWT

Constructor & Destructor Documentation

◆ GBWTTraversalFinder()

vg::GBWTTraversalFinder::GBWTTraversalFinder ( const HandleGraph graph,
const gbwt::GBWT &  gbwt 
)

◆ ~GBWTTraversalFinder()

vg::GBWTTraversalFinder::~GBWTTraversalFinder ( )
virtual

Member Function Documentation

◆ find_gbwt_traversals() [1/2]

pair< vector< Traversal >, vector< vector< gbwt::size_type > > > vg::GBWTTraversalFinder::find_gbwt_traversals ( const handle_t snarl_start,
const handle_t snarl_end,
bool  return_paths = true 
)
virtual

◆ find_gbwt_traversals() [2/2]

pair< vector< SnarlTraversal >, vector< vector< gbwt::size_type > > > vg::GBWTTraversalFinder::find_gbwt_traversals ( const Snarl site,
bool  return_paths = true 
)
virtual

Return the traversals, paired with their path identifiers in the gbwt. The traversals are unique, but there can be more than one path along each one (hence the vector)

◆ find_path_traversals() [1/2]

pair< vector< Traversal >, vector< gbwt::size_type > > vg::GBWTTraversalFinder::find_path_traversals ( const handle_t snarl_start,
const handle_t snarl_end 
)
virtual

◆ find_path_traversals() [2/2]

pair< vector< SnarlTraversal >, vector< gbwt::size_type > > vg::GBWTTraversalFinder::find_path_traversals ( const Snarl site)
virtual

Return traversals paired with path identifiers from the GBWT. The traversals are not unique (which is consistent with PathTraversalFinder) To get the sample name from the path identifier id, use gbwtgraph::get_path_sample_name();

◆ find_traversals() [1/2]

vector< Traversal > vg::GBWTTraversalFinder::find_traversals ( const handle_t snarl_start,
const handle_t snarl_end 
)
virtual

Reimplemented from vg::TraversalFinder.

◆ find_traversals() [2/2]

vector< SnarlTraversal > vg::GBWTTraversalFinder::find_traversals ( const Snarl site)
virtual

Implements vg::TraversalFinder.

◆ get_gbwt()

const gbwt::GBWT& vg::GBWTTraversalFinder::get_gbwt ( )
inline

◆ get_spanning_haplotypes()

vector<pair<vector<gbwt::node_type>, gbwt::SearchState> > vg::GBWTTraversalFinder::get_spanning_haplotypes ( handle_t  start,
handle_t  end 
)
protected

Breadth first search from the start to the end, only branching if there's a haplotype in the GBWT, and returning all unique haplotypes found.

Member Data Documentation

◆ gbwt

const gbwt::GBWT& vg::GBWTTraversalFinder::gbwt
protected

◆ graph

const HandleGraph& vg::GBWTTraversalFinder::graph
protected

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