-
Notifications
You must be signed in to change notification settings - Fork 0
/
dna.cpp
executable file
·67 lines (57 loc) · 1.13 KB
/
dna.cpp
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
//
// dna.cpp
// APOBECXP
//
// Created by Marat Kazanov on 01/12/2018.
// Copyright © 2018 Marat Kazanov. All rights reserved.
//
#include "dna.hpp"
int CDNA::END_CHROMOSOME = -2;
int CDNA::END_GENOME = -1;
CDNAPos::CDNAPos(int chrNum_, unsigned long pos_)
{
chrNum = chrNum_;
pos = pos_;
strand = "+";
}
CDNAPos::CDNAPos(int chrNum_, unsigned long pos_, string strand_)
{
chrNum = chrNum_;
pos = pos_;
strand = strand_;
}
int CDNAPos::isNull()
{
if(chrNum == -1)
return(1);
else
return(0);
}
CDNAInterval::CDNAInterval(int chrNum_, unsigned long startpos_, unsigned long endpos_)
{
chrNum = chrNum_;
startpos = startpos_;
endpos = endpos_;
strand = "+";
}
CDNAInterval::CDNAInterval(int chrNum_, unsigned long startpos_, unsigned long endpos_, string strand_)
{
chrNum = chrNum_;
startpos = startpos_;
endpos = endpos_;
strand = strand_;
}
int CDNAInterval::isNull()
{
if(chrNum == -1)
return(1);
else
return(0);
}
int CDNAInterval::Check()
{
if(!isNull() && startpos > endpos)
return(0);
else
return(1);
}