-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathclass.hpp
85 lines (66 loc) · 1.68 KB
/
class.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
#ifndef __IOS_H__
#define __IOS_H__
#include <iostream>
#endif
#ifndef __STDL__
#define __STDL__
#include <stdlib.h>
#endif
#ifndef __STR_H__
#define __STR_H__
#include <string.h>
#endif
#ifndef __TIM_H__
#define __TIM_H__
#include <time.h>
#endif
#ifndef __FSTREAM__
#define __FSTREAM__
#include <fstream>
#endif
#ifndef __GEN_H__
#define __GEN_H__
#include "general.h"
#endif
#define DEBUG 0
#define DIST 0
namespace PEAK
{
using namespace std;
using namespace general;
const unsigned int MAXSIZE=1024;
//! Class used to encode peak
class Peak{
//! it stores the frequency for each position
unsigned int* count;
//! it stores the lower position for which the frequencies are computed
unsigned int lower;
//! it stores the upper position for which the frequencies are computed
unsigned int upper;
//! it stores the count size
unsigned int dim;
//! it stores the input file name
string inputName;
//! it stores the output file name
string outputName;
//! it stores the Chromosome Id
string Chr;
//! it stores the threshold used during the result analysis
unsigned int th;
public:
//!Empty constructor
Peak(){count= NULL; dim=lower=upper=th=0; inputName=outputName=Chr="";};
//!Constructor
Peak(const unsigned int lower, const unsigned int upper,const unsigned int th, const char* input,const char* output,const char* Chr);
//!Read the input file
void Read();
//!Identify the peak positions
void CheckPeak();
//!Print the class values
void Print()const;
//!Destructor
~Peak();
private:
void printPeak(const unsigned int l, const unsigned int u,ofstream& out);
};
};