Alignment Class Reference

Class containing an alignment
This class stores the alignment sequences with it's names, residues and extra information.
It contains multiple methods regarding the sequences.
It also contains submodules that provide methods for Calculating statistics, Trim the alignment and Printing sequences information. More...

#include <Alignment.h>

Classes

class  sequencesMatrix
 Internal Alignment Class that represents a sequences matrix. More...
 

Public Member Functions

bool fillMatrices (bool aligned, bool checkInvalidChars=true)
 Method to initialize matrices and check if the sequences have been correctly loaded and are free of errors
It checks if sequences contain unknown characters, sets the isAligned flag and initializes 'saveResidues' and 'saveSequences', depending on the sizes of the sequences (whether or not they have the same length). More...
 
 Alignment ()
 Constructor. More...
 
 Alignment (Alignment &)
 Copy Constructor.
The copy constructor does not make a copy of all structures present on the original alignment.
Instead, all alignments that share a common origin, share some information, and also, a counter (Alignment::SeqRef) of how many alignments share the same information.
This allows us to keep the information on memory while any alignment is using it.
When an alignment is destroyed, the counter is substracted by 1, and, if it is 0 after the substraction, the shared data is destroyed. More...
 
 ~Alignment ()
 Destructor. The destructor takes care of removing the non-shared information of each alignment when is destroyed.
It also substracts 1 from the shared counter Alignment::SeqRef.
When Alignment::SeqRef arrives to 0, the shared data is destroyed, including Alignment::SeqRef. More...
 
int getNumSpecies ()
 Number of sequences getter. More...
 
void getSequences (std::string *names)
 Getter for the sequences names. More...
 
void getSequences (std::string *names, int *lenghts)
 Getter for the sequences names and its lenghts. More...
 
void getSequences (std::string *names, std::string *sequences, int *lenghts)
 Getter for the sequences, its names and lenghts. More...
 
bool getSequenceNameOrder (std::string *names, int *orderVector)
 Method to map two sets of sequences, own and external.
The method accepts a vector of names, and test them against the alignment own sequences' names.
If the sequence is present, its index will be stored in orderVector.
. More...
 
int getNumAminos ()
 Residues number getter. It counts gaps as residue. More...
 
void setWindowsSize (int ghWindow, int shWindow)
 Windows setter. More...
 
void setBlockSize (int blockSize)
 BlockSize Setter. More...
 
void calculateSeqOverlap ()
 Calculates overlap between sequences. More...
 
void printSeqIdentity ()
 Method to print different identity values computed from the alignment.
In this method we assess the identity values matrix, as well as different average values.
Moreover, the method computes which one is the most similar sequence. More...
 
void printSeqOverlap ()
 Prints the overlap between sequences. More...
 
int getAlignmentType () const
 Alignment type getter.
See SequenceTypes. More...
 
bool isFileAligned ()
 isAligned getter. More...
 
AlignmentgetTranslationCDS (Alignment *proteinAlignment)
 Method to back translate a protein alignment using the sequences present on the current alignment.
Current alignment should contain the original sequences which were translated to protein sequences, without any gap. More...
 
bool checkCorrespondence (std::string *names, int *lenghts, int totalInputSequences, int multiple)
 Function to check CDS file.
. More...
 
void calculateColIdentity (float *columnIdentity)
 Method that calculates the columns identity value.
This is, the frequency of the most present element in the column, being residue, indetermination and gap allowed. More...
 
void setKeepSequencesFlag (bool newFlagValue)
 Keep Sequences setter. More...
 
void printAlignmentInfo (std::ostream &output)
 Print information about sequences number, average sequence length, maximum and minimum sequences length, etc. More...
 
bool prepareCodingSequence (bool splitByStopCodon, bool ignoreStopCodon, Alignment *proteinAlignment)
 Method to check if the CDS file is correct.
Based on nature of residues: DNA/RNA (Most of the residues)
There is no gaps on the whole dataset.
Each sequence is a multiple of 3.

It will also remove or split stop codons depending on the flags passed. More...
 
bool alignmentSummaryHTML (const Alignment &trimmedAlig, const char *const destFile)
 Method to report the trimming results in HTML.
Outputs an HTML file that shows visually what has been done to the alignment (removed sequences or residues) and the stats used to do so. More...
 
bool statSVG (const char *const destFile)
 
bool alignmentSummarySVG (Alignment &trimmedAlig, const char *destFile, int blocks)
 Method to report the trimming results in SVG.
Outputs a SVG file that shows visually what has been done to the alignment (removed sequences or residues) and the stats used to do so. More...
 
void updateSequencesAndResiduesNums (bool countSequences=true, bool countResidues=true)
 Updates the sequence number and residue number based on saveResidues and saveSequences. More...
 

Public Attributes

CleanerCleaning = nullptr
 Trimming submodule.
It contains methods and variables related to trimming. More...
 
statistics::ManagerStatistics = nullptr
 Statistics submodule.
It contains methods and variables related to statistics calculation and reporting. More...
 
sequencesMatrixSequencesMatrix = nullptr
 SequencesMatrix submodule
This helper module stores the sequences without gaps. Useful when comparing MSA. More...
 
int * SeqRef = nullptr
 Pointer to keep a count of how many alignments depend on the same shared-sequences.
Increased on each trim step, and automatically reduced on each alignment destroy.
If it arrives to 0, the last alignment being destroyed will also take care of releasing memory for shared information. More...
 
int originalNumberOfSequences = 0
 Number of sequences the alignment had when it was loaded. More...
 
int numberOfSequences = 0
 Number of sequences present on the alignment. More...
 
int originalNumberOfResidues = 0
 Number of residues the alignment had when it was loaded. More...
 
int numberOfResidues = 0
 Number of residues present on the alignment if it is aligned. More...
 
bool isAligned = false
 Flag that indicates if all sequences on the alignment have the same length (Including gaps). More...
 
std::string * sequences = nullptr
 Vector containing the sequences. More...
 
std::string * seqsName = nullptr
 String vector containing the sequences names. More...
 
std::string * seqsInfo = nullptr
 Vector containing extra information about each sequence. More...
 
std::string filename
 Filename where this alignment was loaded from. More...
 
std::string alignmentInfo
 String containing information of the alignment as a whole. More...
 
float ** identities = nullptr
 2D Matrix that represents how much each sequence resembles other sequences in the same MSA More...
 
float ** overlaps = nullptr
 Matrix that stores the overlap between sequences of an alignment. See Alignment::calculateSeqOverlap. More...
 
int * saveResidues = nullptr
 Vector containing which residues will be kept/removed.
-1 Indicates a 'removed/toRemove'. Otherwise residue/column will be kept. More...
 
int * saveSequences = nullptr
 Vector containing which sequences will be kept/removed.
-1 Indicates a 'removed/toRemove'. Otherwise sequence will be kept. More...
 

Private Attributes

int dataType = SequenceTypes::NotDefined
 Flag variable that represents the type of the alignment. More...
 

Detailed Description

Class containing an alignment
This class stores the alignment sequences with it's names, residues and extra information.
It contains multiple methods regarding the sequences.
It also contains submodules that provide methods for Calculating statistics, Trim the alignment and Printing sequences information.

Definition at line 49 of file Alignment.h.

Constructor & Destructor Documentation

◆ Alignment() [1/2]

Alignment::Alignment ( void  )

Constructor.

Definition at line 46 of file Alignment.cpp.

References Cleaner::Cleaner(), Cleaning, dataType, identities, isAligned, statistics::Manager::Manager(), NotDefined, numberOfResidues, numberOfSequences, originalNumberOfResidues, originalNumberOfSequences, saveResidues, saveSequences, SeqRef, seqsInfo, seqsName, sequences, SequencesMatrix, and Statistics.

Referenced by getTranslationCDS(), and FormatHandling::FormatManager::splitAlignmentKeeping().

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

◆ Alignment() [2/2]

Alignment::Alignment ( Alignment originalAlignment)

Copy Constructor.
The copy constructor does not make a copy of all structures present on the original alignment.
Instead, all alignments that share a common origin, share some information, and also, a counter (Alignment::SeqRef) of how many alignments share the same information.
This allows us to keep the information on memory while any alignment is using it.
When an alignment is destroyed, the counter is substracted by 1, and, if it is 0 after the substraction, the shared data is destroyed.

Definition at line 87 of file Alignment.cpp.

References alignmentInfo, Cleaner::Cleaner(), Cleaning, dataType, filename, identities, isAligned, statistics::Manager::Manager(), numberOfResidues, numberOfSequences, originalNumberOfResidues, originalNumberOfSequences, saveResidues, saveSequences, SeqRef, seqsInfo, seqsName, sequences, SequencesMatrix, and Statistics.

Referenced by Cleaner::cleanByCutValueFallBehind(), Cleaner::cleanByCutValueOverpass(), Cleaner::cleanByCutValueOverpassOrEquals(), Cleaner::cleanOverlapSeq(), Cleaner::cleanStrict(), Cleaner::getClustering(), statistics::Consistency::perform(), Cleaner::removeColumns(), and Cleaner::removeSequences().

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

◆ ~Alignment()

Alignment::~Alignment ( void  )

Destructor. The destructor takes care of removing the non-shared information of each alignment when is destroyed.
It also substracts 1 from the shared counter Alignment::SeqRef.
When Alignment::SeqRef arrives to 0, the shared data is destroyed, including Alignment::SeqRef.

Definition at line 134 of file Alignment.cpp.

References Cleaning, identities, numberOfSequences, saveResidues, saveSequences, SeqRef, seqsInfo, seqsName, sequences, SequencesMatrix, and Statistics.

Member Function Documentation

◆ alignmentSummaryHTML()

Alignment::alignmentSummaryHTML ( const Alignment trimmedAlig,
const char *const  destFile 
)

Method to report the trimming results in HTML.
Outputs an HTML file that shows visually what has been done to the alignment (removed sequences or residues) and the stats used to do so.

Parameters
trimmedAligTrimmed alignment to compare with.
destFileFilename where to save the results.
Returns
True if correct.
False if file couldn't be open or alignment is not aligned.

Definition at line 1167 of file Alignment.cpp.

References statistics::Manager::consistency, debug, utils::determineColor(), filename, statistics::Manager::gaps, statistics::Gaps::getGapsWindow(), statistics::Similarity::getMdkWindowedVector(), statistics::Consistency::getValues(), isAligned, utils::max(), NotAligned, numberOfResidues, numberOfSequences, originalNumberOfResidues, originalNumberOfSequences, reporting::reportManager::report(), saveResidues, saveSequences, seqsName, sequences, statistics::Manager::similarity, and Statistics.

Referenced by trimAlManager::output_reports().

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

◆ alignmentSummarySVG()

Alignment::alignmentSummarySVG ( Alignment trimmedAlig,
const char *  destFile,
int  blocks 
)

Method to report the trimming results in SVG.
Outputs a SVG file that shows visually what has been done to the alignment (removed sequences or residues) and the stats used to do so.

Parameters
trimmedAligTrimmed alignment obtained from the object calling this function.
destFileFilename where to save the results.
blocksSize in residues to report. 120 by default.
Returns
True if everything went ok.
False if file couldn't be open or alignment is not aligned.

Definition at line 1708 of file Alignment.cpp.

References statistics::Manager::consistency, debug, utils::determineColor(), filename, statistics::Manager::gaps, statistics::Gaps::getGapsWindow(), statistics::Similarity::getMdkWindowedVector(), statistics::Consistency::getValues(), isAligned, utils::max(), NotAligned, numberOfResidues, numberOfSequences, originalNumberOfResidues, originalNumberOfSequences, reporting::reportManager::report(), saveResidues, saveSequences, seqsName, sequences, statistics::Manager::similarity, and Statistics.

Referenced by trimAlManager::output_reports().

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

◆ calculateColIdentity()

Alignment::calculateColIdentity ( float *  columnIdentity)

Method that calculates the columns identity value.
This is, the frequency of the most present element in the column, being residue, indetermination and gap allowed.

Parameters
[out]columnIdentityVector to fill with identities for each column.

Definition at line 1074 of file Alignment.cpp.

References AA, getAlignmentType(), numberOfResidues, numberOfSequences, and sequences.

+ Here is the call graph for this function:

◆ calculateSeqOverlap()

Alignment::calculateSeqOverlap ( )

Calculates overlap between sequences.

Definition at line 378 of file Alignment.cpp.

References AA, getAlignmentType(), numberOfResidues, numberOfSequences, overlaps, and sequences.

Referenced by printSeqOverlap().

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

◆ checkCorrespondence()

Alignment::checkCorrespondence ( std::string *  names,
int *  lenghts,
int  totalInputSequences,
int  multiple = 1 
)

Function to check CDS file.
.

  • It checks if sequences of input alignment are all present on the CDS file.
  • If nucleotide sequence is larger than protein sequence length * 3, warns about it and cuts the nucleotide sequence
  • If sequence has indetermination symbols, it warns about it.
  • If nucleotide sequence is smaller than protein sequence * 3, it adds some 'N' at the end of the nucleotide sequence.
    Parameters
    namesVector containing the names to check.
    lenghtsVector containing the length of each sequence.
    totalInputSequencesNumber of sequences present.
    multipleMultiplies the length of each sequence by this number.
    Returns
    True if all went right.
    False if there is a sequence in the alignment but not in the names vector.

Definition at line 716 of file Alignment.cpp.

References debug, IncludingIndeterminationSymbols, LessNucleotidesThanExpected, utils::min(), numberOfSequences, utils::removeCharacter(), reporting::reportManager::report(), seqsName, SequenceNotPresentInCDS, sequences, and SequenceWillBeCut.

Referenced by trimAlManager::check_backtranslation_infile_names_correspondence().

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

◆ fillMatrices()

Alignment::fillMatrices ( bool  aligned,
bool  checkInvalidChars = true 
)

Method to initialize matrices and check if the sequences have been correctly loaded and are free of errors
It checks if sequences contain unknown characters, sets the isAligned flag and initializes 'saveResidues' and 'saveSequences', depending on the sizes of the sequences (whether or not they have the same length).

Parameters
alignedFlag to make the method check if the alignment is aligned or not.
Note
Even with the aligned flag set to false, if the alignment is aligned it will initialize the variables 'saveResidues' and 'saveSequences', allowing the alignment to be trimmed.
Returns
True if the alignment information was ok.
False if there was a problem.
This could happen if the sequences contain any unknown character or if aligned flag is set up to true and the sequences have variable sizes.

Definition at line 794 of file Alignment.cpp.

References debug, filename, isAligned, NotAligned, numberOfResidues, numberOfSequences, reporting::reportManager::report(), saveResidues, saveSequences, seqsName, sequences, SequencesNotSameSize, and UnknownCharacter.

+ Here is the call graph for this function:

◆ getAlignmentType()

Alignment::getAlignmentType ( void  ) const

Alignment type getter.
See SequenceTypes.

Returns
Int representing the alignment type.

Definition at line 469 of file Alignment.cpp.

References utils::checkAlignmentType(), dataType, NotDefined, numberOfResidues, numberOfSequences, and sequences.

Referenced by calculateColIdentity(), statistics::Similarity::calculateMatrixIdentity(), Cleaner::calculateSeqIdentity(), calculateSeqOverlap(), Cleaner::calculateSpuriousVector(), statistics::Similarity::calculateVectors(), trimAlManager::check_coding_sequences_type(), trimAlManager::create_or_use_similarity_matrix(), main(), statistics::Consistency::perform(), and prepareCodingSequence().

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

◆ getNumAminos()

Alignment::getNumAminos ( void  )

Residues number getter. It counts gaps as residue.

Returns
Number of residues in the alignment.

Definition at line 252 of file Alignment.cpp.

References numberOfResidues.

Referenced by trimAlManager::check_block_size(), trimAlManager::CleanResiduesNonAuto(), statistics::Consistency::compareAndChoose(), statistics::Consistency::forceComparison(), and statistics::Consistency::perform().

+ Here is the caller graph for this function:

◆ getNumSpecies()

Alignment::getNumSpecies ( void  )

Number of sequences getter.

Returns
Number of sequences in the alignment.

Definition at line 245 of file Alignment.cpp.

References numberOfSequences.

Referenced by trimAlManager::check_backtranslation_infile_names_correspondence(), trimAlManager::check_clusters_incompatibilities(), statistics::Consistency::compareAndChoose(), statistics::Consistency::forceComparison(), and prepareCodingSequence().

+ Here is the caller graph for this function:

◆ getSequenceNameOrder()

Alignment::getSequenceNameOrder ( std::string *  names,
int *  orderVector 
)

Method to map two sets of sequences, own and external.
The method accepts a vector of names, and test them against the alignment own sequences' names.
If the sequence is present, its index will be stored in orderVector.
.

Parameters
namesVector of sequences names to map.
[out]orderVectorVector of orders to fill.
Returns
True if both sets have the same sequences.
False otherwise.

Definition at line 445 of file Alignment.cpp.

References numberOfSequences, and seqsName.

Referenced by statistics::Consistency::compareAndChoose(), and statistics::Consistency::forceComparison().

+ Here is the caller graph for this function:

◆ getSequences() [1/3]

Alignment::getSequences ( std::string *  names)

Getter for the sequences names.

Parameters
[out]namesVector of sequences names to fill.

Definition at line 416 of file Alignment.cpp.

References numberOfSequences, and seqsName.

Referenced by statistics::Consistency::compareAndChoose(), and statistics::Consistency::forceComparison().

+ Here is the caller graph for this function:

◆ getSequences() [2/3]

Alignment::getSequences ( std::string *  names,
int *  lenghts 
)

Getter for the sequences names and its lenghts.

Parameters
[out]namesVector of sequences names to fill.
[out]lenghtsVector of lenghts to fill.

Definition at line 424 of file Alignment.cpp.

References numberOfSequences, utils::removeCharacter(), seqsName, and sequences.

Referenced by trimAlManager::check_backtranslation_infile_names_correspondence().

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

◆ getSequences() [3/3]

Alignment::getSequences ( std::string *  names,
std::string *  sequences,
int *  lenghts 
)

Getter for the sequences, its names and lenghts.

Parameters
[out]namesVector of sequences names to fill.
[out]sequencesVector of sequences to fill.
[out]lenghtsVector of lenghts to fill.

Definition at line 434 of file Alignment.cpp.

References numberOfSequences, utils::removeCharacter(), seqsName, and sequences.

Referenced by prepareCodingSequence().

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

◆ getTranslationCDS()

Alignment::getTranslationCDS ( Alignment proteinAlignment)

Method to back translate a protein alignment using the sequences present on the current alignment.
Current alignment should contain the original sequences which were translated to protein sequences, without any gap.

Note
It's recommended to translate from dna to protein and then, align the protein sequences.
Parameters
proteinAlignmentProtein Alignment to use as origin.
Returns
Pointer to new alignment.

Definition at line 169 of file Alignment.cpp.

References Alignment(), numberOfResidues, numberOfSequences, originalNumberOfResidues, originalNumberOfSequences, saveResidues, saveSequences, seqsInfo, seqsName, and sequences.

Referenced by trimAlManager::postprocess_alignment().

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

◆ isFileAligned()

Alignment::isFileAligned ( void  )

isAligned getter.

Returns
Whether the alignment is aligned or not.

Definition at line 495 of file Alignment.cpp.

References isAligned.

Referenced by trimAlManager::check_backtranslations(), trimAlManager::check_file_aligned(), trimAlManager::clean_alignment(), statistics::Consistency::perform(), and printAlignmentInfo().

+ Here is the caller graph for this function:

◆ prepareCodingSequence()

Alignment::prepareCodingSequence ( bool  splitByStopCodon,
bool  ignoreStopCodon,
Alignment proteinAlignment 
)

Method to check if the CDS file is correct.
Based on nature of residues: DNA/RNA (Most of the residues)
There is no gaps on the whole dataset.
Each sequence is a multiple of 3.

It will also remove or split stop codons depending on the flags passed.

Parameters
splitByStopCodonFlag that informs the method to split sequences if it finds any stop codon.
ignoreStopCodonFlag that informs the method to stop reading sequence if it finds any stop codon.
proteinAlignmentAlignment containing protein sequences which names contains all names in the current alignment.

Definition at line 528 of file Alignment.cpp.

References AA, CDScontainsProteinSequences, CuttingSequence, debug, getAlignmentType(), getNumSpecies(), getSequences(), numberOfSequences, reporting::reportManager::report(), seqsName, SequenceContainsGap, SequenceHasStopCodon, SequenceNotMultipleOfThree, and sequences.

Referenced by trimAlManager::check_and_prepare_coding_sequence().

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

◆ printAlignmentInfo()

Alignment::printAlignmentInfo ( std::ostream &  output)

Print information about sequences number, average sequence length, maximum and minimum sequences length, etc.

Parameters
outputOutput stream.

Definition at line 868 of file Alignment.cpp.

References isFileAligned(), numberOfResidues, numberOfSequences, seqsName, and sequences.

Referenced by main().

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

◆ printSeqIdentity()

Alignment::printSeqIdentity ( void  )

Method to print different identity values computed from the alignment.
In this method we assess the identity values matrix, as well as different average values.
Moreover, the method computes which one is the most similar sequence.

Definition at line 912 of file Alignment.cpp.

References Cleaner::calculateSeqIdentity(), Cleaning, identities, utils::max(), numberOfSequences, originalNumberOfSequences, and seqsName.

Referenced by trimAlManager::print_statistics().

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

◆ printSeqOverlap()

Alignment::printSeqOverlap ( void  )

Prints the overlap between sequences.

Definition at line 1001 of file Alignment.cpp.

References calculateSeqOverlap(), utils::max(), numberOfSequences, overlaps, and seqsName.

Referenced by trimAlManager::print_statistics().

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

◆ setBlockSize()

Alignment::setBlockSize ( int  blockSize)

BlockSize Setter.

Parameters
blockSizeNew value.

Definition at line 267 of file Alignment.cpp.

References Cleaner::blockSize, and Cleaning.

Referenced by trimAlManager::innerPerform().

+ Here is the caller graph for this function:

◆ setKeepSequencesFlag()

Alignment::setKeepSequencesFlag ( bool  newFlagValue)

Keep Sequences setter.

Parameters
newFlagValueNew flag value

Definition at line 274 of file Alignment.cpp.

References Cleaning, and Cleaner::keepSequences.

Referenced by trimAlManager::innerPerform().

+ Here is the caller graph for this function:

◆ setWindowsSize()

Alignment::setWindowsSize ( int  ghWindow,
int  shWindow 
)

Windows setter.

Parameters
ghWindowHalf the Gap Window.
shWindowHalf the Similarity Window.

Definition at line 259 of file Alignment.cpp.

References statistics::Manager::ghWindow, statistics::Manager::shWindow, and Statistics.

Referenced by trimAlManager::set_window_size().

+ Here is the caller graph for this function:

◆ statSVG()

bool Alignment::statSVG ( const char *const  destFile)

Definition at line 1431 of file Alignment.cpp.

References statistics::Manager::consistency, filename, statistics::Manager::gaps, statistics::Gaps::getGapsWindow(), statistics::Similarity::getMdkWindowedVector(), statistics::Consistency::getValues(), numberOfResidues, originalNumberOfResidues, originalNumberOfSequences, utils::quicksort(), statistics::Manager::similarity, and Statistics.

Referenced by trimAlManager::svg_stats_out().

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

◆ updateSequencesAndResiduesNums()

Alignment::updateSequencesAndResiduesNums ( bool  countSequences = true,
bool  countResidues = true 
)

Updates the sequence number and residue number based on saveResidues and saveSequences.

Parameters
countSequencesWhether to count sequences
countResiduesWhether to count residues

Definition at line 2347 of file Alignment.cpp.

References numberOfResidues, numberOfSequences, originalNumberOfResidues, originalNumberOfSequences, saveResidues, and saveSequences.

Referenced by Cleaner::removeColumns(), Cleaner::removeOnlyTerminal(), and Cleaner::removeSequences().

+ Here is the caller graph for this function:

Member Data Documentation

◆ alignmentInfo

Alignment::alignmentInfo

String containing information of the alignment as a whole.

Definition at line 86 of file Alignment.h.

Referenced by Alignment().

◆ Cleaning

◆ dataType

Alignment::dataType = SequenceTypes::NotDefined
private

Flag variable that represents the type of the alignment.

Definition at line 51 of file Alignment.h.

Referenced by Alignment(), and getAlignmentType().

◆ filename

◆ identities

Alignment::identities = nullptr

2D Matrix that represents how much each sequence resembles other sequences in the same MSA

Identity score between two sequences is the ratio of identical residues by the total length (common and no-common residues) among them.

Definition at line 89 of file Alignment.h.

Referenced by Alignment(), Cleaner::calculateRelaxedSeqIdentity(), Cleaner::calculateRepresentativeSeq(), Cleaner::calculateSeqIdentity(), Cleaner::getCutPointClusters(), printSeqIdentity(), Cleaner::selectMethod(), and ~Alignment().

◆ isAligned

Alignment::isAligned = false

Flag that indicates if all sequences on the alignment have the same length (Including gaps).

Definition at line 76 of file Alignment.h.

Referenced by Alignment(), alignmentSummaryHTML(), alignmentSummarySVG(), fillMatrices(), isFileAligned(), and main().

◆ numberOfResidues

◆ numberOfSequences

◆ originalNumberOfResidues

Alignment::originalNumberOfResidues = 0

◆ originalNumberOfSequences

◆ overlaps

Alignment::overlaps = nullptr

Matrix that stores the overlap between sequences of an alignment. See Alignment::calculateSeqOverlap.

Definition at line 92 of file Alignment.h.

Referenced by calculateSeqOverlap(), and printSeqOverlap().

◆ saveResidues

◆ saveSequences

◆ SeqRef

Alignment::SeqRef = nullptr

Pointer to keep a count of how many alignments depend on the same shared-sequences.
Increased on each trim step, and automatically reduced on each alignment destroy.
If it arrives to 0, the last alignment being destroyed will also take care of releasing memory for shared information.

Definition at line 66 of file Alignment.h.

Referenced by Alignment(), and ~Alignment().

◆ seqsInfo

Alignment::seqsInfo = nullptr

Vector containing extra information about each sequence.

Definition at line 82 of file Alignment.h.

Referenced by Alignment(), getTranslationCDS(), and ~Alignment().

◆ seqsName

◆ sequences

◆ SequencesMatrix

Alignment::SequencesMatrix = nullptr

SequencesMatrix submodule
This helper module stores the sequences without gaps. Useful when comparing MSA.

Definition at line 62 of file Alignment.h.

Referenced by Alignment(), statistics::Consistency::compareAndChoose(), statistics::Consistency::forceComparison(), statistics::Consistency::perform(), and ~Alignment().

◆ Statistics


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