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
 
 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)
 
 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
 

Detailed Description

Represents a piece fo 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 
)
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

◆ 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.

◆ 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.

◆ 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.

Member Data Documentation

◆ end_offset

size_t vg::algorithms::Anchor::end_offset
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_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: