libBigWig
|
Go to the source code of this file.
Functions | |
int | bwSetPos (bigWigFile_t *fp, size_t pos) |
Like fsetpos, but for local or remote bigWig files. This will set the file position indicator to the specified point. For local files this literally is fsetpos , while for remote files it fills a memory buffer with data starting at the desired position. More... | |
size_t | bwRead (void *data, size_t sz, size_t nmemb, bigWigFile_t *fp) |
A local/remote version of fread . Reads data from either local or remote bigWig files. More... | |
long | bwTell (bigWigFile_t *fp) |
Determine what the file position indicator say. This is equivalent to ftell for local or remote files. More... | |
bwRTree_t * | bwReadIndex (bigWigFile_t *fp, uint64_t offset) |
Reads a data index (either full data or a zoom level) from a bigWig file. There is little reason for end users to use this function. This must be freed with bwDestroyIndex More... | |
void | bwDestroyIndexNode (bwRTreeNode_t *node) |
Destroy an bwRTreeNode_t and all of its children. More... | |
void | bwDestroyIndex (bwRTree_t *idx) |
Frees space allocated by bwReadIndex There is generally little reason to use this, since end users should typically not need to run bwReadIndex themselves. More... | |
int | bwFinalize (bigWigFile_t *fp) |
Finishes what's needed to write a bigWigFile Flushes the buffer, converts the index linked list to a tree, writes that to disk, handles zoom level stuff, writes magic at the end. More... | |
You have no reason to use these functions. They may change without warning because there's no reason for them to be used outside of libBigWig's internals.
These are structures and functions from a variety of files that are used across files internally but don't need to be see by libBigWig users.
void bwDestroyIndex | ( | bwRTree_t * | idx | ) |
Frees space allocated by bwReadIndex
There is generally little reason to use this, since end users should typically not need to run bwReadIndex
themselves.
idx | A bwRTree_t pointer allocated by bwReadIndex . |
void bwDestroyIndexNode | ( | bwRTreeNode_t * | node | ) |
Destroy an bwRTreeNode_t and all of its children.
node | The node to destroy. |
int bwFinalize | ( | bigWigFile_t * | fp | ) |
Finishes what's needed to write a bigWigFile Flushes the buffer, converts the index linked list to a tree, writes that to disk, handles zoom level stuff, writes magic at the end.
fp | A valid bigWigFile_t pointer |
size_t bwRead | ( | void * | data, |
size_t | sz, | ||
size_t | nmemb, | ||
bigWigFile_t * | fp | ||
) |
A local/remote version of fread
. Reads data from either local or remote bigWig files.
data | An allocated memory block big enough to hold the data. |
sz | The size of each member that should be copied. |
nmemb | The number of members to copy. |
fp | The bigWigFile_t * from which to copy the data. |
fread
). bwRTree_t* bwReadIndex | ( | bigWigFile_t * | fp, |
uint64_t | offset | ||
) |
Reads a data index (either full data or a zoom level) from a bigWig file. There is little reason for end users to use this function. This must be freed with bwDestroyIndex
fp | A valid bigWigFile_t pointer |
offset | The file offset where the index begins |
int bwSetPos | ( | bigWigFile_t * | fp, |
size_t | pos | ||
) |
Like fsetpos, but for local or remote bigWig files. This will set the file position indicator to the specified point. For local files this literally is fsetpos
, while for remote files it fills a memory buffer with data starting at the desired position.
fp | A valid opened bigWigFile_t. |
pos | The position within the file to seek to. |
long bwTell | ( | bigWigFile_t * | fp | ) |
Determine what the file position indicator say. This is equivalent to ftell
for local or remote files.
fp | The file. |