Skip to content
Commits on Source (7)
python-intervaltree-bio (1.0.1-3) unstable; urgency=medium
* Team upload.
* Fix autopkgtest
Closes: #920545
* debhelper 12
* Standards-Version: 4.3.0
* Secure URI in copyright format
* Respect DEB_BUILD_OPTIONS in override_dh_auto_test target
* Remove trailing whitespace in debian/copyright
-- Andreas Tille <tille@debian.org> Sun, 27 Jan 2019 00:10:54 +0100
python-intervaltree-bio (1.0.1-2) unstable; urgency=medium
* Team upload.
......
......@@ -3,7 +3,7 @@ Maintainer: Debian Med Packaging Team <debian-med-packaging@lists.alioth.debian.
Uploaders: Afif Elghraoui <afif@debian.org>
Section: python
Priority: optional
Build-Depends: debhelper (>= 11~),
Build-Depends: debhelper (>= 12~),
dh-python,
python-all,
python-setuptools,
......@@ -14,7 +14,7 @@ Build-Depends: debhelper (>= 11~),
# Test-Depends:
python-pytest,
python3-pytest
Standards-Version: 4.1.5
Standards-Version: 4.3.0
Vcs-Browser: https://salsa.debian.org/med-team/python-intervaltree-bio
Vcs-Git: https://salsa.debian.org/med-team/python-intervaltree-bio.git
Homepage: https://github.com/konstantint/intervaltree-bio
......
Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: python-intervaltree-bio
Upstream-Contact: Konstantin Tretyakov <kt@ut.ee>
Source: https://github.com/konstantint/intervaltree-bio
......
From: Hilko Bengen <bengen@debian.org>
Date: Sat, 26 Jan 2019 22:56:49 +0100
Bug-Debian: https://bugs.debian.org/920545
Subject: [PATCH] Replace all .search() calls with .overlap() in tests and
documentation
---
README.rst | 2 +-
intervaltree_bio/__init__.py | 10 +++++-----
tests/genomeintervaltree_test.py | 4 ++--
3 files changed, 8 insertions(+), 8 deletions(-)
--- a/README.rst
+++ b/README.rst
@@ -34,7 +34,7 @@ The core example is loading the transcri
It is then possible to use the data structure to search known genes within given intervals::
- >> result = knownGene[b'chr1'].search(100000, 138529)
+ >> result = knownGene[b'chr1'].overlap(100000, 138529)
It is possible to load other UCSC tables besides ``knownGene`` or specify custom URL or file to read the table from.
Consult the docstring of the ``GenomeIntervalTree.from_table`` method for more details.
--- a/intervaltree_bio/__init__.py
+++ b/intervaltree_bio/__init__.py
@@ -125,10 +125,10 @@ class GenomeIntervalTree(defaultdict):
>>> gtree = GenomeIntervalTree.from_bed(BytesIO(data))
>>> len(gtree)
1732
- >>> assert gtree[b'chr10'].search(22610878) == set([Interval(22610878, 22611813, [b'.', b'1000', b'.', b'471.725544438908', b'-1', b'3.21510858105313', b'389']), Interval(22610878, 22611813, [b'.', b'791', b'.', b'123.885507169449', b'-1', b'3.21510858105313', b'596'])])
- >>> assert gtree[b'chr10'].search(22611813) == set([])
- >>> assert gtree[b'chr1'].search(145036590, 145036594) == set([Interval(145036593, 145037123, [b'.', b'247', b'.', b'38.6720804428054', b'-1', b'3.06233123683911', b'265'])])
- >>> assert gtree[b'chr10'].search(145036594, 145036595) == set([])
+ >>> assert gtree[b'chr10'].overlap(22610878) == set([Interval(22610878, 22611813, [b'.', b'1000', b'.', b'471.725544438908', b'-1', b'3.21510858105313', b'389']), Interval(22610878, 22611813, [b'.', b'791', b'.', b'123.885507169449', b'-1', b'3.21510858105313', b'596'])])
+ >>> assert gtree[b'chr10'].overlap(22611813) == set([])
+ >>> assert gtree[b'chr1'].overlap(145036590, 145036594) == set([Interval(145036593, 145037123, [b'.', b'247', b'.', b'38.6720804428054', b'-1', b'3.06233123683911', b'265'])])
+ >>> assert gtree[b'chr10'].overlap(145036594, 145036595) == set([])
'''
# We collect all intervals into a set of lists, and then put them all at once into the tree structures
@@ -187,7 +187,7 @@ class GenomeIntervalTree(defaultdict):
>> knownGene = GenomeIntervalTree.from_table()
>> len(knownGene)
82960
- >> result = knownGene[b'chr1'].search(100000, 138529)
+ >> result = knownGene[b'chr1'].overlap(100000, 138529)
>> len(result)
1
>> list(result)[0].data['name']
--- a/tests/genomeintervaltree_test.py
+++ b/tests/genomeintervaltree_test.py
@@ -23,7 +23,7 @@ def test_knownGene(base_url):
knownGene_localurl = 'file:///%s' % os.path.abspath(knownGene_file)
knownGene = GenomeIntervalTree.from_table(url=knownGene_localurl, decompress=True) # Py3 downloads .gz files to local files with names not ending with .gz
assert len(knownGene) == 82960
- result = knownGene[b'chr1'].search(100000, 138529)
+ result = knownGene[b'chr1'].overlap(100000, 138529)
assert len(result) == 1
assert list(result)[0].data['name'] == b'uc021oeg.2'
@@ -33,7 +33,7 @@ def test_knownGene(base_url):
knownGene = GenomeIntervalTree.from_table(url=knownGene_localurl, mode='exons', decompress=True)
assert len(knownGene) == 742493
- result = list(knownGene[b'chr1'].search(134772, 140566))
+ result = list(knownGene[b'chr1'].overlap(134772, 140566))
assert len(result) == 3
assert result[0].data == result[1].data and result[0].data == result[2].data
offline-test-data.patch
disable-doctests.patch
setup-cfg-deprecation.patch
0001-Replace-all-.search-calls-with-.overlap-in-tests-and.patch
......@@ -11,4 +11,6 @@ export PYBUILD_NAME=intervaltree-bio
dh $@ --with python2,python3 --buildsystem=pybuild
override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
dh_auto_test -- --test-args "--verbose --datadir $(CURDIR)/debian/data"
endif