diff -Nru pybigwig-0.3.16+dfsg/debian/changelog pybigwig-0.3.17/debian/changelog --- pybigwig-0.3.16+dfsg/debian/changelog 2019-06-20 06:02:03.000000000 +0000 +++ pybigwig-0.3.17/debian/changelog 2019-09-05 04:26:01.000000000 +0000 @@ -1,8 +1,14 @@ -pybigwig (0.3.16+dfsg-1ubuntu1) eoan; urgency=medium +pybigwig (0.3.17-1) unstable; urgency=medium - * Drop autopkgtest for python-pybigwig which is no longer built. + [ Steffen Möller ] + * Adjusted maintainer for team maintenance - -- Steve Langasek Wed, 19 Jun 2019 23:02:03 -0700 + [ Diane Trout ] + * Remove python2 tests since it was removed (Closes: #930762) + * Remove commented out Python2 package block + * New upstream version 0.3.17 + + -- Diane Trout Wed, 04 Sep 2019 21:26:01 -0700 pybigwig (0.3.16+dfsg-1) unstable; urgency=medium diff -Nru pybigwig-0.3.16+dfsg/debian/control pybigwig-0.3.17/debian/control --- pybigwig-0.3.16+dfsg/debian/control 2019-06-20 06:02:03.000000000 +0000 +++ pybigwig-0.3.17/debian/control 2019-09-05 04:23:50.000000000 +0000 @@ -1,7 +1,7 @@ Source: pybigwig Priority: optional -Maintainer: Ubuntu Developers -XSBC-Original-Maintainer: Diane Trout +Maintainer: Debian Med Packaging Team +Uploaders: Diane Trout Build-Depends: debhelper (>= 11), dh-python, libcurl4-gnutls-dev, @@ -21,15 +21,6 @@ Section: science Homepage: https://github.com/dpryan79/pyBigWig -#Package: python-pybigwig -#Architecture: any -#Depends: ${misc:Depends}, ${python:Depends}, ${shlibs:Depends} -#Description: Python 2 module for quick access to bigBed and bigWig files -# This is a Python extension, written in C, for quick access to bigBed files, -# and access to and creation of bigWig files. -# . -# This contains the Python 2 version - Package: python3-pybigwig Architecture: any Depends: ${misc:Depends}, ${python3:Depends}, ${shlibs:Depends} diff -Nru pybigwig-0.3.16+dfsg/pyBigWig.c pybigwig-0.3.17/pyBigWig.c --- pybigwig-0.3.16+dfsg/pyBigWig.c 2019-05-14 18:50:01.000000000 +0000 +++ pybigwig-0.3.17/pyBigWig.c 2019-08-05 09:15:40.000000000 +0000 @@ -276,6 +276,10 @@ PyErr_SetString(PyExc_RuntimeError, "The bigWig file handle is not opened!"); return NULL; } + if(bw->isWrite == 1) { + PyErr_SetString(PyExc_RuntimeError, "The header cannot be accessed in files opened for writing!"); + return NULL; + } ret = PyDict_New(); val = PyLong_FromUnsignedLong(bw->hdr->version); @@ -321,6 +325,11 @@ return NULL; } + if(bw->isWrite == 1) { + PyErr_SetString(PyExc_RuntimeError, "Chromosomes cannot be accessed in files opened for writing!"); + return NULL; + } + if(!(PyArg_ParseTuple(args, "|s", &chrom)) || !chrom) { ret = PyDict_New(); for(i=0; icl->nKeys; i++) { @@ -380,6 +389,11 @@ return NULL; } + if(bw->isWrite == 1) { + PyErr_SetString(PyExc_RuntimeError, "Statistics cannot be accessed in files opened for writing!"); + return NULL; + } + if(bw->type == 1) { PyErr_SetString(PyExc_RuntimeError, "bigBed files have no statistics!"); return NULL; @@ -621,6 +635,11 @@ return NULL; } + if(bw->isWrite == 1) { + PyErr_SetString(PyExc_RuntimeError, "Intervals cannot be accessed in files opened for writing!"); + return NULL; + } + if(bw->type == 1) { PyErr_SetString(PyExc_RuntimeError, "bigBed files have no intervals! Use 'entries()' instead."); return NULL; @@ -724,7 +743,7 @@ //I don't know what happens if PyBytes_AsString(NULL) is used... char *PyString_AsString(PyObject *obj) { - return PyBytes_AsString(PyUnicode_AsASCIIString(obj)); + return PyUnicode_AsUTF8(obj); } #endif diff -Nru pybigwig-0.3.16+dfsg/pyBigWig.h pybigwig-0.3.17/pyBigWig.h --- pybigwig-0.3.16+dfsg/pyBigWig.h 2019-05-14 18:50:01.000000000 +0000 +++ pybigwig-0.3.17/pyBigWig.h 2019-08-05 09:15:40.000000000 +0000 @@ -2,7 +2,7 @@ #include #include "bigWig.h" -#define pyBigWigVersion "0.3.16" +#define pyBigWigVersion "0.3.17" typedef struct { PyObject_HEAD diff -Nru pybigwig-0.3.16+dfsg/README.md pybigwig-0.3.17/README.md --- pybigwig-0.3.16+dfsg/README.md 2019-05-14 18:50:01.000000000 +0000 +++ pybigwig-0.3.17/README.md 2019-08-05 09:15:40.000000000 +0000 @@ -144,9 +144,6 @@ 0.22213841940688142 >>> bw.stats('chr1', 89294, 91629, exact=True) [0.22213841940688142] -Additionally, `values()` can directly output a numpy vector: - - >>> bw = bw.open(" ## Retrieve values for individual bases in a range @@ -218,6 +215,8 @@ >>> bw.addHeader([("chr1", 1000000), ("chr2", 1500000)], maxZooms=0) +If you set `maxTooms=0`, please note that IGV and many other tools WILL NOT WORK as they assume that at least one zoom level will be present. You are advised to use the default unless you do not expect the bigWig files to be used by other packages. + ## Adding entries to a bigWig file Assuming you've opened a file for writing and added a header, you can then add entries. Note that the entries **must** be added in order, as bigWig files always contain ordered intervals. There are three formats that bigWig files can use internally to store entries. The most commonly observed format is identical to a [bedGraph](https://genome.ucsc.edu/goldenpath/help/bedgraph.html) file: diff -Nru pybigwig-0.3.16+dfsg/setup.py pybigwig-0.3.17/setup.py --- pybigwig-0.3.16+dfsg/setup.py 2019-05-14 18:50:01.000000000 +0000 +++ pybigwig-0.3.17/setup.py 2019-08-05 09:15:40.000000000 +0000 @@ -62,7 +62,7 @@ include_dirs = include_dirs) setup(name = 'pyBigWig', - version = '0.3.16', + version = '0.3.17', description = 'A package for accessing bigWig files using libBigWig', author = "Devon P. Ryan", author_email = "ryan@ie-freiburg.mpg.de",