forked from marbl/canu
-
Notifications
You must be signed in to change notification settings - Fork 0
/
overlapReadCache.H
65 lines (49 loc) · 1.47 KB
/
overlapReadCache.H
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
/******************************************************************************
*
* This file is part of canu, a software program that assembles whole-genome
* sequencing reads into contigs.
*
* This software is based on:
* 'Celera Assembler' r4587 (http://wgs-assembler.sourceforge.net)
* the 'kmer package' r1994 (http://kmer.sourceforge.net)
*
* Except as indicated otherwise, this is a 'United States Government Work',
* and is released in the public domain.
*
* File 'README.licenses' in the root directory of this distribution
* contains full conditions and disclaimers.
*/
#include "runtime.H"
#include "sqStore.H"
#include "ovStore.H"
#include "tgStore.H"
#include <set>
class overlapReadCache {
public:
overlapReadCache(sqStore *seqStore_, uint64 memLimit);
~overlapReadCache();
private:
void loadRead(uint32 id);
void loadReads(std::set<uint32> reads);
void markForLoading(std::set<uint32> &reads, uint32 id);
public:
void loadReads(ovOverlap *ovl, uint32 nOvl);
void loadReads(tgTig *tig);
void purgeReads(void);
char *getRead(uint32 id) {
assert(readLen[id] > 0);
return(readSeqFwd[id]);
};
uint32 getLength(uint32 id) {
assert(readLen[id] > 0);
return(readLen[id]);
};
private:
sqStore *seqStore;
uint32 nReads;
uint32 *readAge;
uint32 *readLen;
char **readSeqFwd;
sqRead read;
uint64 memoryLimit;
};