LocARNA-2.0.0
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
LocARNA::EdgeProbs Class Reference

Provides probabilities for alignment egdes (match or trace probabilities etc). More...

#include <edge_probs.hh>

Inheritance diagram for LocARNA::EdgeProbs:
Inheritance graph
[legend]
Collaboration diagram for LocARNA::EdgeProbs:
Collaboration graph
[legend]

Public Types

using size_type = size_t
 size
 

Public Member Functions

 EdgeProbs (std::istream &in, size_type lenA, size_type lenB)
 construct from input stream (sparse format)
 
std::ostream & write_sparse (std::ostream &out, double threshold) const
 
size_type lenA () const
 get the length of the first sequence
 
size_type lenB () const
 get the length of the second sequence
 
double prob (size_t i, size_t j) const
 return the match probability for the two bases
 

Protected Member Functions

std::istream & read_sparse (std::istream &in, size_type lenA, size_type lenB)
 
void read_sparse (const std::string &filename, size_type lenA, size_type lenB)
 

Protected Attributes

Matrix< double > probs_
 the base match probabilities
 

Detailed Description

Provides probabilities for alignment egdes (match or trace probabilities etc).

The probabilities must be read in from an input stream.

Member Function Documentation

◆ read_sparse() [1/2]

void LocARNA::EdgeProbs::read_sparse ( const std::string &  filename,
size_type  lenA,
size_type  lenB 
)
protected

read the probabilities from a file read 'sparse' format "i j p"

◆ read_sparse() [2/2]

std::istream & LocARNA::EdgeProbs::read_sparse ( std::istream &  in,
size_type  lenA,
size_type  lenB 
)
protected

read the probabilities from a stream read 'sparse' format "i j p"

◆ write_sparse()

std::ostream & LocARNA::EdgeProbs::write_sparse ( std::ostream &  out,
double  threshold 
) const

write the probabilities to a stream, only probs >= threshold use format "i j p"


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