libBigWig
bwValues.h
Go to the documentation of this file.
1 #include <inttypes.h>
9 //N.B., coordinates are still 0-based half open!
17 typedef struct bwRTreeNode_t {
18  uint8_t isLeaf;
19  //1 byte of padding
20  uint16_t nChildren;
21  uint32_t *chrIdxStart;
22  uint32_t *baseStart;
23  uint32_t *chrIdxEnd;
24  uint32_t *baseEnd;
25  uint64_t *dataOffset;
26  union {
27  uint64_t *size;
28  struct bwRTreeNode_t **child;
29  } x;
31 
35 //TODO rootOffset is pointless, it's 48bytes after the indexOffset
36 typedef struct {
37  uint32_t blockSize;
38  uint64_t nItems;
39  uint32_t chrIdxStart;
40  uint32_t baseStart;
41  uint32_t chrIdxEnd;
42  uint32_t baseEnd;
43  uint64_t idxSize;
44  uint32_t nItemsPerSlot;
45  //There's 4 bytes of padding in the file here
46  uint64_t rootOffset;
48 } bwRTree_t;
49 
53 typedef struct {
54  uint64_t n;
55  uint64_t *offset;
56  uint64_t *size;
58 
64 typedef struct {
65  uint32_t tid;
66  uint32_t start;
67  uint32_t end;
68  uint32_t step;
69  uint32_t span;
70  uint8_t type;
71  uint16_t nItems;
bwRTreeNode_t::nChildren
uint16_t nChildren
Definition: bwValues.h:20
bwRTreeNode_t::chrIdxEnd
uint32_t * chrIdxEnd
Definition: bwValues.h:23
bwRTreeNode_t
A node within an R-tree holding the index for data.
Definition: bwValues.h:17
bwRTreeNode_t::x
union bwRTreeNode_t::@1 x
bwOverlapBlock_t::size
uint64_t * size
Definition: bwValues.h:56
bwDataHeader_t
The header section of a given data block.
Definition: bwValues.h:64
bwDataHeader_t::step
uint32_t step
Definition: bwValues.h:68
bwRTree_t::blockSize
uint32_t blockSize
Definition: bwValues.h:37
bwRTreeNode_t::baseEnd
uint32_t * baseEnd
Definition: bwValues.h:24
bwRTreeNode_t::dataOffset
uint64_t * dataOffset
Definition: bwValues.h:25
bwDataHeader_t::nItems
uint16_t nItems
Definition: bwValues.h:71
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:70
bwDataHeader_t::span
uint32_t span
Definition: bwValues.h:69
bwRTree_t
Definition: bwValues.h:36
bwRTreeNode_t::size
uint64_t * size
Definition: bwValues.h:27
bwRTreeNode_t::chrIdxStart
uint32_t * chrIdxStart
Definition: bwValues.h:21
bwRTree_t::baseStart
uint32_t baseStart
Definition: bwValues.h:40
bwOverlapBlock_t
This structure holds the data blocks that overlap a given interval.
Definition: bwValues.h:53
bwRTreeNode_t::baseStart
uint32_t * baseStart
Definition: bwValues.h:22
bwRTree_t::nItems
uint64_t nItems
Definition: bwValues.h:38
bwDataHeader_t::start
uint32_t start
Definition: bwValues.h:66
bwOverlapBlock_t::n
uint64_t n
Definition: bwValues.h:54
bwDataHeader_t::end
uint32_t end
Definition: bwValues.h:67
bwRTreeNode_t::child
struct bwRTreeNode_t ** child
Definition: bwValues.h:28
bwRTree_t::chrIdxEnd
uint32_t chrIdxEnd
Definition: bwValues.h:41
bwRTreeNode_t::isLeaf
uint8_t isLeaf
Definition: bwValues.h:18
bwRTree_t::root
bwRTreeNode_t * root
Definition: bwValues.h:47
bwRTree_t::nItemsPerSlot
uint32_t nItemsPerSlot
Definition: bwValues.h:44
bwRTree_t::chrIdxStart
uint32_t chrIdxStart
Definition: bwValues.h:39
bwRTree_t::rootOffset
uint64_t rootOffset
Definition: bwValues.h:46
bwDataHeader_t::tid
uint32_t tid
Definition: bwValues.h:65
bwRTree_t::idxSize
uint64_t idxSize
Definition: bwValues.h:43
bwOverlapBlock_t::offset
uint64_t * offset
Definition: bwValues.h:55
bwRTree_t::baseEnd
uint32_t baseEnd
Definition: bwValues.h:42