-
Notifications
You must be signed in to change notification settings - Fork 66
/
Genome.hh
40 lines (34 loc) · 954 Bytes
/
Genome.hh
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
#ifndef __GENOMES__
#define __GENOMES__
// C/C++ includes
#include <string>
#include <ctype.h>
#include <iostream>
using namespace std;
class Genome
{
private:
Genome(string name);
private:
static const int NGS = 3;
static Genome genomes[NGS];
string gname_,other_gname_;
static const int MAX_N_CHROMS_ = 100;
static const string CHRX, CHRY;
string cnames_[MAX_N_CHROMS_];
int clens_[MAX_N_CHROMS_];
int n_chr_;
public:
static const string CHRALL, CHRSEX;
static Genome *get(string name);
static string canonicalChromName(string name);
static string extendedChromName(string name);
static bool isSexChrom(string name);
public:
string name() { return gname_; }
int numChrom() { return n_chr_; }
string chromName(int i) { return (i >= 0 && i < n_chr_) ? cnames_[i] : ""; }
int chromLen(int i) { return (i >= 0 && i < n_chr_) ? clens_[i] : 0; }
int getChromosomeIndex(string chr);
};
#endif