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

#include <aligner.hpp>

Inheritance diagram for vg::AlignerClient:
vg::BaseMapper vg::MinimizerMapper vg::Surjector vg::Mapper vg::MultipathMapper

Public Member Functions

virtual void set_alignment_scores (int8_t match, int8_t mismatch, int8_t gap_open, int8_t gap_extend, int8_t full_length_bonus)
 Set all the aligner scoring parameters and create the stored aligner instances. More...
 
virtual void set_alignment_scores (std::istream &matrix_stream, int8_t gap_open, int8_t gap_extend, int8_t full_length_bonus)
 
virtual void set_alignment_scores (const int8_t *score_matrix, int8_t gap_open, int8_t gap_extend, int8_t full_length_bonus)
 

Static Public Member Functions

static int8_t * parse_matrix (std::istream &matrix_stream)
 Allocates an array to hold a 4x4 substitution matrix and returns it. More...
 

Public Attributes

bool adjust_alignments_for_base_quality = false
 

Protected Member Functions

 AlignerClient (double gc_content_estimate=vg::default_gc_content)
 
const GSSWAlignerget_aligner (bool have_qualities=true) const
 
const QualAdjAlignerget_qual_adj_aligner () const
 
const Alignerget_regular_aligner () const
 

Protected Attributes

double gc_content_estimate
 

Private Attributes

unique_ptr< QualAdjAlignerqual_adj_aligner
 
unique_ptr< Alignerregular_aligner
 

Detailed Description

Holds a set of alignment scores, and has methods to produce aligners of various types on demand, using those scores. Provides a get_aligner() method to get ahold of a useful, possibly quality-adjusted Aligner. Base functionality that is shared between alignment and surjections

Constructor & Destructor Documentation

◆ AlignerClient()

vg::AlignerClient::AlignerClient ( double  gc_content_estimate = vg::default_gc_content)
protected

Create an AlignerClient, which creates the default aligner instances, which can depend on a GC content estimate.

Member Function Documentation

◆ get_aligner()

const GSSWAligner * vg::AlignerClient::get_aligner ( bool  have_qualities = true) const
protected

Get the appropriate aligner to use, based on adjust_alignments_for_base_quality. By setting have_qualities to false, you can force the non-quality-adjusted aligner, for reads that lack quality scores.

◆ get_qual_adj_aligner()

const QualAdjAligner * vg::AlignerClient::get_qual_adj_aligner ( ) const
protected

◆ get_regular_aligner()

const Aligner * vg::AlignerClient::get_regular_aligner ( ) const
protected

◆ parse_matrix()

int8_t * vg::AlignerClient::parse_matrix ( std::istream &  matrix_stream)
static

Allocates an array to hold a 4x4 substitution matrix and returns it.

◆ set_alignment_scores() [1/3]

void vg::AlignerClient::set_alignment_scores ( const int8_t *  score_matrix,
int8_t  gap_open,
int8_t  gap_extend,
int8_t  full_length_bonus 
)
virtual

Set the algner scoring parameters and create the stored aligner instances. The score matrix should by a 4 x 4 array in the order (ACGT). Other overloads of set_alignment_scores all call this one. Note that an override of this method can't be called from the constructor, so when overriding it, make sure to also do your extra work in the constructor.

Reimplemented in vg::MultipathMapper, vg::MinimizerMapper, and vg::Surjector.

◆ set_alignment_scores() [2/3]

void vg::AlignerClient::set_alignment_scores ( int8_t  match,
int8_t  mismatch,
int8_t  gap_open,
int8_t  gap_extend,
int8_t  full_length_bonus 
)
virtual

Set all the aligner scoring parameters and create the stored aligner instances.

◆ set_alignment_scores() [3/3]

void vg::AlignerClient::set_alignment_scores ( std::istream &  matrix_stream,
int8_t  gap_open,
int8_t  gap_extend,
int8_t  full_length_bonus 
)
virtual

Set the algner scoring parameters and create the stored aligner instances. The stream should contain a 4 x 4 whitespace-separated substitution matrix (in the order ACGT)

Member Data Documentation

◆ adjust_alignments_for_base_quality

bool vg::AlignerClient::adjust_alignments_for_base_quality = false

◆ gc_content_estimate

double vg::AlignerClient::gc_content_estimate
protected

◆ qual_adj_aligner

unique_ptr<QualAdjAligner> vg::AlignerClient::qual_adj_aligner
private

◆ regular_aligner

unique_ptr<Aligner> vg::AlignerClient::regular_aligner
private

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