vg
tools for working with variation graphs
Loading...
Searching...
No Matches
vg::GaplessExtension Struct Reference

#include <gbwt_extender.hpp>

Public Types

typedef std::pair< handle_t, int64_t > seed_type
 

Public Member Functions

size_t length () const
 Length of the extension.
 
bool empty () const
 Is the extension empty?
 
bool full () const
 Is the extension a full-length alignment?
 
bool exact () const
 Is the extension an exact match?
 
size_t mismatches () const
 Number of mismatches in the extension.
 
bool contains (const HandleGraph &graph, seed_type seed) const
 Does the extension contain the seed?
 
Position starting_position (const HandleGraph &graph) const
 Return the starting position of the extension.
 
Position tail_position (const HandleGraph &graph) const
 Return the position after the extension.
 
size_t tail_offset (const HandleGraph &graph) const
 Return the node offset after the extension.
 
size_t overlap (const HandleGraph &graph, const GaplessExtension &another) const
 Number of shared (read position, graph position) pairs in the extensions.
 
GaplessExtension prefix (size_t prefix_length) const
 Take a prefix of the extension as a new GaplessExtension object.
 
Path to_path (const HandleGraph &graph, const std::string &sequence) const
 Convert the extension into a Path. The sequence should be the full read-space sequence.
 
bool operator< (const GaplessExtension &another) const
 For priority queues.
 
bool operator== (const GaplessExtension &another) const
 
bool operator!= (const GaplessExtension &another) const
 Two extensions are not equal if the state, the read interval, or the node offset is different.
 

Public Attributes

std::vector< handle_tpath
 
size_t offset
 
gbwt::BidirectionalState state
 
std::pair< size_t, size_t > read_interval
 
std::vector< size_t > mismatch_positions
 
int32_t score
 
bool left_full
 
bool right_full
 
bool left_maximal
 
bool right_maximal
 
uint32_t internal_score
 
uint32_t old_score
 

Detailed Description

A result of the gapless extension of a seed.

  • The extension is a path starting from offset 'offset' of node path.front().
  • Search state 'state' corresponds to the path.
  • The extension covers semiopen interval [read_interval.first, read_interval.second) of the read.
  • Vector 'mismatch_positions' contains the mismatching read positions in sorted order.
  • 'score' is an alignment score (bigger is better).
  • Flags 'left_full' and 'right_full' indicate whether the extension covers the start/end of the read.

Member Typedef Documentation

◆ seed_type

Member Function Documentation

◆ contains()

bool vg::GaplessExtension::contains ( const HandleGraph & graph,
seed_type seed ) const

Does the extension contain the seed?

◆ empty()

bool vg::GaplessExtension::empty ( ) const
inline

Is the extension empty?

◆ exact()

bool vg::GaplessExtension::exact ( ) const
inline

Is the extension an exact match?

◆ full()

bool vg::GaplessExtension::full ( ) const
inline

Is the extension a full-length alignment?

◆ length()

size_t vg::GaplessExtension::length ( ) const
inline

Length of the extension.

◆ mismatches()

size_t vg::GaplessExtension::mismatches ( ) const
inline

Number of mismatches in the extension.

◆ operator!=()

bool vg::GaplessExtension::operator!= ( const GaplessExtension & another) const
inline

Two extensions are not equal if the state, the read interval, or the node offset is different.

◆ operator<()

bool vg::GaplessExtension::operator< ( const GaplessExtension & another) const
inline

For priority queues.

◆ operator==()

bool vg::GaplessExtension::operator== ( const GaplessExtension & another) const
inline

Two extensions are equal if the same read interval matches the same search state with the same node offset.

◆ overlap()

size_t vg::GaplessExtension::overlap ( const HandleGraph & graph,
const GaplessExtension & another ) const

Number of shared (read position, graph position) pairs in the extensions.

◆ prefix()

GaplessExtension vg::GaplessExtension::prefix ( size_t prefix_length) const

Take a prefix of the extension as a new GaplessExtension object.

◆ starting_position()

Position vg::GaplessExtension::starting_position ( const HandleGraph & graph) const

Return the starting position of the extension.

◆ tail_offset()

size_t vg::GaplessExtension::tail_offset ( const HandleGraph & graph) const

Return the node offset after the extension.

◆ tail_position()

Position vg::GaplessExtension::tail_position ( const HandleGraph & graph) const

Return the position after the extension.

◆ to_path()

Path vg::GaplessExtension::to_path ( const HandleGraph & graph,
const std::string & sequence ) const

Convert the extension into a Path. The sequence should be the full read-space sequence.

Member Data Documentation

◆ internal_score

uint32_t vg::GaplessExtension::internal_score

◆ left_full

bool vg::GaplessExtension::left_full

◆ left_maximal

bool vg::GaplessExtension::left_maximal

◆ mismatch_positions

std::vector<size_t> vg::GaplessExtension::mismatch_positions

◆ offset

size_t vg::GaplessExtension::offset

◆ old_score

uint32_t vg::GaplessExtension::old_score

◆ path

std::vector<handle_t> vg::GaplessExtension::path

◆ read_interval

std::pair<size_t, size_t> vg::GaplessExtension::read_interval

◆ right_full

bool vg::GaplessExtension::right_full

◆ right_maximal

bool vg::GaplessExtension::right_maximal

◆ score

int32_t vg::GaplessExtension::score

◆ state

gbwt::BidirectionalState vg::GaplessExtension::state

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