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