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

#include <chain_items.hpp>

Public Member Functions

size_t read_start () const
 Get the start position in the read of this anchor's match. More...
 
const pos_tgraph_start () const
 Get the start position in the graph of this anchor's match. More...
 
size_t read_exclusion_start () const
 
size_t length () const
 Get the length of this anchor's match. More...
 
int score () const
 Get the alignment score of the anchor. More...
 
size_t read_end () const
 Get the end position in the read of this anchor's match. More...
 
pos_t graph_end () const
 Get the end position in the graph of this anchor's match. More...
 
size_t read_exclusion_end () const
 
size_t seed_start () const
 
size_t seed_end () const
 
ZipCodestart_hint () const
 
size_t start_hint_offset () const
 
ZipCodeend_hint () const
 
size_t end_hint_offset () const
 
size_t base_seed_length () const
 
bool is_skippable () const
 
void clear_paths ()
 
void set_paths (const path_flags_t anchor_paths)
 
void set_paths (size_t anchor_start_paths, size_t anchor_end_paths)
 
void set_paths (const std::vector< size_t > &anchor_paths)
 
void add_paths (const std::vector< size_t > &anchor_paths)
 Add new paths to the supported haplotypes. More...
 
void add_path (size_t path)
 
void update_paths (const path_flags_t &new_paths)
 Update the paths supported by an anchor. More...
 
void update_start_paths (const path_flags_t &new_paths)
 
void update_end_paths (const path_flags_t &new_paths)
 
void update_paths (const std::vector< size_t > &haplotypes)
 
const std::pair< path_flags_t, path_flags_tanchor_paths () const
 Get the supported paths, as a 64 bit integer, where each bit is set to 1 if the respective path is supported. More...
 
path_flags_t anchor_start_paths () const
 
path_flags_t anchor_end_paths () const
 
 Anchor (size_t read_start, const pos_t &graph_start, size_t length, size_t margin_before, size_t margin_after, int score, size_t seed_number=std::numeric_limits< size_t >::max(), ZipCode *hint=nullptr, size_t hint_start=0, bool skippable=false, path_flags_t paths=0)
 
 Anchor (const Anchor &first, const Anchor &last, size_t extra_margin_before, size_t extra_margin_after, int score)
 
 Anchor ()=default
 
 Anchor (const Anchor &other)=default
 
Anchoroperator= (const Anchor &other)=default
 
 Anchor (Anchor &&other)=default
 
Anchoroperator= (Anchor &&other)=default
 

Protected Attributes

size_t start
 
size_t size
 
size_t margin_before
 
size_t margin_after
 
pos_t start_pos
 
pos_t end_pos
 
int points
 
size_t start_seed
 
size_t end_seed
 
ZipCodestart_zip
 
ZipCodeend_zip
 
size_t start_offset
 
size_t end_offset
 
size_t seed_length
 
bool skippable
 
path_flags_t start_paths
 
path_flags_t end_paths
 

Detailed Description

Represents a piece of a graph node matching to a piece of a read. Can be chained together.

Constructor & Destructor Documentation

◆ Anchor() [1/5]

vg::algorithms::Anchor::Anchor ( size_t  read_start,
const pos_t graph_start,
size_t  length,
size_t  margin_before,
size_t  margin_after,
int  score,
size_t  seed_number = std::numeric_limits<size_t>::max(),
ZipCode hint = nullptr,
size_t  hint_start = 0,
bool  skippable = false,
path_flags_t  paths = 0 
)
inline

Compose a read start position, graph start position, and match length into an Anchor. Can also bring along a distance hint and a seed number.

◆ Anchor() [2/5]

vg::algorithms::Anchor::Anchor ( const Anchor first,
const Anchor last,
size_t  extra_margin_before,
size_t  extra_margin_after,
int  score 
)
inline

Compose two Anchors into an Anchor that represents coming in through the first one and going out through the second, like a tunnel. Useful for representing chains as chainable items.

◆ Anchor() [3/5]

vg::algorithms::Anchor::Anchor ( )
default

◆ Anchor() [4/5]

vg::algorithms::Anchor::Anchor ( const Anchor other)
default

◆ Anchor() [5/5]

vg::algorithms::Anchor::Anchor ( Anchor &&  other)
default

Member Function Documentation

◆ add_path()

void vg::algorithms::Anchor::add_path ( size_t  path)
inline

◆ add_paths()

void vg::algorithms::Anchor::add_paths ( const std::vector< size_t > &  anchor_paths)
inline

Add new paths to the supported haplotypes.

◆ anchor_end_paths()

path_flags_t vg::algorithms::Anchor::anchor_end_paths ( ) const
inline

◆ anchor_paths()

const std::pair<path_flags_t, path_flags_t> vg::algorithms::Anchor::anchor_paths ( ) const
inline

Get the supported paths, as a 64 bit integer, where each bit is set to 1 if the respective path is supported.

◆ anchor_start_paths()

path_flags_t vg::algorithms::Anchor::anchor_start_paths ( ) const
inline

◆ base_seed_length()

size_t vg::algorithms::Anchor::base_seed_length ( ) const
inline

Get the length of the exclusion zone for a primary anchor, or the average such length of the anchors this anchor is made from for a composite anchor. This is used in gap scoring during chaining, to make sure gap scores don't get enormous for long composite anchors.

◆ clear_paths()

void vg::algorithms::Anchor::clear_paths ( )
inline

◆ end_hint()

ZipCode* vg::algorithms::Anchor::end_hint ( ) const
inline

Get the distance-finding hint information (i.e. "zip code") for accelerating distance queries from the end of this anchor, or null if none is set.

◆ end_hint_offset()

size_t vg::algorithms::Anchor::end_hint_offset ( ) const
inline

Get the graph distance from wherever the end hint is positioned forward to the actual end of the anchor.

◆ graph_end()

pos_t vg::algorithms::Anchor::graph_end ( ) const
inline

Get the end position in the graph of this anchor's match.

◆ graph_start()

const pos_t& vg::algorithms::Anchor::graph_start ( ) const
inline

Get the start position in the graph of this anchor's match.

◆ is_skippable()

bool vg::algorithms::Anchor::is_skippable ( ) const
inline

Can this anchor be skipped when constructing an alignment? This will be true if the anchor is in a repetitive region of the read

◆ length()

size_t vg::algorithms::Anchor::length ( ) const
inline

Get the length of this anchor's match.

◆ operator=() [1/2]

Anchor& vg::algorithms::Anchor::operator= ( Anchor &&  other)
default

◆ operator=() [2/2]

Anchor& vg::algorithms::Anchor::operator= ( const Anchor other)
default

◆ read_end()

size_t vg::algorithms::Anchor::read_end ( ) const
inline

Get the end position in the read of this anchor's match.

◆ read_exclusion_end()

size_t vg::algorithms::Anchor::read_exclusion_end ( ) const
inline

Get the end position in the read of the part of the read that you can't have another anchor in if you take this one.

◆ read_exclusion_start()

size_t vg::algorithms::Anchor::read_exclusion_start ( ) const
inline

Get the start position in the read of the part of the read that you can't have another anchor in if you take this one.

We trimmed the anchors down from the minimizers to avoid having to deal with the tail ends of the minimizers going multiple places in the graph. But we don't want to let you take anchors from minimizers that overlapped.

◆ read_start()

size_t vg::algorithms::Anchor::read_start ( ) const
inline

Get the start position in the read of this anchor's match.

◆ score()

int vg::algorithms::Anchor::score ( ) const
inline

Get the alignment score of the anchor.

◆ seed_end()

size_t vg::algorithms::Anchor::seed_end ( ) const
inline

Get the number of the seed at the end of the chain, or std::numeric_limits<size_t>::max() if not set.

◆ seed_start()

size_t vg::algorithms::Anchor::seed_start ( ) const
inline

Get the number of the seed at the start of the anchor, or std::numeric_limits<size_t>::max() if not set.

◆ set_paths() [1/3]

void vg::algorithms::Anchor::set_paths ( const path_flags_t  anchor_paths)
inline

Set the haplotypes supported by this anchor Maximum number limited to 64 for now

◆ set_paths() [2/3]

void vg::algorithms::Anchor::set_paths ( const std::vector< size_t > &  anchor_paths)
inline

◆ set_paths() [3/3]

void vg::algorithms::Anchor::set_paths ( size_t  anchor_start_paths,
size_t  anchor_end_paths 
)
inline

◆ start_hint()

ZipCode* vg::algorithms::Anchor::start_hint ( ) const
inline

Get the distance-finding hint information (i.e. "zip code") for accelerating distance queries to the start of this anchor, or null if none is set.

◆ start_hint_offset()

size_t vg::algorithms::Anchor::start_hint_offset ( ) const
inline

Get the graph distance from wherever the start hint is positioned back to the actual start of the anchor.

◆ update_end_paths()

void vg::algorithms::Anchor::update_end_paths ( const path_flags_t new_paths)
inline

◆ update_paths() [1/2]

void vg::algorithms::Anchor::update_paths ( const path_flags_t new_paths)
inline

Update the paths supported by an anchor.

◆ update_paths() [2/2]

void vg::algorithms::Anchor::update_paths ( const std::vector< size_t > &  haplotypes)
inline

◆ update_start_paths()

void vg::algorithms::Anchor::update_start_paths ( const path_flags_t new_paths)
inline

Member Data Documentation

◆ end_offset

size_t vg::algorithms::Anchor::end_offset
protected

◆ end_paths

path_flags_t vg::algorithms::Anchor::end_paths
protected

◆ end_pos

pos_t vg::algorithms::Anchor::end_pos
protected

◆ end_seed

size_t vg::algorithms::Anchor::end_seed
protected

◆ end_zip

ZipCode* vg::algorithms::Anchor::end_zip
protected

◆ margin_after

size_t vg::algorithms::Anchor::margin_after
protected

◆ margin_before

size_t vg::algorithms::Anchor::margin_before
protected

◆ points

int vg::algorithms::Anchor::points
protected

◆ seed_length

size_t vg::algorithms::Anchor::seed_length
protected

◆ size

size_t vg::algorithms::Anchor::size
protected

◆ skippable

bool vg::algorithms::Anchor::skippable
protected

◆ start

size_t vg::algorithms::Anchor::start
protected

◆ start_offset

size_t vg::algorithms::Anchor::start_offset
protected

◆ start_paths

path_flags_t vg::algorithms::Anchor::start_paths
protected

◆ start_pos

pos_t vg::algorithms::Anchor::start_pos
protected

◆ start_seed

size_t vg::algorithms::Anchor::start_seed
protected

◆ start_zip

ZipCode* vg::algorithms::Anchor::start_zip
protected

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