-
Notifications
You must be signed in to change notification settings - Fork 0
/
allmotifs.hpp
96 lines (88 loc) · 2.34 KB
/
allmotifs.hpp
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
90
91
92
93
94
95
96
//
// allmotifs.hpp
// APOBECXP
//
// Created by Marat Kazanov on 14/04/2019.
// Copyright © 2019 Marat Kazanov. All rights reserved.
//
#ifndef allmotifs_hpp
#define allmotifs_hpp
#include <stdio.h>
#include <string>
#include "mutation.hpp"
#include "replicationtime.hpp"
using namespace std;
class CRTMapKey {
public:
string motif;
int RTbin;
int RTstrand;
char mutbase;
CRTMapKey(string motif_, int RTbin_, int RTstrand_, char mutbase_);
bool operator< (const CRTMapKey &right) const
{
if(motif < right.motif)
return true;
else if (motif > right.motif)
return false;
else
{
if(RTbin < right.RTbin)
return true;
else if (RTbin > right.RTbin)
return false;
else
{
if(RTstrand < right.RTstrand)
return true;
else if (RTstrand > right.RTstrand)
return false;
else
{
if(mutbase < right.mutbase)
return true;
else if(mutbase > right.mutbase)
return false;
else
return false;
}
}
}
}
};
class CRTMapKeyNoMut {
public:
string motif;
int RTbin;
int RTstrand;
CRTMapKeyNoMut(string motif_, int RTbin_, int RTstrand_);
bool operator< (const CRTMapKeyNoMut &right) const
{
if(motif < right.motif)
return true;
else if (motif > right.motif)
return false;
else
{
if(RTbin < right.RTbin)
return true;
else if (RTbin > right.RTbin)
return false;
else
{
if(RTstrand < right.RTstrand)
return true;
else if (RTstrand > right.RTstrand)
return false;
else
return false;
}
}
}
};
class CAllMotifs{
public:
void AnalysisRTmutations(CMutations& muts, string dirpath, CReplicationTiming& rti, CHumanGenome* phuman, string cancer, string sample);
void AnalysisRTtargets(string dirpath, CReplicationTiming& rti, CHumanGenome* phuman);
};
#endif /* allmotifs_hpp */