Skip to content

Commit

Permalink
Sync with libBigWig v0.4.8 (#13)
Browse files Browse the repository at this point in the history
  • Loading branch information
jayhesselberth authored Jan 19, 2025
1 parent 5a52aeb commit 398f57f
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 4 deletions.
2 changes: 2 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# cpp11bigwig (development version)

* Sync with [libBigWig v0.4.8](https://github.com/dpryan79/libBigWig/releases/tag/0.4.8)

# cpp11bigwig 0.1.0

* Initial CRAN submission.
Expand Down
1 change: 1 addition & 0 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ pak::pak("rnabioco/cpp11bigwig")
```
:::

## Usage

```{r}
library(cpp11bigwig)
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ pak::pak("rnabioco/cpp11bigwig")

</div>

## Usage

``` r
library(cpp11bigwig)

Expand Down
2 changes: 1 addition & 1 deletion src/libBigWig/bigWig.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ extern "C" {
/*!
* The library version number
*/
#define LIBBIGWIG_VERSION 0.4.7
#define LIBBIGWIG_VERSION 0.4.8

/*!
* If 1, then this library was compiled with remote file support.
Expand Down
4 changes: 1 addition & 3 deletions src/libBigWig/bwValues.c
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,7 @@ static bwOverlapBlock_t *overlapsLeaf(bwRTreeNode_t *node, uint32_t tid, uint32_
if(!o) return NULL;

for(i=0; i<node->nChildren; i++) {
if(tid < node->chrIdxStart[i]) break;
if(tid > node->chrIdxEnd[i]) continue;
if(tid < node->chrIdxStart[i] || tid > node->chrIdxEnd[i]) continue;

/*
The individual blocks can theoretically span multiple contigs.
Expand All @@ -162,7 +161,6 @@ static bwOverlapBlock_t *overlapsLeaf(bwRTreeNode_t *node, uint32_t tid, uint32_
if(!o->size) goto error;

for(i=0; i<node->nChildren; i++) {
if(tid < node->chrIdxStart[i]) break;
if(tid < node->chrIdxStart[i] || tid > node->chrIdxEnd[i]) continue;
if(node->chrIdxStart[i] != node->chrIdxEnd[i]) {
if(tid == node->chrIdxStart[i]) {
Expand Down

0 comments on commit 398f57f

Please sign in to comment.