libBigWig
bwValues.h
Go to the documentation of this file.
1 #ifndef LIBBIGWIG_VALUES_H
2 #define LIBBIGWIG_VALUES_H
3 
4 #include <inttypes.h>
12 //N.B., coordinates are still 0-based half open!
20 typedef struct bwRTreeNode_t {
21  uint8_t isLeaf;
22  //1 byte of padding
23  uint16_t nChildren;
24  uint32_t *chrIdxStart;
25  uint32_t *baseStart;
26  uint32_t *chrIdxEnd;
27  uint32_t *baseEnd;
28  uint64_t *dataOffset;
29  union {
30  uint64_t *size;
31  struct bwRTreeNode_t **child;
32  } x;
34 
38 //TODO rootOffset is pointless, it's 48bytes after the indexOffset
39 typedef struct {
40  uint32_t blockSize;
41  uint64_t nItems;
42  uint32_t chrIdxStart;
43  uint32_t baseStart;
44  uint32_t chrIdxEnd;
45  uint32_t baseEnd;
46  uint64_t idxSize;
47  uint32_t nItemsPerSlot;
48  //There's 4 bytes of padding in the file here
49  uint64_t rootOffset;
51 } bwRTree_t;
52 
56 typedef struct {
57  uint64_t n;
58  uint64_t *offset;
59  uint64_t *size;
61 
67 typedef struct {
68  uint32_t tid;
69  uint32_t start;
70  uint32_t end;
71  uint32_t step;
72  uint32_t span;
73  uint8_t type;
74  uint16_t nItems;
76 
77 #endif // LIBBIGWIG_VALUES_H
bwRTreeNode_t::nChildren
uint16_t nChildren
Definition: bwValues.h:23
bwRTreeNode_t::chrIdxEnd
uint32_t * chrIdxEnd
Definition: bwValues.h:26
bwRTreeNode_t
A node within an R-tree holding the index for data.
Definition: bwValues.h:20
bwRTreeNode_t::x
union bwRTreeNode_t::@1 x
bwOverlapBlock_t::size
uint64_t * size
Definition: bwValues.h:59
bwDataHeader_t
The header section of a given data block.
Definition: bwValues.h:67
bwDataHeader_t::step
uint32_t step
Definition: bwValues.h:71
bwRTree_t::blockSize
uint32_t blockSize
Definition: bwValues.h:40
bwRTreeNode_t::baseEnd
uint32_t * baseEnd
Definition: bwValues.h:27
bwRTreeNode_t::dataOffset
uint64_t * dataOffset
Definition: bwValues.h:28
bwDataHeader_t::nItems
uint16_t nItems
Definition: bwValues.h:74
bwRTreeNode_t
struct bwRTreeNode_t bwRTreeNode_t
A node within an R-tree holding the index for data.
bwDataHeader_t::type
uint8_t type
Definition: bwValues.h:73
bwDataHeader_t::span
uint32_t span
Definition: bwValues.h:72
bwRTree_t
Definition: bwValues.h:39
bwRTreeNode_t::size
uint64_t * size
Definition: bwValues.h:30
bwRTreeNode_t::chrIdxStart
uint32_t * chrIdxStart
Definition: bwValues.h:24
bwRTree_t::baseStart
uint32_t baseStart
Definition: bwValues.h:43
bwOverlapBlock_t
This structure holds the data blocks that overlap a given interval.
Definition: bwValues.h:56
bwRTreeNode_t::baseStart
uint32_t * baseStart
Definition: bwValues.h:25
bwRTree_t::nItems
uint64_t nItems
Definition: bwValues.h:41
bwDataHeader_t::start
uint32_t start
Definition: bwValues.h:69
bwOverlapBlock_t::n
uint64_t n
Definition: bwValues.h:57
bwDataHeader_t::end
uint32_t end
Definition: bwValues.h:70
bwRTreeNode_t::child
struct bwRTreeNode_t ** child
Definition: bwValues.h:31
bwRTree_t::chrIdxEnd
uint32_t chrIdxEnd
Definition: bwValues.h:44
bwRTreeNode_t::isLeaf
uint8_t isLeaf
Definition: bwValues.h:21
bwRTree_t::root
bwRTreeNode_t * root
Definition: bwValues.h:50
bwRTree_t::nItemsPerSlot
uint32_t nItemsPerSlot
Definition: bwValues.h:47
bwRTree_t::chrIdxStart
uint32_t chrIdxStart
Definition: bwValues.h:42
bwRTree_t::rootOffset
uint64_t rootOffset
Definition: bwValues.h:49
bwDataHeader_t::tid
uint32_t tid
Definition: bwValues.h:68
bwRTree_t::idxSize
uint64_t idxSize
Definition: bwValues.h:46
bwOverlapBlock_t::offset
uint64_t * offset
Definition: bwValues.h:58
bwRTree_t::baseEnd
uint32_t baseEnd
Definition: bwValues.h:45