forked from jfmrod/MAPseq
-
Notifications
You must be signed in to change notification settings - Fork 0
/
eseq.h
59 lines (50 loc) · 1.13 KB
/
eseq.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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#ifndef ESEQ_H
#define ESEQ_H
#include <eutils/estr.h>
#include <eutils/eintarray.h>
#include <eutils/ebasicarray.h>
class eseqtaxlevel
{
public:
int tid;
float cf;
eseqtaxlevel(): tid(-1),cf(0.0) {}
eseqtaxlevel(int _tid): tid(_tid),cf(0.0) {}
eseqtaxlevel(int _tid,float _cf): tid(_tid),cf(_cf) {}
};
class eseqtax
{
public:
// int tid;
// float cf;
// float ncf;
float bid;
// int seqid;
ebasicarray<eseqtaxlevel> tl;
eseqtax(): bid(0.0) {}
// eseqtax(): seqid(-1),bid(0.0) {}
// eseqtax(int _seqid,float _bid): seqid(_seqid),bid(_bid) {}
eseqtax(float _bid): bid(_bid) {}
};
class eseq
{
public:
// estr useq;
estr seq;
long seqlen;
long seqstart;
eseq();
eseq(estr& seq);
void setseq(estr& seq);
void setprot(estr& seq);
void revcompl();
void setrevcompl(const eseq& seq,long i,long e);
estr print_seq(int i=0,int e=-1) const;
estr print_pseq(int i=0,int e=-1) const;
eseq subseq(int i,int l) const;
bool operator<(const eseq& s);
friend ostream& operator<<(ostream& stream,const eseq& seq);
};
char cnuc2chr(uint32_t cc);
ostream& operator<<(ostream& stream,const eseq& seq);
#endif