File: AACodons.h

package info (click to toggle)
trinityrnaseq 2.6.6%2Bdfsg-6
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 346,416 kB
  • sloc: perl: 47,542; cpp: 20,209; java: 12,484; python: 2,766; sh: 1,665; makefile: 895; ansic: 90; xml: 83
file content (33 lines) | stat: -rw-r--r-- 962 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
/* -*- c-basic-offset: 4; indent-tabs-mode: nil -*- */ 
#ifndef _AACODONS_H_
#define _AACODONS_H_

#include <vector>
#include "base/SVector.h"
#include "analysis/DNAVector.h"

// forward declare some classes
// http://stackoverflow.com/questions/2133250/does-not-name-a-type-error-in-c
class DNAVector;
class AAAmb;

class AACodons {
public:
    static void init();
    static const string & GetBases(char aa, int i);
    static char GetCodon(const DNAVector& d, int pos);
    static char GetCodon(const char * p);
    static int GetCodonCount();
    static const string & GetCodon(int i);
    static void AminoAcidToBases(char * out, char aa);
    static char BasesToAminoAcid(char * b);
private:
    static bool initialized;
    static svec<int> m_table;
    static svec<AAAmb> m_bases;
    static svec<char> m_aminoAcids;
    static svec<string> m_codonBases;
    static void Set(const string & aa, const string & codon, int index);
};

#endif //_AACODONS_H_