-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathCodonTree.H
30 lines (26 loc) · 872 Bytes
/
CodonTree.H
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
/****************************************************************
CodonTree.H
Copyright (C)2013 William H. Majoros ([email protected]).
This is OPEN SOURCE SOFTWARE governed by the Gnu General Public
License (GPL) version 3, as described at www.opensource.org.
****************************************************************/
#ifndef INCL_CodonTree_H
#define INCL_CodonTree_H
#include "BOOM/Array1D.H"
#include <iostream>
using namespace std;
class CodonTree
{
BOOM::Array1D<double> array; // 125 elements (5^3 codons including 'N')
void load(istream &);
int codonToIndex(const char *);
BOOM::String decode(int base5); // base-5 number -> codon
public:
CodonTree(istream &);
CodonTree(const CodonTree &);
float scoreCodon(const char *,int pos);
float scoreCodon(const char *);
void revComplementSelf();
CodonTree *clone() const;
};
#endif