NEFFy
NEFF Calculator and MSA File Converter
Loading...
Searching...
No Matches
MultimerHandler Class Reference

#include <multimerHandler.h>

Public Member Functions

 MultimerHandler (std::string _stoichiom)
 // Constructor to initialize the stoichiometry
 
std::string chainIndexToStoichiomLetter (int index)
 Map chain index to stoichiometry letter.
 
bool getHeteromerMSAs (const std::vector< std::vector< int > > &vectors)
 Verify if the MSA is in the form of a paired MSA (sequences followed by the MSA of each chain)
 
bool isHeteromerFormat ()
 Check if stoichiometry follows the pattern of a heteromer (e.g., A2B2C1)
 
bool isHomomerFormat ()
 Check if the stoichiometry is in homomer format (e.g., A3)
 
std::vector< std::vector< int > > getHomomerIndividualMSA (const std::vector< std::vector< int > > &sequences2num)
 Get individual MSA for homomer format.
 
std::vector< std::vector< std::vector< int > > > getHetoromerMSAs (const std::vector< std::vector< int > > &sequences2num, const std::vector< int > &chainLengths)
 Get individual MSA for heteromer format.
 

Private Member Functions

std::vector< int > getSequenceSegment (const std::vector< int > &row, int chainIndex, int repeat=1) const
 // Extract the sequence segment from the row that corresponds to the chain specified by the given chainIndex.
 
std::vector< int > checkRepeatedChainAndReturnOneSegment (const std::vector< int > &row, int rowIndex, int chainIndex)
 Verify if all segments of the repeated chains in the given row are identical, and if so, return a single segment.
 
bool includesInPairedMSA (const std::vector< int > &row)
 Check if the row is for the paired MSA, i.e, it includes at least two sequence segements corresponding to two chains with non-gap elements.
 
int checkRowCorrespondsOnlyToOneChainAndReturnChainIndex (const std::vector< int > &row, int row_index)
 // Find index of the chain corrsponding to given row; it should correspond exactly to one chain
 
std::vector< int > checkMSAFormatAndReturnRowIndexIntervalsCorrespondingToChains (const std::vector< int > &chainIndexOfRows)
 Check MSA format and return MSA row index intervals corresponding to each chain.
 

Private Attributes

std::string stoichiom
 
std::vector< int > numbers
 
int chainsCount
 
std::vector< int > chainIntervals
 

Constructor & Destructor Documentation

◆ MultimerHandler()

MultimerHandler::MultimerHandler ( std::string _stoichiom)

// Constructor to initialize the stoichiometry

Parameters
_stoichiom

Member Function Documentation

◆ chainIndexToStoichiomLetter()

string MultimerHandler::chainIndexToStoichiomLetter ( int index)

Map chain index to stoichiometry letter.

Parameters
index
Returns
stoichiometry letter

◆ checkMSAFormatAndReturnRowIndexIntervalsCorrespondingToChains()

vector< int > MultimerHandler::checkMSAFormatAndReturnRowIndexIntervalsCorrespondingToChains ( const std::vector< int > & chainIndexOfRows)
private

Check MSA format and return MSA row index intervals corresponding to each chain.

Parameters
chainIndexOfRows
Returns

◆ checkRepeatedChainAndReturnOneSegment()

vector< int > MultimerHandler::checkRepeatedChainAndReturnOneSegment ( const std::vector< int > & row,
int rowIndex,
int chainIndex )
private

Verify if all segments of the repeated chains in the given row are identical, and if so, return a single segment.

Parameters
row
rowIndex
chainIndex
Returns
chainSegment

◆ checkRowCorrespondsOnlyToOneChainAndReturnChainIndex()

int MultimerHandler::checkRowCorrespondsOnlyToOneChainAndReturnChainIndex ( const std::vector< int > & row,
int row_index )
private

// Find index of the chain corrsponding to given row; it should correspond exactly to one chain

Parameters
row
row_index
Returns

◆ getHeteromerMSAs()

bool MultimerHandler::getHeteromerMSAs ( const std::vector< std::vector< int > > & vectors)

Verify if the MSA is in the form of a paired MSA (sequences followed by the MSA of each chain)

Parameters
msa
Returns

◆ getHetoromerMSAs()

vector< vector< vector< int > > > MultimerHandler::getHetoromerMSAs ( const std::vector< std::vector< int > > & sequences2num,
const std::vector< int > & chainLengths )

Get individual MSA for heteromer format.

Parameters
sequences2num
chain_lengths
Returns
individual MSAs

◆ getHomomerIndividualMSA()

vector< vector< int > > MultimerHandler::getHomomerIndividualMSA ( const std::vector< std::vector< int > > & sequences2num)

Get individual MSA for homomer format.

Returns
individual MSA

◆ getSequenceSegment()

vector< int > MultimerHandler::getSequenceSegment ( const std::vector< int > & row,
int chainIndex,
int repeat = 1 ) const
private

// Extract the sequence segment from the row that corresponds to the chain specified by the given chainIndex.

Parameters
row
chainIndex
repeat
Returns

◆ includesInPairedMSA()

bool MultimerHandler::includesInPairedMSA ( const std::vector< int > & row)
private

Check if the row is for the paired MSA, i.e, it includes at least two sequence segements corresponding to two chains with non-gap elements.

Parameters
row
Returns

◆ isHeteromerFormat()

bool MultimerHandler::isHeteromerFormat ( )

Check if stoichiometry follows the pattern of a heteromer (e.g., A2B2C1)

Returns

◆ isHomomerFormat()

bool MultimerHandler::isHomomerFormat ( )

Check if the stoichiometry is in homomer format (e.g., A3)

Returns

Member Data Documentation

◆ chainIntervals

std::vector<int> MultimerHandler::chainIntervals
private

◆ chainsCount

int MultimerHandler::chainsCount
private

◆ numbers

std::vector<int> MultimerHandler::numbers
private

◆ stoichiom

std::string MultimerHandler::stoichiom
private

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