diff --git a/NEWS.md b/NEWS.md index 6b4acf8..11b53fe 100644 --- a/NEWS.md +++ b/NEWS.md @@ -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. diff --git a/README.Rmd b/README.Rmd index 0d81d6b..643c4f5 100644 --- a/README.Rmd +++ b/README.Rmd @@ -38,6 +38,7 @@ pak::pak("rnabioco/cpp11bigwig") ``` ::: +## Usage ```{r} library(cpp11bigwig) diff --git a/README.md b/README.md index 6bcd5de..4f28f20 100644 --- a/README.md +++ b/README.md @@ -32,6 +32,8 @@ pak::pak("rnabioco/cpp11bigwig") +## Usage + ``` r library(cpp11bigwig) diff --git a/src/libBigWig/bigWig.h b/src/libBigWig/bigWig.h index 441afea..f157a74 100644 --- a/src/libBigWig/bigWig.h +++ b/src/libBigWig/bigWig.h @@ -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. diff --git a/src/libBigWig/bwValues.c b/src/libBigWig/bwValues.c index 29a2bd3..e9a7740 100644 --- a/src/libBigWig/bwValues.c +++ b/src/libBigWig/bwValues.c @@ -135,8 +135,7 @@ static bwOverlapBlock_t *overlapsLeaf(bwRTreeNode_t *node, uint32_t tid, uint32_ if(!o) return NULL; for(i=0; inChildren; 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. @@ -162,7 +161,6 @@ static bwOverlapBlock_t *overlapsLeaf(bwRTreeNode_t *node, uint32_t tid, uint32_ if(!o->size) goto error; for(i=0; inChildren; 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]) {