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

#include <aligner.hpp>

Inheritance diagram for vg::QualAdjAligner:
vg::GSSWAligner vg::BaseAligner

Public Member Functions

 QualAdjAligner (const int8_t *score_matrix=default_score_matrix, int8_t gap_open=default_gap_open, int8_t gap_extension=default_gap_extension, int8_t full_length_bonus=default_full_length_bonus, double gc_content=default_gc_content)
 
 QualAdjAligner (QualAdjAligner &&)=default
 
QualAdjAligneroperator= (QualAdjAligner &&)=default
 
void align (Alignment &alignment, const HandleGraph &g, bool traceback_aln) const override
 
void align_global_banded (Alignment &alignment, const HandleGraph &g, int32_t band_padding=0, bool permissive_banding=true, uint64_t max_cells=std::numeric_limits< uint64_t >::max()) const override
 
void align_pinned (Alignment &alignment, const HandleGraph &g, bool pin_left, bool xdrop=false, uint16_t xdrop_max_gap_length=default_xdrop_max_gap_length) const override
 
void align_global_banded_multi (Alignment &alignment, vector< Alignment > &alt_alignments, const HandleGraph &g, int32_t max_alt_alns, int32_t band_padding=0, bool permissive_banding=true, uint64_t max_cells=std::numeric_limits< uint64_t >::max()) const override
 
void align_pinned_multi (Alignment &alignment, vector< Alignment > &alt_alignments, const HandleGraph &g, bool pin_left, int32_t max_alt_alns) const override
 
void align_xdrop (Alignment &alignment, const HandleGraph &g, const vector< MaximalExactMatch > &mems, bool reverse_complemented, uint16_t max_gap_length=default_xdrop_max_gap_length) const override
 xdrop aligner More...
 
void align_xdrop (Alignment &alignment, const HandleGraph &g, const vector< handle_t > &order, const vector< MaximalExactMatch > &mems, bool reverse_complemented, uint16_t max_gap_length=default_xdrop_max_gap_length) const override
 
- Public Member Functions inherited from vg::GSSWAligner
 GSSWAligner (GSSWAligner &&)=default
 
GSSWAligneroperator= (GSSWAligner &&)=default
 
 GSSWAligner (const GSSWAligner &)=delete
 
GSSWAligneroperator= (const GSSWAligner &)=delete
 

Protected Member Functions

void align_internal (Alignment &alignment, vector< Alignment > *multi_alignments, const HandleGraph &g, bool pinned, bool pin_left, int32_t max_alt_alns, bool traceback_aln) const
 Internal function interacting with gssw for pinned and local alignment. More...
 
- Protected Member Functions inherited from vg::GSSWAligner
 GSSWAligner (std::unique_ptr< MatrixAlignmentScorer > owned_scorer)
 
 ~GSSWAligner ()
 
gssw_graph * create_gssw_graph (const HandleGraph &g) const
 
unordered_set< id_tidentify_pinning_points (const HandleGraph &graph) const
 
void unreverse_graph_mapping (gssw_graph_mapping *gm) const
 
void unreverse_graph (gssw_graph *graph) const
 
void gssw_mapping_to_alignment (gssw_graph *graph, gssw_graph_mapping *gm, Alignment &alignment, bool pinned, bool pin_left) const
 
string graph_cigar (gssw_graph_mapping *gm) const
 

Protected Attributes

vector< QualAdjXdropAlignerxdrops
 
- Protected Attributes inherited from vg::GSSWAligner
DeletionAligner deletion_aligner
 

Additional Inherited Members

- Public Attributes inherited from vg::GSSWAligner
std::unique_ptr< MatrixAlignmentScorerscorer
 
std::unique_ptr< MappingQualityCalculatormapq_calc
 

Detailed Description

An aligner that uses read base qualities to adjust its scores and alignments.

Constructor & Destructor Documentation

◆ QualAdjAligner() [1/2]

vg::QualAdjAligner::QualAdjAligner ( const int8_t *  score_matrix = default_score_matrix,
int8_t  gap_open = default_gap_open,
int8_t  gap_extension = default_gap_extension,
int8_t  full_length_bonus = default_full_length_bonus,
double  gc_content = default_gc_content 
)

◆ QualAdjAligner() [2/2]

vg::QualAdjAligner::QualAdjAligner ( QualAdjAligner &&  )
default

Member Function Documentation

◆ align()

void vg::QualAdjAligner::align ( Alignment alignment,
const HandleGraph g,
bool  traceback_aln 
) const
overridevirtual

Store optimal local alignment against a graph in the Alignment object. Gives the full length bonus separately on each end of the alignment.

Implements vg::BaseAligner.

◆ align_global_banded()

void vg::QualAdjAligner::align_global_banded ( Alignment alignment,
const HandleGraph g,
int32_t  band_padding = 0,
bool  permissive_banding = true,
uint64_t  max_cells = std::numeric_limits< uint64_t >::max() 
) const
overridevirtual

Store optimal global alignment against a graph within a specified band in the Alignment object. Permissive banding auto detects the width of band needed so that paths can travel through every node in the graph.

Throws BandMatricesTooBigException if the max_cells limit on DP matric size is hit.

Implements vg::GSSWAligner.

◆ align_global_banded_multi()

void vg::QualAdjAligner::align_global_banded_multi ( Alignment alignment,
vector< Alignment > &  alt_alignments,
const HandleGraph g,
int32_t  max_alt_alns,
int32_t  band_padding = 0,
bool  permissive_banding = true,
uint64_t  max_cells = std::numeric_limits< uint64_t >::max() 
) const
overridevirtual

Store top scoring global alignments in the vector in descending score order up to a maximum number of alternate alignments (including the optimal alignment). If there are fewer than the maximum number of alignments in the return value, then the vector contains all possible alignments. The optimal alignment will be stored in both the vector and the original alignment object.

When multiple alignments have the same score, they are ordered deterministically but arbitrarily.

Throws BandMatricesTooBigException if the max_cells limit on DP matric size is hit.

Implements vg::GSSWAligner.

◆ align_internal()

void vg::QualAdjAligner::align_internal ( Alignment alignment,
vector< Alignment > *  multi_alignments,
const HandleGraph g,
bool  pinned,
bool  pin_left,
int32_t  max_alt_alns,
bool  traceback_aln 
) const
protected

Internal function interacting with gssw for pinned and local alignment.

we didn't get any alignments either because the graph was empty and we couldn't run

◆ align_pinned()

void vg::QualAdjAligner::align_pinned ( Alignment alignment,
const HandleGraph g,
bool  pin_left,
bool  xdrop = false,
uint16_t  xdrop_max_gap_length = default_xdrop_max_gap_length 
) const
overridevirtual

store optimal alignment against a graph in the Alignment object with one end of the sequence guaranteed to align to a source/sink node. if xdrop is selected, use the xdrop heuristic, which does not guarantee an optimal alignment.

pinning left means that that the alignment starts with the first base of the read sequence and the first base of a source node sequence, pinning right means that the alignment starts with the final base of the read sequence and the final base of a sink node sequence

Gives the full length bonus only on the non-pinned end of the alignment.

Implements vg::GSSWAligner.

◆ align_pinned_multi()

void vg::QualAdjAligner::align_pinned_multi ( Alignment alignment,
vector< Alignment > &  alt_alignments,
const HandleGraph g,
bool  pin_left,
int32_t  max_alt_alns 
) const
overridevirtual

store the top scoring pinned alignments in the vector in descending score order up to a maximum number of alignments (including the optimal one). if there are fewer than the maximum number in the return value, then it includes all alignments with a positive score. the optimal alignment will be stored in both the vector and in the main alignment object

Implements vg::GSSWAligner.

◆ align_xdrop() [1/2]

void vg::QualAdjAligner::align_xdrop ( Alignment alignment,
const HandleGraph g,
const vector< handle_t > &  order,
const vector< MaximalExactMatch > &  mems,
bool  reverse_complemented,
uint16_t  max_gap_length = default_xdrop_max_gap_length 
) const
overridevirtual

xdrop aligner, but with a precomputed topological order on the graph, which need not include all of the graph's handles and which may contain both orientations of a handle

Implements vg::GSSWAligner.

◆ align_xdrop() [2/2]

void vg::QualAdjAligner::align_xdrop ( Alignment alignment,
const HandleGraph g,
const vector< MaximalExactMatch > &  mems,
bool  reverse_complemented,
uint16_t  max_gap_length = default_xdrop_max_gap_length 
) const
overridevirtual

xdrop aligner

Implements vg::GSSWAligner.

◆ operator=()

QualAdjAligner& vg::QualAdjAligner::operator= ( QualAdjAligner &&  )
default

Member Data Documentation

◆ xdrops

vector<QualAdjXdropAligner> vg::QualAdjAligner::xdrops
protected

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