-
Notifications
You must be signed in to change notification settings - Fork 296
Expand file tree
/
Copy pathsummaryFile.h
More file actions
51 lines (37 loc) · 1.11 KB
/
summaryFile.h
File metadata and controls
51 lines (37 loc) · 1.11 KB
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
/*
* summaryFile.h
*
* Created on: Jan 02, 2019
* Author: Aaron Quinlan
*/
#ifndef SUMMARYFILE_H_
#define SUMMARYFILE_H_
#include "ToolBase.h"
#include "ContextSummary.h"
#include <stdint.h>
struct Interval {
CHRPOS start;
CHRPOS end;
};
class SummaryFile : public ToolBase {
public:
SummaryFile(ContextSummary *context);
virtual ~SummaryFile();
virtual bool init();
virtual bool findNext(RecordKeyVector &hits);
virtual void processHits(RecordOutputMgr *outputMgr, RecordKeyVector &hits) {}
virtual void cleanupHits(RecordKeyVector &hits) {}
virtual bool finalizeCalculations() { return true; }
virtual void giveFinalReport(RecordOutputMgr *);
protected:
FileRecordMgr *_frm;
Record *_currRec;
uint64_t _total_length;
uint64_t _total_intervals;
const NewGenomeFile *_genomeFile;
const vector<string> &_chromList;
map<string, vector<Interval>, std::less<string> > _chromData;
FileRecordMgr *_inputFile;
virtual ContextSummary *upCast(ContextBase *context) { return static_cast<ContextSummary *>(context); }
};
#endif /* SUMMARYFILE_H_ */