NEFFy
NEFF Calculator and MSA File Converter
Loading...
Searching...
No Matches
common.h
Go to the documentation of this file.
1
6#ifndef COMMON_H
7#define COMMON_H
8
9#include <vector>
10#include <string>
11
12const std::vector<std::string> VALID_FORMATS = {"fasta", "afa", "fas", "fst", "fsa", "a2m", "a3m", "sto", "clustal", "aln", "pfam"};
13
14inline const std::vector<std::string> FASTA_FORMATS = {"fasta", "afa", "fas", "fst", "fsa"};
15
16const std::string STANDARD_AMINO_ACIDS = "ACDEFGHIKLMNPQRSTVWY";
17const std::string NON_STANDARD_AMINO_ACIDS = "XOUBJZ";
18const std::string STANDARD_RNA_NUCLEOTIDES = "AUCG";
19const std::string STANDARD_DNA_NUCLEOTIDES = "ATCG";
20const std::string NON_STANDARD_NUCLEOTIDES = "N";
21const std::string GAP = "-.";
22
23// Structure to represent a sequence
25{
26 std::string id; // Sequence identifier
27 std::string sequence; // Sequence data
28 std::string remarks; // Remarks associated with the sequence
29};
30
31// Enumeration for NEFF normalization options
33{
34 Sqrt_L = 0, // Square root of the length
35 L, // Length
36 None // No normalization
37};
38
39// Enumeration for MSA alphabet
41{
44 DNA
45};
46
47// Enumeration for options we have for handling non-standard residues in neff computation
49{
50 AsStandard = 0, // treat the the same as standard residues, default in deepMSA symmetric
51 ConsiderGapInCutoff, // consider them as gaps when computing cutoff of sequence (only used in asymmetryc version, default in deepMSA assymetric)
52 ConsiderGap // consider them as gaps in computing similarity cutoff and checking position match/mismatch, default in Gremlin
53};
54
61std::string getFormat(std::string file, std::string name);
62
67void keepNonGapPositionsOfQuerySequence(std::vector<Sequence>& sequences);
68
72std::string getAllowedLetters(Alphabet alphabet);
73
77std::string getStandardLetters(Alphabet alphabet);
78
82std::string getNonStandardLetters(Alphabet alphabet);
83#endif
NonStandardHandler
Definition common.h:49
@ ConsiderGap
Definition common.h:52
@ ConsiderGapInCutoff
Definition common.h:51
@ AsStandard
Definition common.h:50
std::string getStandardLetters(Alphabet alphabet)
gets the list of standard letters for the provided input alphabet
Definition common.cpp:83
std::string getFormat(std::string file, std::string name)
Get the format from a file path.
Normalization
Definition common.h:33
@ Sqrt_L
Definition common.h:34
@ None
Definition common.h:36
@ L
Definition common.h:35
const std::string NON_STANDARD_AMINO_ACIDS
Definition common.h:17
const std::string STANDARD_DNA_NUCLEOTIDES
Definition common.h:19
const std::vector< std::string > VALID_FORMATS
Definition common.h:12
std::string getAllowedLetters(Alphabet alphabet)
gets the list of allowed letters for the provided input alphabet
Definition common.cpp:65
const std::vector< std::string > FASTA_FORMATS
Definition common.h:14
void keepNonGapPositionsOfQuerySequence(std::vector< Sequence > &sequences)
Keep only the positions of non-gap residues of the query sequence for all sequences.
std::string getNonStandardLetters(Alphabet alphabet)
gets the list of non-standard letters for the provided input alphabet
Definition common.cpp:101
const std::string NON_STANDARD_NUCLEOTIDES
Definition common.h:20
const std::string STANDARD_AMINO_ACIDS
Definition common.h:16
Alphabet
Definition common.h:41
@ protein
Definition common.h:42
@ RNA
Definition common.h:43
@ DNA
Definition common.h:44
const std::string STANDARD_RNA_NUCLEOTIDES
Definition common.h:18
const std::string GAP
Definition common.h:21
Definition common.h:25
std::string remarks
Definition common.h:28
std::string sequence
Definition common.h:27
std::string id
Definition common.h:26
Footer