[med-svn] [Git][med-team/python-bx][upstream] New upstream version 0.8.9
Steffen Möller
gitlab at salsa.debian.org
Wed Feb 24 20:54:44 GMT 2021
Steffen Möller pushed to branch upstream at Debian Med / python-bx
Commits:
079d1e35 by Steffen Moeller at 2021-02-24T21:45:54+01:00
New upstream version 0.8.9
- - - - -
11 changed files:
- .travis.yml
- lib/bx/__init__.py
- lib/bx/intervals/operations/quicksect.py
- lib/bx/misc/cdb.py
- lib/bx/seq/twobit.py
- scripts/aggregate_scores_in_intervals.py
- scripts/axt_to_lav.py
- scripts/axt_to_maf.py
- scripts/bed_coverage.py
- scripts/bed_merge_overlapping.py
- setup.py
Changes:
=====================================
.travis.yml
=====================================
@@ -68,9 +68,9 @@ addons:
- liblzo2-dev
install:
- - $PYTHON -m pip install Cython nose numpy python-lzo six
+ - $PYTHON -m pip install Cython nose numpy python-lzo
- $PYTHON setup.py build_ext --inplace
- - $PYTHON setup.py install
+ - $PYTHON -m pip install .
script:
- nosetests
=====================================
lib/bx/__init__.py
=====================================
@@ -1 +1 @@
-__version__ = '0.8.8'
+__version__ = '0.8.9'
=====================================
lib/bx/intervals/operations/quicksect.py
=====================================
@@ -6,7 +6,12 @@ from __future__ import print_function
import math
import random
-import time
+
+try:
+ from time import process_time
+except ImportError:
+ # For compatibility with Python < 3.3
+ from time import clock as process_time
class IntervalTree(object):
@@ -130,7 +135,7 @@ class IntervalNode(object):
def main():
test = None
intlist = []
- for x in range(20000):
+ for _ in range(20000):
start = random.randint(0, 1000000)
end = start + random.randint(1, 1000)
if test:
@@ -138,19 +143,19 @@ def main():
else:
test = IntervalNode(start, end)
intlist.append((start, end))
- starttime = time.clock()
+ starttime = process_time()
for x in range(5000):
start = random.randint(0, 10000000)
end = start + random.randint(1, 1000)
result = []
test.intersect(start, end, lambda x: result.append(x.linenum))
- print("%f for tree method" % (time.clock() - starttime))
- starttime = time.clock()
- for x in range(5000):
+ print("%f for tree method" % (process_time() - starttime))
+ starttime = process_time()
+ for _ in range(5000):
start = random.randint(0, 10000000)
end = start + random.randint(1, 1000)
bad_sect(intlist, start, end)
- print("%f for linear (bad) method" % (time.clock() - starttime))
+ print("%f for linear (bad) method" % (process_time() - starttime))
def test_func(node):
=====================================
lib/bx/misc/cdb.py
=====================================
@@ -1,8 +1,5 @@
-
-
-from collections import Mapping
-
from six.moves import reduce
+from six.moves.collections_abc import Mapping
from bx.misc.binary_file import (
BinaryFileReader,
=====================================
lib/bx/seq/twobit.py
=====================================
@@ -1,9 +1,10 @@
"""
Access to files containing sequence data in 'twobit' format.
"""
-from collections import Mapping
from struct import calcsize, unpack
+from six.moves.collections_abc import Mapping
+
from . import _twobit
TWOBIT_MAGIC_NUMBER = 0x1A412743
@@ -72,7 +73,7 @@ class TwoBitFile(Mapping):
self.reserved = self.read("L")
# Read index of sequence names to offsets
index = dict()
- for i in range(self.seq_count):
+ for _ in range(self.seq_count):
name = self.read_p_string()
offset = self.read("L")
index[name] = TwoBitSequence(self, offset)
=====================================
scripts/aggregate_scores_in_intervals.py
=====================================
@@ -16,7 +16,8 @@ from __future__ import division, print_function
import os
import os.path
import sys
-from collections import Mapping
+
+from six.moves.collections_abc import Mapping
import bx.wiggle
from bx import misc
=====================================
scripts/axt_to_lav.py
=====================================
@@ -153,7 +153,7 @@ def read_lengths(fileName):
raise ValueError("bad lengths line (%s:%d): %s" % (fileName, lineNumber, line))
if chrom in chromToLength:
- raise ValueError("%s appears more than once (%s:%d): %s" % (chrom, fileName, lineNumber))
+ raise ValueError("%s appears more than once (%s:%d): %s" % (chrom, fileName, lineNumber, line))
chromToLength[chrom] = length
=====================================
scripts/axt_to_maf.py
=====================================
@@ -155,7 +155,7 @@ def read_lengths(fileName):
raise ValueError("bad lengths line (%s:%d): %s" % (fileName, lineNumber, line))
if (chrom in chromToLength):
- raise ValueError("%s appears more than once (%s:%d): %s" % (chrom, fileName, lineNumber))
+ raise ValueError("%s appears more than once (%s:%d): %s" % (chrom, fileName, lineNumber, line))
chromToLength[chrom] = length
=====================================
scripts/bed_coverage.py
=====================================
@@ -9,14 +9,14 @@ usage: %prog bed files ...
"""
from __future__ import print_function
+import fileinput
import sys
-from itertools import chain
from bx.bitset_builders import binned_bitsets_from_file
bed_filenames = sys.argv[1:]
if bed_filenames:
- input = chain(* (open(_) for _ in bed_filenames))
+ input = fileinput.input(bed_filenames)
else:
input = sys.stdin
=====================================
scripts/bed_merge_overlapping.py
=====================================
@@ -9,14 +9,14 @@ usage: %prog bed files ...
"""
from __future__ import print_function
+import fileinput
import sys
-from itertools import chain
from bx.bitset_builders import binned_bitsets_from_bed_file
bed_filenames = sys.argv[1:]
if bed_filenames:
- input = chain(* (open(_) for _ in bed_filenames))
+ input = fileinput.input(bed_filenames)
else:
input = sys.stdin
=====================================
setup.py
=====================================
@@ -24,6 +24,8 @@ with open(version_file) as f:
break
else:
raise Exception("Version not found in " + version_file)
+with open('README.md') as f:
+ long_description = f.read()
def main():
@@ -32,7 +34,9 @@ def main():
version=version,
python_requires='>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*',
setup_requires=['numpy', 'cython'],
- install_requires=['numpy', 'six'],
+ install_requires=[
+ 'numpy',
+ 'six>=1.13.0'],
py_modules=['psyco_full'],
package_dir={'': 'lib'},
package_data={'': ['*.ps']},
@@ -42,7 +46,13 @@ def main():
author="James Taylor, Bob Harris, David King, Brent Pedersen, Kanwei Li, and others",
author_email="james at jamestaylor.org",
description="Tools for manipulating biological data, particularly multiple sequence alignments",
+ long_description=long_description,
+ long_description_content_type='text/markdown',
url="https://github.com/bxlab/bx-python",
+ project_urls={
+ "Bug Tracker": "https://github.com/bxlab/bx-python/issues",
+ "Source Code": "https://github.com/bxlab/bx-python",
+ },
license="MIT",
classifiers=[
"Development Status :: 5 - Production/Stable",
View it on GitLab: https://salsa.debian.org/med-team/python-bx/-/commit/079d1e351ed66595bd8268f1843a1efe2c1604a5
--
View it on GitLab: https://salsa.debian.org/med-team/python-bx/-/commit/079d1e351ed66595bd8268f1843a1efe2c1604a5
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/20210224/306ef31a/attachment-0001.htm>
More information about the debian-med-commit
mailing list