NEFFy
NEFF Calculator and MSA File Converter
Loading...
Searching...
No Matches
MSAReader Class Referenceabstract

#include <msaReader.h>

Inheritance diagram for MSAReader:
MSAReader_a2m MSAReader_a3m MSAReader_aln MSAReader_clustal MSAReader_fasta MSAReader_pfam MSAReader_sto

Public Member Functions

 MSAReader (std::string _file, Alphabet _alphabet, bool _checkValidation, bool _omitGaps=false)
 Constructor.
 
std::vector< Sequenceread ()
 Read the MSA file.
 

Protected Member Functions

int isUnaligned ()
 Check if the MSA sequences are aligned.
 
std::string containsInvalidLetters (Alphabet alphabet)
 Check if the sequences contain any invalid characters.
 
void makeUppercase ()
 Convert all lowercase letters to uppercase in the sequences.
 
void validateSequences (Alphabet alphabet)
 Validate the sequences for any invalid characters or unaligned sequences.
 
virtual void readFile (std::ifstream &file)=0
 

Protected Attributes

std::string file
 
Alphabet alphabet
 
bool checkValidation
 
bool omitGaps
 
std::vector< SequenceSequences
 

Constructor & Destructor Documentation

◆ MSAReader()

MSAReader::MSAReader ( std::string _file,
Alphabet _alphabet,
bool _checkValidation,
bool _omitGaps = false )

Constructor.

Parameters
_file
_alphabet
_checkValidation
_omitGaps

Member Function Documentation

◆ containsInvalidLetters()

string MSAReader::containsInvalidLetters ( Alphabet alphabet)
protected

Check if the sequences contain any invalid characters.

Returns
The sequence number and position of the first invalid character, or an empty string if valid

◆ isUnaligned()

int MSAReader::isUnaligned ( )
protected

Check if the MSA sequences are aligned.

Returns
-1 if aligned, otherwise return the index of the unaligned sequence

◆ makeUppercase()

void MSAReader::makeUppercase ( )
protected

Convert all lowercase letters to uppercase in the sequences.

◆ read()

vector< Sequence > MSAReader::read ( )

Read the MSA file.

Returns
The processed sequences in the file

◆ readFile()

virtual void MSAReader::readFile ( std::ifstream & file)
protectedpure virtual

◆ validateSequences()

void MSAReader::validateSequences ( Alphabet alphabet)
protected

Validate the sequences for any invalid characters or unaligned sequences.

Parameters
alphabet

Member Data Documentation

◆ alphabet

Alphabet MSAReader::alphabet
protected

◆ checkValidation

bool MSAReader::checkValidation
protected

◆ file

std::string MSAReader::file
protected

◆ omitGaps

bool MSAReader::omitGaps
protected

◆ Sequences

std::vector<Sequence> MSAReader::Sequences
protected

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