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

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

#include <vector>
#include <string>

Go to the source code of this file.

Classes

struct  Sequence
 

Enumerations

enum  Normalization { Sqrt_L = 0 , L , None }
 
enum  Alphabet { protein = 0 , RNA , DNA }
 
enum  NonStandardHandler { AsStandard = 0 , ConsiderGapInCutoff , ConsiderGap }
 

Functions

std::string getFormat (std::string file, std::string name)
 Get the format from a file path.
 
void keepNonGapPositionsOfQuerySequence (std::vector< Sequence > &sequences)
 Keep only the positions of non-gap residues of the query sequence for all sequences.
 
std::string getAllowedLetters (Alphabet alphabet)
 gets the list of allowed letters for the provided input alphabet
 
std::string getStandardLetters (Alphabet alphabet)
 gets the list of standard letters for the provided input alphabet
 
std::string getNonStandardLetters (Alphabet alphabet)
 gets the list of non-standard letters for the provided input alphabet
 

Variables

const std::vector< std::string > VALID_FORMATS = {"fasta", "afa", "fas", "fst", "fsa", "a2m", "a3m", "sto", "clustal", "aln", "pfam"}
 
const std::vector< std::string > FASTA_FORMATS = {"fasta", "afa", "fas", "fst", "fsa"}
 
const std::string STANDARD_AMINO_ACIDS = "ACDEFGHIKLMNPQRSTVWY"
 
const std::string NON_STANDARD_AMINO_ACIDS = "XOUBJZ"
 
const std::string STANDARD_RNA_NUCLEOTIDES = "AUCG"
 
const std::string STANDARD_DNA_NUCLEOTIDES = "ATCG"
 
const std::string NON_STANDARD_NUCLEOTIDES = "N"
 
const std::string GAP = "-."
 

Detailed Description

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

Enumeration Type Documentation

◆ Alphabet

enum Alphabet
Enumerator
protein 
RNA 
DNA 

◆ NonStandardHandler

Enumerator
AsStandard 
ConsiderGapInCutoff 
ConsiderGap 

◆ Normalization

Enumerator
Sqrt_L 
None 

Function Documentation

◆ getAllowedLetters()

std::string getAllowedLetters ( Alphabet alphabet)

gets the list of allowed letters for the provided input alphabet

Parameters
alphabet
Returns
list of allowed letters

gets the list of allowed letters for the provided input alphabet

Parameters
alphabet
Returns

◆ getFormat()

std::string getFormat ( std::string file,
std::string name )

Get the format from a file path.

Parameters
filefile path.
namename of the file (for error messages).
Returns
The format string.

◆ getNonStandardLetters()

std::string getNonStandardLetters ( Alphabet alphabet)

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

Parameters
alphabet
Returns
list of non-standard letters

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

Parameters
alphabet
Returns

◆ getStandardLetters()

std::string getStandardLetters ( Alphabet alphabet)

gets the list of standard letters for the provided input alphabet

Parameters
alphabet
Returns
list of standard letters

gets the list of standard letters for the provided input alphabet

Parameters
alphabet
Returns

◆ keepNonGapPositionsOfQuerySequence()

void keepNonGapPositionsOfQuerySequence ( std::vector< Sequence > & sequences)

Keep only the positions of non-gap residues of the query sequence for all sequences.

Parameters
sequencesThe vector of sequences to process.

Variable Documentation

◆ FASTA_FORMATS

const std::vector<std::string> FASTA_FORMATS = {"fasta", "afa", "fas", "fst", "fsa"}
inline

◆ GAP

const std::string GAP = "-."

◆ NON_STANDARD_AMINO_ACIDS

const std::string NON_STANDARD_AMINO_ACIDS = "XOUBJZ"

◆ NON_STANDARD_NUCLEOTIDES

const std::string NON_STANDARD_NUCLEOTIDES = "N"

◆ STANDARD_AMINO_ACIDS

const std::string STANDARD_AMINO_ACIDS = "ACDEFGHIKLMNPQRSTVWY"

◆ STANDARD_DNA_NUCLEOTIDES

const std::string STANDARD_DNA_NUCLEOTIDES = "ATCG"

◆ STANDARD_RNA_NUCLEOTIDES

const std::string STANDARD_RNA_NUCLEOTIDES = "AUCG"

◆ VALID_FORMATS

const std::vector<std::string> VALID_FORMATS = {"fasta", "afa", "fas", "fst", "fsa", "a2m", "a3m", "sto", "clustal", "aln", "pfam"}
Footer