forked from gpertea/stringtie
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdot_record.cpp
More file actions
executable file
·59 lines (51 loc) · 1.3 KB
/
dot_record.cpp
File metadata and controls
executable file
·59 lines (51 loc) · 1.3 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
52
53
54
55
56
57
58
#include "dot_record.h"
#include "GBitVec.h"
#include "unispg.h"
#include <float.h>
#define GMEMTRACE 1 //debugging memory allocation
#ifdef GMEMTRACE
#include "proc_mem.h"
#endif
bool DOTInputFile::start(const char* fn) {
this -> file = fn;
this -> tmpfile = fn;
//stringtie multi-BAM input
// for (int i=0;i<bamfiles.Count();++i) {
this -> reader = new DOTReader(this -> file);
bool is_dot_open;
is_dot_open = this -> reader -> dotopen(this -> file);
// if (is_dot_open) {
// this -> rec = this -> reader->next();
// }
return is_dot_open;
// UnispgGp_APPLY* brec=this -> reader->next();
}
void DOTInputFile::set_samples() {
reader->set_samples(this->samples);
}
UnispgGp_APPLY* DOTInputFile::next() {
//must free old current record first
// delete rec;
rec=NULL;
rec = reader->next();
// this -> updateUnispgGp_APPLYGp();
// uni_splice_graphs
return rec;
// if (recs.Count()>0) {
// crec=recs.Pop();//lowest coordinate
// UnispgGp_APPLY* rnext = this->reader->next();
// if (rnext)
// recs.Add(new DOTInputRecord(rnext, crec->fidx));
// return crec->brec;
// return rnext;
// }
// else return NULL;
}
void DOTInputFile::stop() {
delete rec;
rec=NULL;
this->reader -> dotclose();
// if (!keepTempFiles) {
// unlink(tmpfile.chars());
// }
}