-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathAnnotationString.h
89 lines (84 loc) · 1.93 KB
/
AnnotationString.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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
#ifndef _ANNOTATIONSTRING_H_
#define _ANNOTATIONSTRING_H_
/**
* A class that provide strings corresponding to above annotation types.
*/
class OutputAnnotationString{
public:
OutputAnnotationString(){
this->setFormat("default");
}
// support vaious output format, e.g. default, or epacts
void setFormat(const char* format) {
std::string f = format;
f = toLower(f);
if ( f == "default" ) {
this->annotationString = OutputAnnotationString::defaultAnnotationString;
} else if (f == "epact") {
this->annotationString = OutputAnnotationString::epactAnnotationString;
} else {
fprintf(stderr, "Cannot recoginized format: [ %s ]!\n", format);
};;
};
const char* operator [] (const int idx) {
return this->annotationString[idx];
};
private:
const char** annotationString;
static const char* defaultAnnotationString[];
static const char* epactAnnotationString[];
}; // end class OutputAnnotationString
const char* OutputAnnotationString::defaultAnnotationString[] = {
"StructuralVariation",
"Stop_Gain",
"Stop_Loss",
"Start_Gain",
"Start_Loss",
"Frameshift",
"CodonGain",
"CodonLoss",
"CodonRegion",
"Insertion",
"Deletion",
"Nonsynonymous",
"Synonymous",
"Essential_Splice_Site",
"Normal_Splice_Site",
"Utr5",
"Utr3",
"Exon",
"Intron",
"Upstream",
"Downstream",
"SNV",
"Noncoding",
"Intergenic",
"Monomorphic"
};
const char* OutputAnnotationString::epactAnnotationString[]= {
"StructuralVariation",
"Nonsense", // diff
"Stop_Loss",
"Start_Gain",
"Start_Loss",
"Frameshift",
"CodonGain",
"CodonLoss",
"CodonRegion",
"Insertion",
"Deletion",
"Missense", // diff
"Silent", // diff
"Essential_Splice_Site",
"Normal_Splice_Site",
"Utr5",
"Utr3",
"Exon",
"Intron",
"Upstream",
"Downstream",
"SNV",
"Noncoding",
"Intergenic"
};
#endif /* _ANNOTATIONSTRING_H_ */