vg
tools for working with variation graphs
Public Member Functions | List of all members
haplo::ScoreProvider Class Referenceabstract

#include <haplotypes.hpp>

Inheritance diagram for haplo::ScoreProvider:
haplo::GBWTScoreProvider< GBWTType > haplo::LinearScoreProvider

Public Member Functions

virtual pair< double, bool > score (const vg::Path &, haploMath::RRMemo &memo)=0
 Score the given path usign the given memo. More...
 
virtual int64_t get_haplotype_count () const
 
virtual bool has_incremental_search () const
 
virtual IncrementalSearchState incremental_find (const vg::Position &pos) const
 
virtual IncrementalSearchState incremental_extend (const IncrementalSearchState &state, const vg::Position &pos) const
 
virtual ~ScoreProvider ()=default
 

Detailed Description

Interface abstracting over the various ways of generating haplotype scores. You probably want the implementations: GBWTScoreProvider, LinearScoreProvider TODO: Const-ify the indexes used

Constructor & Destructor Documentation

◆ ~ScoreProvider()

virtual haplo::ScoreProvider::~ScoreProvider ( )
virtualdefault

Member Function Documentation

◆ get_haplotype_count()

int64_t haplo::ScoreProvider::get_haplotype_count ( ) const
virtual

Return the haplotype count (number of expected haplotypes that agree with a path that is fixed in the population) that should be used to construct the memo to pass to score, or -1 if the indexes backing the ScoreProvider do not make this information available.

Reimplemented in haplo::GBWTScoreProvider< GBWTType >.

◆ has_incremental_search()

bool haplo::ScoreProvider::has_incremental_search ( ) const
virtual

Return true if this ScoreProvider supports incremental search for counting haplotypes.

Reimplemented in haplo::GBWTScoreProvider< GBWTType >.

◆ incremental_extend()

IncrementalSearchState haplo::ScoreProvider::incremental_extend ( const IncrementalSearchState state,
const vg::Position pos 
) const
virtual

Extend the given search state with the node visit described by the given Position, if incremental search is supported.

Reimplemented in haplo::GBWTScoreProvider< GBWTType >.

◆ incremental_find()

IncrementalSearchState haplo::ScoreProvider::incremental_find ( const vg::Position pos) const
virtual

Start a new search state with the node visit described by the given Position, if incremental search is supported.

Reimplemented in haplo::GBWTScoreProvider< GBWTType >.

◆ score()

virtual pair<double, bool> haplo::ScoreProvider::score ( const vg::Path ,
haploMath::RRMemo memo 
)
pure virtual

Score the given path usign the given memo.

Implemented in haplo::LinearScoreProvider, and haplo::GBWTScoreProvider< GBWTType >.


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