[med-svn] [Git][med-team/libbigwig][master] 13 commits: routine-update: New upstream version

Steffen Möller gitlab at salsa.debian.org
Thu Dec 5 11:52:53 GMT 2019



Steffen Möller pushed to branch master at Debian Med / libbigwig


Commits:
1d369d85 by Steffen Moeller at 2019-12-05T11:34:45Z
routine-update: New upstream version

- - - - -
7755c72f by Steffen Moeller at 2019-12-05T11:34:45Z
New upstream version 0.4.4+dfsg
- - - - -
5be2da12 by Steffen Moeller at 2019-12-05T11:34:46Z
Update upstream source from tag 'upstream/0.4.4+dfsg'

Update to upstream version '0.4.4+dfsg'
with Debian dir 7d334897c82560de2a062cb1c826d59195ca0f33
- - - - -
122765ec by Steffen Moeller at 2019-12-05T11:34:46Z
routine-update: debhelper-compat 12

- - - - -
79cc2db3 by Steffen Moeller at 2019-12-05T11:35:55Z
routine-update: Standards-Version: 4.4.1

- - - - -
f8c08754 by Steffen Moeller at 2019-12-05T11:36:32Z
R-U: DEB_BUILD_OPTIONS allow override_dh_auto_test

- - - - -
d2ee7bc5 by Steffen Moeller at 2019-12-05T11:36:32Z
R-U: Trailing whitespace in debian/copyright

- - - - -
8b16dad2 by Steffen Moeller at 2019-12-05T11:36:33Z
Remove patches pythonVersion.patch that are missing from debian/patches/series.

Fixes lintian: patch-file-present-but-not-mentioned-in-series
See https://lintian.debian.org/tags/patch-file-present-but-not-mentioned-in-series.html for more details.

- - - - -
5f993999 by Steffen Moeller at 2019-12-05T11:36:51Z
routine-update: Ready to upload to unstable

- - - - -
46fc4d5d by Steffen Moeller at 2019-12-05T11:47:06Z
Removing doxygen-generated files from archive

- - - - -
164fe100 by Steffen Moeller at 2019-12-05T11:49:48Z
Revised upstream source tree has not doxygen-files

- - - - -
c41a8763 by Steffen Moeller at 2019-12-05T11:51:02Z
New upstream version 0.4.4+dfsg
- - - - -
018f8467 by Steffen Moeller at 2019-12-05T11:51:02Z
Update upstream source from tag 'upstream/0.4.4+dfsg'

Update to upstream version '0.4.4+dfsg'
with Debian dir bf0af236c8766d77bac5ddd6294c4c17cb20fd50
- - - - -


12 changed files:

- README.md
- bigWig.h
- bwRead.c
- bwValues.c
- debian/changelog
- − debian/compat
- debian/control
- debian/copyright
- − debian/patches/pythonVersion.patch
- debian/rules
- debian/watch
- io.c


Changes:

=====================================
README.md
=====================================
@@ -2,154 +2,160 @@
 
 A C library for reading/parsing local and remote bigWig and bigBed files. While Kent's source code is free to use for these purposes, it's really inappropriate as library code since it has the unfortunate habit of calling `exit()` whenever there's an error. If that's then used inside of something like python then the python interpreter gets killed. This library is aimed at resolving these sorts of issues and should also use more standard things like curl and has a friendlier license to boot.
 
-Documentation is automatically generated by doxygen and can be found under `docs/html` or online [here](https://cdn.rawgit.com/dpryan79/libBigWig/master/docs/html/index.html).
+Documentation is automatically generated by doxygen and can be found under [`docs/html`](/docs/html) or online [here](https://cdn.rawgit.com/dpryan79/libBigWig/master/docs/html/index.html).
 
 # Example
 
-The only functions and structures that end users need to care about are in "bigWig.h". Below is a commented example. You can see the files under `test/` for further examples.
-
-    #include "bigWig.h"
-    int main(int argc, char *argv[]) {
-        bigWigFile_t *fp = NULL;
-        bwOverlappingIntervals_t *intervals = NULL;
-        double *stats = NULL;
-        if(argc != 2) {
-            fprintf(stderr, "Usage: %s {file.bw|URL://path/file.bw}\n", argv[0]);
-            return 1;
-        }
-
-        //Initialize enough space to hold 128KiB (1<<17) of data at a time
-        if(bwInit(1<<17) != 0) {
-            fprintf(stderr, "Received an error in bwInit\n");
-            return 1;
-        }
-
-        //Open the local/remote file
-        fp = bwOpen(argv[1], NULL, "r");
-        if(!fp) {
-            fprintf(stderr, "An error occured while opening %s\n", argv[1]);
-            return 1;
-        }
-
-        //Get values in a range (0-based, half open) without NAs
-        intervals = bwGetValues(fp, "chr1", 10000000, 10000100, 0);
-        bwDestroyOverlappingIntervals(intervals); //Free allocated memory
-
-        //Get values in a range (0-based, half open) with NAs
-        intervals = bwGetValues(fp, "chr1", 10000000, 10000100, 1);
-        bwDestroyOverlappingIntervals(intervals); //Free allocated memory
-
-        //Get the full intervals that overlap
-        intervals = bwGetOverlappingIntervals(fp, "chr1", 10000000, 10000100);
-        bwDestroyOverlappingIntervals(intervals);
-
-        //Get an example statistic - standard deviation
-        //We want ~4 bins in the range
-        stats = bwStats(fp, "chr1", 10000000, 10000100, 4, dev);
-        if(stats) {
-            printf("chr1:10000000-10000100 std. dev.: %f %f %f %f\n", stats[0], stats[1], stats[2], stats[3]);
-            free(stats);
-        }
-
-        bwClose(fp);
-        bwCleanup();
-        return 0;
+The only functions and structures that end users need to care about are in "bigWig.h". Below is a commented example. You can see the files under [`test/`](./test/) for further examples.
+
+```c
+#include "bigWig.h"
+int main(int argc, char *argv[]) {
+    bigWigFile_t *fp = NULL;
+    bwOverlappingIntervals_t *intervals = NULL;
+    double *stats = NULL;
+    if(argc != 2) {
+        fprintf(stderr, "Usage: %s {file.bw|URL://path/file.bw}\n", argv[0]);
+        return 1;
+    }
+
+    //Initialize enough space to hold 128KiB (1<<17) of data at a time
+    if(bwInit(1<<17) != 0) {
+        fprintf(stderr, "Received an error in bwInit\n");
+        return 1;
+    }
+
+    //Open the local/remote file
+    fp = bwOpen(argv[1], NULL, "r");
+    if(!fp) {
+        fprintf(stderr, "An error occured while opening %s\n", argv[1]);
+        return 1;
+    }
+
+    //Get values in a range (0-based, half open) without NAs
+    intervals = bwGetValues(fp, "chr1", 10000000, 10000100, 0);
+    bwDestroyOverlappingIntervals(intervals); //Free allocated memory
+
+    //Get values in a range (0-based, half open) with NAs
+    intervals = bwGetValues(fp, "chr1", 10000000, 10000100, 1);
+    bwDestroyOverlappingIntervals(intervals); //Free allocated memory
+
+    //Get the full intervals that overlap
+    intervals = bwGetOverlappingIntervals(fp, "chr1", 10000000, 10000100);
+    bwDestroyOverlappingIntervals(intervals);
+
+    //Get an example statistic - standard deviation
+    //We want ~4 bins in the range
+    stats = bwStats(fp, "chr1", 10000000, 10000100, 4, dev);
+    if(stats) {
+        printf("chr1:10000000-10000100 std. dev.: %f %f %f %f\n", stats[0], stats[1], stats[2], stats[3]);
+        free(stats);
     }
 
+    bwClose(fp);
+    bwCleanup();
+    return 0;
+}
+```
+
 ## Writing example
 
 N.B., creation of bigBed files is not supported (there are no plans to change this).
 
-Below is an example of how to write bigWig files. You can also find this file under `test/exampleWrite.c`. Unlike with Kent's tools, you can create bigWig files entry by entry without needing an intermediate wiggle or bedGraph file. Entries in bigWig files are stored in blocks with each entry in a block referring to the same chromosome and having the same type, of which there are three (see the [wiggle specification](http://genome.ucsc.edu/goldenpath/help/wiggle.html) for more information on this).
-
-    #include "bigWig.h"
-    
-    int main(int argc, char *argv[]) {
-        bigWigFile_t *fp = NULL;
-        char *chroms[] = {"1", "2"};
-        char *chromsUse[] = {"1", "1", "1"};
-        uint32_t chrLens[] = {1000000, 1500000};
-        uint32_t starts[] = {0, 100, 125,
-                             200, 220, 230,
-                             500, 600, 625,
-                             700, 800, 850};
-        uint32_t ends[] = {5, 120, 126,
-                           205, 226, 231};
-        float values[] = {0.0f, 1.0f, 200.0f,
-                          -2.0f, 150.0f, 25.0f,
-                          0.0f, 1.0f, 200.0f,
-                          -2.0f, 150.0f, 25.0f,
-                          -5.0f, -20.0f, 25.0f,
-                          -5.0f, -20.0f, 25.0f};
-        
-        if(bwInit(1<<17) != 0) {
-            fprintf(stderr, "Received an error in bwInit\n");
-            return 1;
-        }
-    
-        fp = bwOpen("example_output.bw", NULL, "w");
-        if(!fp) {
-            fprintf(stderr, "An error occurred while opening example_output.bw for writingn\n");
-            return 1;
-        }
-    
-        //Allow up to 10 zoom levels, though fewer will be used in practice
-        if(bwCreateHdr(fp, 10)) goto error;
-    
-        //Create the chromosome lists
-        fp->cl = bwCreateChromList(chroms, chrLens, 2);
-        if(!fp->cl) goto error;
-    
-        //Write the header
-        if(bwWriteHdr(fp)) goto error;
+Below is an example of how to write bigWig files. You can also find this file under [`test/exampleWrite.c`](test/exampleWrite.c). Unlike with Kent's tools, you can create bigWig files entry by entry without needing an intermediate wiggle or bedGraph file. Entries in bigWig files are stored in blocks with each entry in a block referring to the same chromosome and having the same type, of which there are three (see the [wiggle specification](http://genome.ucsc.edu/goldenpath/help/wiggle.html) for more information on this).
+
+```c
+#include "bigWig.h"
+
+int main(int argc, char *argv[]) {
+    bigWigFile_t *fp = NULL;
+    char *chroms[] = {"1", "2"};
+    char *chromsUse[] = {"1", "1", "1"};
+    uint32_t chrLens[] = {1000000, 1500000};
+    uint32_t starts[] = {0, 100, 125,
+                         200, 220, 230,
+                         500, 600, 625,
+                         700, 800, 850};
+    uint32_t ends[] = {5, 120, 126,
+                       205, 226, 231};
+    float values[] = {0.0f, 1.0f, 200.0f,
+                      -2.0f, 150.0f, 25.0f,
+                      0.0f, 1.0f, 200.0f,
+                      -2.0f, 150.0f, 25.0f,
+                      -5.0f, -20.0f, 25.0f,
+                      -5.0f, -20.0f, 25.0f};
     
-        //Some example bedGraph-like entries
-        if(bwAddIntervals(fp, chromsUse, starts, ends, values, 3)) goto error;
-        //We can continue appending similarly formatted entries
-        //N.B. you can't append a different chromosome (those always go into different
-        if(bwAppendIntervals(fp, starts+3, ends+3, values+3, 3)) goto error;
-    
-        //Add a new block of entries with a span. Since bwAdd/AppendIntervals was just used we MUST create a new block
-        if(bwAddIntervalSpans(fp, "1", starts+6, 20, values+6, 3)) goto error;
-        //We can continue appending similarly formatted entries
-        if(bwAppendIntervalSpans(fp, starts+9, values+9, 3)) goto error;
-    
-        //Add a new block of fixed-step entries
-        if(bwAddIntervalSpanSteps(fp, "1", 900, 20, 30, values+12, 3)) goto error;
-        //The start is then 760, since that's where the previous step ended
-        if(bwAppendIntervalSpanSteps(fp, values+15, 3)) goto error;
-
-        //Add a new chromosome
-        chromsUse[0] = "2";
-        chromsUse[1] = "2";
-        chromsUse[2] = "2";
-        if(bwAddIntervals(fp, chromsUse, starts, ends, values, 3)) goto error;
-    
-        //Closing the file causes the zoom levels to be created
-        bwClose(fp);
-        bwCleanup();
-    
-        return 0;
-    
-    error:
-        fprintf(stderr, "Received an error somewhere!\n");
-        bwClose(fp);
-        bwCleanup();
+    if(bwInit(1<<17) != 0) {
+        fprintf(stderr, "Received an error in bwInit\n");
         return 1;
     }
 
+    fp = bwOpen("example_output.bw", NULL, "w");
+    if(!fp) {
+        fprintf(stderr, "An error occurred while opening example_output.bw for writingn\n");
+        return 1;
+    }
+
+    //Allow up to 10 zoom levels, though fewer will be used in practice
+    if(bwCreateHdr(fp, 10)) goto error;
+
+    //Create the chromosome lists
+    fp->cl = bwCreateChromList(chroms, chrLens, 2);
+    if(!fp->cl) goto error;
+
+    //Write the header
+    if(bwWriteHdr(fp)) goto error;
+
+    //Some example bedGraph-like entries
+    if(bwAddIntervals(fp, chromsUse, starts, ends, values, 3)) goto error;
+    //We can continue appending similarly formatted entries
+    //N.B. you can't append a different chromosome (those always go into different
+    if(bwAppendIntervals(fp, starts+3, ends+3, values+3, 3)) goto error;
+
+    //Add a new block of entries with a span. Since bwAdd/AppendIntervals was just used we MUST create a new block
+    if(bwAddIntervalSpans(fp, "1", starts+6, 20, values+6, 3)) goto error;
+    //We can continue appending similarly formatted entries
+    if(bwAppendIntervalSpans(fp, starts+9, values+9, 3)) goto error;
+
+    //Add a new block of fixed-step entries
+    if(bwAddIntervalSpanSteps(fp, "1", 900, 20, 30, values+12, 3)) goto error;
+    //The start is then 760, since that's where the previous step ended
+    if(bwAppendIntervalSpanSteps(fp, values+15, 3)) goto error;
+
+    //Add a new chromosome
+    chromsUse[0] = "2";
+    chromsUse[1] = "2";
+    chromsUse[2] = "2";
+    if(bwAddIntervals(fp, chromsUse, starts, ends, values, 3)) goto error;
+
+    //Closing the file causes the zoom levels to be created
+    bwClose(fp);
+    bwCleanup();
+
+    return 0;
+
+error:
+    fprintf(stderr, "Received an error somewhere!\n");
+    bwClose(fp);
+    bwCleanup();
+    return 1;
+}
+```
+
 # Testing file types
 
 As of version 0.3.0, this library supports accessing bigBed files, which are related to bigWig files. Applications that need to support both bigWig and bigBed input can use the `bwIsBigWig` and `bbIsBigBed` functions to determine if their inputs are bigWig/bigBed files:
 
-    ...code...
-    if(bwIsBigWig(input_file_name, NULL)) {
-        //do something
-    } else if(bbIsBigBed(input_file_name, NULL)) {
-        //do something else
-    } else {
-        //handle unknown input
-    }
+```c
+...code...
+if(bwIsBigWig(input_file_name, NULL)) {
+    //do something
+} else if(bbIsBigBed(input_file_name, NULL)) {
+    //do something else
+} else {
+    //handle unknown input
+}
+```
 
 Note that these two functions rely on the "magic number" at the beginning of each file, which differs between bigWig and bigBed files.
 
@@ -220,12 +226,14 @@ Regardless of whether a bigWig or bigBed file is being used, the `bwIteratorNext
 
 A full example is provided in `tests/testIterator.c`, but a small example of iterating over all bigWig intervals in `chr1:0-10000000` in chunks of 5 blocks follows:
 
-    iter = bwOverlappingIntervalsIterator(fp, "chr1", 0, 10000000, 5);
-    while(iter->data) {
-        //Do stuff with iter->intervals
-        iter = bwIteratorNext(iter);
-    }
-    bwIteratorDestroy(iter);
+```c
+iter = bwOverlappingIntervalsIterator(fp, "chr1", 0, 10000000, 5);
+while(iter->data) {
+    //Do stuff with iter->intervals
+    iter = bwIteratorNext(iter);
+}
+bwIteratorDestroy(iter);
+```
 
 # A note on bigWig statistics
 


=====================================
bigWig.h
=====================================
@@ -53,7 +53,7 @@ extern "C" {
 /*!
  * The library version number
  */
-#define LIBBIGWIG_VERSION 0.4.2
+#define LIBBIGWIG_VERSION 0.4.4
 
 /*!
  * If 1, then this library was compiled with remote file support.


=====================================
bwRead.c
=====================================
@@ -73,7 +73,7 @@ static bwZoomHdr_t *bwReadZoomHdrs(bigWigFile_t *bw) {
         return NULL;
     }
     uint64_t *indexOffset = malloc(sizeof(uint64_t) * bw->hdr->nLevels);
-    if(!dataOffset) {
+    if(!indexOffset) {
         free(zhdr);
         free(level);
         free(dataOffset);


=====================================
bwValues.c
=====================================
@@ -33,7 +33,7 @@ static bwRTree_t *readRTreeIdx(bigWigFile_t *fp, uint64_t offset) {
         return NULL;
     }
 
-    node = malloc(sizeof(bwRTree_t));
+    node = calloc(1, sizeof(bwRTree_t));
     if(!node) return NULL;
 
     if(bwRead(&(node->blockSize), sizeof(uint32_t), 1, fp) != 1) goto error;


=====================================
debian/changelog
=====================================
@@ -1,3 +1,15 @@
+libbigwig (0.4.4+dfsg-1) unstable; urgency=medium
+
+  * New upstream version
+  * debhelper-compat 12
+  * Standards-Version: 4.4.1
+  * Respect DEB_BUILD_OPTIONS in override_dh_auto_test target
+  * Remove trailing whitespace in debian/copyright
+  * Remove patches pythonVersion.patch that are missing from
+    debian/patches/series.
+
+ -- Steffen Moeller <moeller at debian.org>  Thu, 05 Dec 2019 12:36:34 +0100
+
 libbigwig (0.4.2+dfsg-2) unstable; urgency=medium
 
   * Fixed FTBFS - missing dependency


=====================================
debian/compat deleted
=====================================
@@ -1 +0,0 @@
-11


=====================================
debian/control
=====================================
@@ -1,19 +1,22 @@
 Source: libbigwig
-Priority: optional
 Maintainer: Debian Med Packaging Team <debian-med-packaging at lists.debian.org>
 Uploaders: Steffen Moeller <moeller at debian.org>
-Build-Depends: debhelper (>= 11), libcurl4-gnutls-dev|libcurl-dev, zlib1g-dev
-Build-Depends-Indep: doxygen
-Standards-Version: 4.3.0
 Section: libs
-Homepage: https://github.com/dpryan79/libBigWig/
+Priority: optional
+Build-Depends: debhelper-compat (= 12),
+               libcurl4-gnutls-dev|libcurl-dev,
+               zlib1g-dev
+Build-Depends-Indep: doxygen
+Standards-Version: 4.4.1
 Vcs-Browser: https://salsa.debian.org/med-team/libbigwig
 Vcs-Git: https://salsa.debian.org/med-team/libbigwig.git
+Homepage: https://github.com/dpryan79/libBigWig/
 
 Package: libbigwig0
 Architecture: any
 Multi-Arch: same
-Depends: ${shlibs:Depends}, ${misc:Depends}
+Depends: ${shlibs:Depends},
+         ${misc:Depends}
 Recommends: curl
 Description: C library for handling bigWig files
  This package provides a C library for reading/parsing local and remote
@@ -22,17 +25,18 @@ Description: C library for handling bigWig files
  in case of errors.
 
 Package: libbigwig-dev
-Section: libdevel
 Architecture: any
 Multi-Arch: same
-Depends: libbigwig0 (= ${binary:Version}), ${misc:Depends}
+Section: libdevel
+Depends: libbigwig0 (= ${binary:Version}),
+         ${misc:Depends}
 Description: C library for handling bigWig files - header files
  This package provides the files needed to develop with the libBigWig
  C library for reading/parsing local and remote bigWig and bigBed files.
 
 Package: libbigwig-doc
-Section: libdevel
 Architecture: all
+Section: libdevel
 Depends: ${misc:Depends}
 Description: C library for handling bigWig files - documentation
  This package provides the doxygen-created inline documentation needed


=====================================
debian/copyright
=====================================
@@ -1,6 +1,7 @@
 Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
 Upstream-Name: libbigwig
-Source: 
+Source: https://github.com/dpryan79/libBigWig/
+Files-Excluded: docs
 
 Files: *
 Copyright: 2015 Devon Ryan
@@ -25,6 +26,6 @@ License: MIT
  OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
  IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
- CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 
- TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 
+ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
  SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.


=====================================
debian/patches/pythonVersion.patch deleted
=====================================
@@ -1,10 +0,0 @@
-Index: libbigwig-0.4.2+dfsg/test/test.py
-===================================================================
---- libbigwig-0.4.2+dfsg.orig/test/test.py
-+++ libbigwig-0.4.2+dfsg/test/test.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python2.7
-+#!/usr/bin/python2.7
- from subprocess import Popen, PIPE, check_call
- from os import remove
- 


=====================================
debian/rules
=====================================
@@ -29,7 +29,9 @@ override_dh_auto_install:
 	mv *.so $(CURDIR)/debian/tmp/usr/lib/$(shell dpkg-architecture -qDEB_TARGET_MULTIARCH)
 
 override_dh_auto_test:
+ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
 	echo "W: Not testing - depending on online resources"
+endif
 
 override_dh_auto_clean:
 	dh_auto_clean


=====================================
debian/watch
=====================================
@@ -1,4 +1,4 @@
 version=4
-opts="dversionmangle=auto,oversionmangle=s/$/+dfsg/,filenamemangle=s%(?:.*?)?v?(\d[\d.]*)\.tar\.gz%libbigwig-$1.tar.gz%" \
+opts="repack,compression=xz,dversionmangle=auto,oversionmangle=s/$/+dfsg/,filenamemangle=s%(?:.*?)?v?(\d[\d.]*)\.tar\.gz%libbigwig-$1.tar.gz%" \
    https://github.com/dpryan79/libBigWig/tags \
    (?:.*?/)?v?(\d[\d.]*)\.tar\.gz debian uupdate


=====================================
io.c
=====================================
@@ -133,7 +133,7 @@ CURLcode urlSeek(URL_t *URL, size_t pos) {
 #ifndef NOCURL
     } else {
         //If the location is covered by the buffer then don't seek!
-        if(pos < URL->filePos || pos >= URL->filePos+URL->bufSize) {
+        if(pos < URL->filePos || pos >= URL->filePos+URL->bufLen) {
             URL->filePos = pos;
             URL->bufLen = 0; //Otherwise, filePos will get incremented on the next read!
             URL->bufPos = 0;



View it on GitLab: https://salsa.debian.org/med-team/libbigwig/compare/6569e1f72b1e756a8ea9ce51d126bffacb626254...018f8467ad4a101b4322860fcc0ff2bb40e524d7

-- 
View it on GitLab: https://salsa.debian.org/med-team/libbigwig/compare/6569e1f72b1e756a8ea9ce51d126bffacb626254...018f8467ad4a101b4322860fcc0ff2bb40e524d7
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20191205/822c96bd/attachment-0001.html>


More information about the debian-med-commit mailing list