vg
tools for working with variation graphs
Loading...
Searching...
No Matches
vg::WFATree Class Reference

Classes

struct  ScoreProperties

Public Member Functions

 WFATree (const gbwtgraph::GBWTGraph &graph, const std::string &sequence, pos_t from, pos_t to, const Aligner &aligner, const WFAExtender::ErrorModel &error_model)
std::uint32_t size () const
uint32_t parent (std::uint32_t node) const
std::int32_t gap_extend_penalty (std::uint32_t length) const
std::int32_t gap_penalty (std::uint32_t length) const
void extend (std::int32_t score)
std::int32_t next_score (std::int32_t match_score)
void next (std::int32_t score)
std::pair< MatchPos, WFAAlignment::Edit > ins_predecessor (uint32_t node, int32_t score, int32_t diagonal) const
std::pair< MatchPos, WFAAlignment::Edit > del_predecessor (uint32_t node, int32_t score, int32_t diagonal) const
std::pair< MatchPos, WFAAlignment::Edit > match_predecessor (uint32_t node, int32_t score, int32_t diagonal) const
void successor_offset (MatchPos &pos) const
void predecessor_offset (uint32_t &node, uint32_t &offset) const
void trim (const Aligner &aligner)

Static Public Member Functions

static bool is_root (std::uint32_t node)
static bool no_pos (pos_t pos)

Public Attributes

const gbwtgraph::CachedGBWTGraph graph
const std::string & sequence
pos_t from
pos_t to
std::vector< WFANode > nodes
WFAPoint candidate_point
std::uint32_t candidate_node
std::int32_t mismatch
std::int32_t gap_open
std::int32_t gap_extend
std::int32_t score_bound
std::int32_t max_distance
std::int32_t min_distance
std::map< std::int32_t, ScoreProperties > possible_scores

Private Member Functions

void extend_over (std::int32_t score, std::int32_t diagonal, const std::vector< std::uint32_t > &leaves)
std::vector< std::uint32_t > get_leaves () const
std::pair< std::int32_t, std::int32_t > update_diagonal_range (std::pair< std::int32_t, std::int32_t > range, std::int32_t score) const
std::pair< int32_t, int32_t > get_diagonals (int32_t score)
void expand_if_necessary (const MatchPos &pos)
MatchPos find_pos (size_t type, uint32_t node, int32_t score, int32_t diagonal, bool extendable_seq, bool extendable_graph) const
bool at_dead_end (const MatchPos &pos) const

Static Private Member Functions

static void adjust_diagonal_range (std::pair< std::int32_t, std::int32_t > &range, std::int32_t diagonal)
static std::pair< int32_t, int32_t > empty_diagonal_range ()

Constructor & Destructor Documentation

◆ WFATree()

vg::WFATree::WFATree ( const gbwtgraph::GBWTGraph & graph,
const std::string & sequence,
pos_t from,
pos_t to,
const Aligner & aligner,
const WFAExtender::ErrorModel & error_model )
inline

Member Function Documentation

◆ adjust_diagonal_range()

void vg::WFATree::adjust_diagonal_range ( std::pair< std::int32_t, std::int32_t > & range,
std::int32_t diagonal )
inlinestaticprivate

◆ at_dead_end()

bool vg::WFATree::at_dead_end ( const MatchPos & pos) const
inlineprivate

◆ del_predecessor()

std::pair< MatchPos, WFAAlignment::Edit > vg::WFATree::del_predecessor ( uint32_t node,
int32_t score,
int32_t diagonal ) const
inline

◆ empty_diagonal_range()

std::pair< int32_t, int32_t > vg::WFATree::empty_diagonal_range ( )
inlinestaticprivate

◆ expand_if_necessary()

void vg::WFATree::expand_if_necessary ( const MatchPos & pos)
inlineprivate

◆ extend()

void vg::WFATree::extend ( std::int32_t score)
inline

◆ extend_over()

void vg::WFATree::extend_over ( std::int32_t score,
std::int32_t diagonal,
const std::vector< std::uint32_t > & leaves )
inlineprivate

◆ find_pos()

MatchPos vg::WFATree::find_pos ( size_t type,
uint32_t node,
int32_t score,
int32_t diagonal,
bool extendable_seq,
bool extendable_graph ) const
inlineprivate

◆ gap_extend_penalty()

std::int32_t vg::WFATree::gap_extend_penalty ( std::uint32_t length) const
inline

◆ gap_penalty()

std::int32_t vg::WFATree::gap_penalty ( std::uint32_t length) const
inline

◆ get_diagonals()

std::pair< int32_t, int32_t > vg::WFATree::get_diagonals ( int32_t score)
inlineprivate

◆ get_leaves()

std::vector< std::uint32_t > vg::WFATree::get_leaves ( ) const
inlineprivate

◆ ins_predecessor()

std::pair< MatchPos, WFAAlignment::Edit > vg::WFATree::ins_predecessor ( uint32_t node,
int32_t score,
int32_t diagonal ) const
inline

◆ is_root()

bool vg::WFATree::is_root ( std::uint32_t node)
inlinestatic

◆ match_predecessor()

std::pair< MatchPos, WFAAlignment::Edit > vg::WFATree::match_predecessor ( uint32_t node,
int32_t score,
int32_t diagonal ) const
inline

◆ next()

void vg::WFATree::next ( std::int32_t score)
inline

◆ next_score()

std::int32_t vg::WFATree::next_score ( std::int32_t match_score)
inline

◆ no_pos()

bool vg::WFATree::no_pos ( pos_t pos)
inlinestatic

◆ parent()

uint32_t vg::WFATree::parent ( std::uint32_t node) const
inline

◆ predecessor_offset()

void vg::WFATree::predecessor_offset ( uint32_t & node,
uint32_t & offset ) const
inline

◆ size()

std::uint32_t vg::WFATree::size ( ) const
inline

◆ successor_offset()

void vg::WFATree::successor_offset ( MatchPos & pos) const
inline

◆ trim()

void vg::WFATree::trim ( const Aligner & aligner)
inline

◆ update_diagonal_range()

std::pair< std::int32_t, std::int32_t > vg::WFATree::update_diagonal_range ( std::pair< std::int32_t, std::int32_t > range,
std::int32_t score ) const
inlineprivate

Member Data Documentation

◆ candidate_node

std::uint32_t vg::WFATree::candidate_node

◆ candidate_point

WFAPoint vg::WFATree::candidate_point

◆ from

pos_t vg::WFATree::from

◆ gap_extend

std::int32_t vg::WFATree::gap_extend

◆ gap_open

std::int32_t vg::WFATree::gap_open

◆ graph

const gbwtgraph::CachedGBWTGraph vg::WFATree::graph

◆ max_distance

std::int32_t vg::WFATree::max_distance

◆ min_distance

std::int32_t vg::WFATree::min_distance

◆ mismatch

std::int32_t vg::WFATree::mismatch

◆ nodes

std::vector<WFANode> vg::WFATree::nodes

◆ possible_scores

std::map<std::int32_t, ScoreProperties> vg::WFATree::possible_scores

◆ score_bound

std::int32_t vg::WFATree::score_bound

◆ sequence

const std::string& vg::WFATree::sequence

◆ to

pos_t vg::WFATree::to

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