NEFFy
NEFF Calculator and MSA File Converter
Loading...
Searching...
No Matches
common.cpp File Reference

This file contains common utility functions used in the MSA project. More...

#include <algorithm>
#include <vector>
#include <string>
#include <functional>
#include <stdexcept>
#include "common.h"

Functions

string getFormat (const string &file, const string &format, const string &name)
 Get format of the given file.
 
void keepNonGapPositionsOfQuerySequence (vector< Sequence > &sequences)
 Remove gap positions of the query sequence from all sequences.
 
string getAllowedLetters (Alphabet alphabet)
 Return all standard + non-standard + gap letters for the given alphabet.
 
string getStandardLetters (Alphabet alphabet)
 Return standard letters of the given alphabet.
 
string getNonStandardLetters (Alphabet alphabet)
 Return non-standard letters of the given alphabet.
 

Detailed Description

This file contains common utility functions used in the MSA project.

Function Documentation

◆ getAllowedLetters()

string getAllowedLetters ( Alphabet alphabet)

Return all standard + non-standard + gap letters for the given alphabet.

gets the list of allowed letters for the provided input alphabet

Parameters
alphabet
Returns

◆ getFormat()

string getFormat ( const string & file,
const string & format,
const string & name )

Get format of the given file.

Parameters
file
format
name
Returns
finalFormat

◆ getNonStandardLetters()

string getNonStandardLetters ( Alphabet alphabet)

Return non-standard letters of the given alphabet.

gets the list of non-standard letters for the provided input alphabet

Parameters
alphabet
Returns

◆ getStandardLetters()

string getStandardLetters ( Alphabet alphabet)

Return standard letters of the given alphabet.

gets the list of standard letters for the provided input alphabet

Parameters
alphabet
Returns

◆ keepNonGapPositionsOfQuerySequence()

void keepNonGapPositionsOfQuerySequence ( vector< Sequence > & sequences)

Remove gap positions of the query sequence from all sequences.

Parameters
sequences
Footer