statistics::Manager Class Reference

Class to handle the interaction with Alignment and statistics objects.
It serves as a wrapper or intermediate between the alignment and each specific stat.
It also encapsulates the similarityMatrix. More...

#include <Manager.h>

Public Member Functions

bool setSimilarityMatrix (similarityMatrix *sm)
 Method to set a similarity matrix. More...
 
bool calculateGapStats ()
 Method to handle gap stat calculation
It checks if the gaps submodule has been created, otherwise, creates it. More...
 
void printStatisticsGapsColumns ()
 Wrapper to Statistics::Gaps::printGapsColumns()
It calls to calculateGapStats() to make sure the information is available before reporting the requested values. More...
 
void printStatisticsGapsTotal ()
 Wrapper to Statistics::Gaps::printGapsAcl()
It calls to calculateGapStats() to make sure the information is available before reporting the requested values. More...
 
bool calculateConservationStats ()
 Method to handle similarity stat calculation
It checks if the similarity submodule has been created, otherwise, creates it. More...
 
void printStatisticsConservationColumns ()
 Wrapper to Statistics::Similarity::printConservationAcl()
It calls to calculateConservationStats() to make sure the information is available before reporting the requested values. More...
 
void printStatisticsConservationTotal ()
 Wrapper to Statistics::Similarity::printGapsTotal()
It calls to calculateConservationStats() to make sure the information is available before reporting the requested values. More...
 
void printCorrespondence ()
 Method to print the vector containing the keep/reject (Alignment::saveResidues) values of the associated Alignment
If -1 , the residue would be rejected, otherwise, it prints the position on the alignment of the kept residue. More...
 

Public Attributes

Gapsgaps = nullptr
 Gaps submodule. More...
 
Similaritysimilarity = nullptr
 Similarity submodule. More...
 
Consistencyconsistency = nullptr
 Consistency submodule. More...
 
similarityMatrix_similarityMatrix = nullptr
 SimilarityMatrix used by Similarity. More...
 
int ghWindow
 Gap window. More...
 
int shWindow
 Similarity window. More...
 

Private Member Functions

 Manager (Alignment *parent)
 
 Manager (Alignment *parent, Manager *mold)
 
 ~Manager ()
 

Private Attributes

Alignmentalig
 

Friends

class ::Alignment
 

Detailed Description

Class to handle the interaction with Alignment and statistics objects.
It serves as a wrapper or intermediate between the alignment and each specific stat.
It also encapsulates the similarityMatrix.

Definition at line 53 of file Manager.h.

Constructor & Destructor Documentation

◆ Manager() [1/2]

statistics::Manager::Manager ( Alignment parent)
explicitprivate

Definition at line 184 of file Manager.cpp.

References alig, ghWindow, and shWindow.

Referenced by Alignment::Alignment().

+ Here is the caller graph for this function:

◆ Manager() [2/2]

statistics::Manager::Manager ( Alignment parent,
Manager mold 
)
private

Definition at line 194 of file Manager.cpp.

References _similarityMatrix, alig, consistency, statistics::Consistency::Consistency(), statistics::Gaps::Gaps(), gaps, ghWindow, shWindow, statistics::Similarity::Similarity(), and similarity.

Referenced by Alignment::Alignment().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ~Manager()

statistics::Manager::~Manager ( )
private

Definition at line 215 of file Manager.cpp.

References consistency, gaps, and similarity.

Member Function Documentation

◆ calculateConservationStats()

bool statistics::Manager::calculateConservationStats ( )

Method to handle similarity stat calculation
It checks if the similarity submodule has been created, otherwise, creates it.

Definition at line 36 of file Manager.cpp.

References _similarityMatrix, alig, statistics::Similarity::applyWindow(), calculateGapStats(), statistics::Similarity::calculateVectors(), statistics::Similarity::isDefinedWindow(), statistics::Similarity::isSimMatrixDef(), statistics::Similarity::setSimilarityMatrix(), shWindow, similarity, statistics::Similarity::Similarity(), and Alignment::Statistics.

Referenced by Cleaner::clean(), Cleaner::cleanCombMethods(), Cleaner::cleanConservation(), printStatisticsConservationColumns(), and printStatisticsConservationTotal().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ calculateGapStats()

bool statistics::Manager::calculateGapStats ( )

Method to handle gap stat calculation
It checks if the gaps submodule has been created, otherwise, creates it.

Definition at line 166 of file Manager.cpp.

References alig, statistics::Gaps::applyWindow(), statistics::Gaps::CalculateVectors(), gaps, statistics::Gaps::Gaps(), ghWindow, and Alignment::sequences.

Referenced by calculateConservationStats(), statistics::Similarity::calculateVectors(), Cleaner::clean(), Cleaner::clean2ndSlope(), Cleaner::cleanGaps(), Cleaner::cleanNoAllGaps(), printStatisticsGapsColumns(), printStatisticsGapsTotal(), and Cleaner::removeOnlyTerminal().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ printCorrespondence()

void statistics::Manager::printCorrespondence ( )

Method to print the vector containing the keep/reject (Alignment::saveResidues) values of the associated Alignment
If -1 , the residue would be rejected, otherwise, it prints the position on the alignment of the kept residue.

Definition at line 144 of file Manager.cpp.

References alig, Alignment::originalNumberOfResidues, and Alignment::saveResidues.

Referenced by trimAlManager::innerPerform().

+ Here is the caller graph for this function:

◆ printStatisticsConservationColumns()

void statistics::Manager::printStatisticsConservationColumns ( )

Wrapper to Statistics::Similarity::printConservationAcl()
It calls to calculateConservationStats() to make sure the information is available before reporting the requested values.

Definition at line 73 of file Manager.cpp.

References alig, calculateConservationStats(), statistics::Similarity::printConservationColumns(), similarity, and Alignment::Statistics.

Referenced by trimAlManager::print_statistics().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ printStatisticsConservationTotal()

void statistics::Manager::printStatisticsConservationTotal ( )

Wrapper to Statistics::Similarity::printGapsTotal()
It calls to calculateConservationStats() to make sure the information is available before reporting the requested values.

Definition at line 86 of file Manager.cpp.

References alig, calculateConservationStats(), statistics::Similarity::printConservationAcl(), similarity, and Alignment::Statistics.

Referenced by trimAlManager::print_statistics().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ printStatisticsGapsColumns()

void statistics::Manager::printStatisticsGapsColumns ( )

Wrapper to Statistics::Gaps::printGapsColumns()
It calls to calculateGapStats() to make sure the information is available before reporting the requested values.

Definition at line 118 of file Manager.cpp.

References alig, calculateGapStats(), gaps, statistics::Gaps::printGapsColumns(), and Alignment::Statistics.

Referenced by trimAlManager::print_statistics().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ printStatisticsGapsTotal()

void statistics::Manager::printStatisticsGapsTotal ( )

Wrapper to Statistics::Gaps::printGapsAcl()
It calls to calculateGapStats() to make sure the information is available before reporting the requested values.

Definition at line 131 of file Manager.cpp.

References alig, calculateGapStats(), gaps, statistics::Gaps::printGapsAcl(), and Alignment::Statistics.

Referenced by trimAlManager::print_statistics().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setSimilarityMatrix()

bool statistics::Manager::setSimilarityMatrix ( similarityMatrix sm)

Method to set a similarity matrix.

Definition at line 100 of file Manager.cpp.

References _similarityMatrix, alig, statistics::Similarity::setSimilarityMatrix(), similarity, statistics::Similarity::Similarity(), and Alignment::Statistics.

Referenced by trimAlManager::create_or_use_similarity_matrix().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Friends And Related Function Documentation

◆ ::Alignment

friend class ::Alignment
friend

Making Alignment a friend class allows us to have private constructor and destructors.
This gives us more control over the statistics classes, hinting that they shouldn't be created outside the scope of a newAlignmet.

Definition at line 133 of file Manager.h.

Member Data Documentation

◆ _similarityMatrix

similarityMatrix* statistics::Manager::_similarityMatrix = nullptr

SimilarityMatrix used by Similarity.

Definition at line 72 of file Manager.h.

Referenced by calculateConservationStats(), Manager(), and setSimilarityMatrix().

◆ alig

◆ consistency

◆ gaps

◆ ghWindow

int statistics::Manager::ghWindow

Gap window.

Definition at line 77 of file Manager.h.

Referenced by calculateGapStats(), Manager(), and Alignment::setWindowsSize().

◆ shWindow

int statistics::Manager::shWindow

Similarity window.

Definition at line 81 of file Manager.h.

Referenced by calculateConservationStats(), Manager(), and Alignment::setWindowsSize().

◆ similarity


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