Commit d00e2e62 authored by Michael R. Crusoe's avatar Michael R. Crusoe 🏳️‍🌈
Browse files

New upstream version 0.8.4

parent 9974c2d8
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -22,3 +22,6 @@ nose*.egg

# .eggs directory
.eggs

# Virtualenv
.venv
+55 −23
Original line number Diff line number Diff line
language: python
sudo: false
cache: pip
os:
  - linux
    ## - osx
python:
    - 2.7
    - 3.3
  - '2.7'
  - '3.5'

env:
  global:
    - PYTHON=python
    - TWINE_USERNAME=nsoranzo
    - secure: 'kFoqHCxat/ETS2SUc2q9M7YvzvnlR7sgHmx7SRvVgTyLkk1efpJ++YPwDBEYZ3v+GLf2nRfc20GxtZkH6ey1f//aj4CT2q2CJiUsKAlkFAOHzKo/3mTLl/WDHkPAr9MW7AdnbNk6W8sIPCKqFsyKL2FTH70dBcxa1e7trQ2RC64hnOOkt/tm2cQhj6sX0gROggN5QrpHE8tDZb9ugF0uf92L/CGxeClAebWgb7zVChHDMTNsmnOvWUF9m6LZOvkgFmuIeh70EPuOWh6LxU/n5JyevYIGO5vVDbjgfmNELlG2KUTm6dWeoyofcj6hUqYmQsmI1ATrf7ThY1+b6asQGy+Exp/76MBXiYRh+RgVKifwaZMOWehzfjDQvPYOGvf6rXOVGeVZ+nBkskr0HARsX1KnyDE+k+XPoP7zqvW6mCic9ZQ+IdQJtxMHOTxxFjuPAlunvaUqDNM9VP6YEWOI4UqIOO1nQh4E2zkPhXI2yY744q+BV/5+3HHqNQj1+5qFPoZeyDEuNXwgDCjrJ8i3hna/LTTvRigx6/YQL1PF/C30R4h/nkqp8ghA4VpNRPnQ8nOO+oD6AdN7Pswc3C4qGPEwoeqfNzEIR1KfEWzB7HsfTFbgyGFFNGuQ/P26DMK+kPBNZ6GhZ9wb5/xT226OA+ovcAmVGn/Hnt/qVaylXNk='

_deploy_common: &deploy_common
  if: tag IS present
  install:
    - $PYTHON -m pip install cibuildwheel twine

matrix:
  include:
    - stage: deploy
      python: '3.5'
      services:
        - docker
      env: CIBW_BEFORE_BUILD="yum install -y zlib-devel && pip install Cython numpy"
      <<: *deploy_common
      script:
        - cibuildwheel --output-dir dist
        - $PYTHON -m pip install Cython nose numpy python-lzo six
        - $PYTHON setup.py build_ext --inplace
        - $PYTHON setup.py sdist
        - twine check dist/*
        - twine upload --skip-existing dist/*
    - stage: deploy
      os: osx
      language: generic
      env:
        - PYTHON=python3
        - CIBW_BEFORE_BUILD="pip install Cython numpy"
      addons: {}
      <<: *deploy_common
      script:
        - cibuildwheel --output-dir dist
        - twine check dist/*
        - twine upload --skip-existing dist/*

addons:
  apt:
    packages:
      - liblzo2-dev
before_install:
    # Use miniconda for dependencies, pip is too slow -- https://gist.github.com/zonca/9958333
    - wget http://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86_64.sh -O miniconda.sh
    - chmod +x miniconda.sh
    - ./miniconda.sh -b
    - export PATH=/home/travis/miniconda2/bin:$PATH
    - conda update --yes conda

install:
    - conda create --yes -n testenv python=$TRAVIS_PYTHON_VERSION Cython numpy nose
    - source activate testenv
    - pip install python-lzo
    - python setup.py build_ext --inplace
    - python setup.py install
  - $PYTHON -m pip install Cython nose numpy python-lzo six
  - $PYTHON setup.py build_ext --inplace
  - $PYTHON setup.py install

script:
  - nosetests
+1 −1
Original line number Diff line number Diff line
@@ -7,7 +7,7 @@
The bx-python project is a python library and associated set of scripts to allow for rapid implementation of genome scale analyses. The library contains a variety of useful modules, but the particular strengths are:

  * Classes for reading and working with genome-scale multiple local alignments (in MAF, AXT, and LAV formats)
  * Generic data structure for indexing on disk files that contain blocks of data associated with intervals on various sequences (used, for example, to provide random access to individual alignments in huge files; optomized for use over network filesystems)
  * Generic data structure for indexing on disk files that contain blocks of data associated with intervals on various sequences (used, for example, to provide random access to individual alignments in huge files; optimized for use over network filesystems)
  * Data structures for working with intervals on sequences
    * "Binned bitsets" which act just like chromosome sized bit arrays, but lazily allocate regions and allow large blocks of all set or all unset bits to be stored compactly
    * "Intersecter" for performing fast intersection tests that preserve both query and target intervals and associated annotation
+1 −1
Original line number Diff line number Diff line
@@ -4,7 +4,7 @@ About bx-python
The bx-python project is a python library and associated set of scripts to allow for rapid implementation of genome scale analyses. The library contains a variety of useful modules, but the particular strengths are:

 * Classes for reading and working with genome-scale multiple local alignments (in MAF, AXT, and LAV formats)
 * Generic data structure for indexing on disk files that contain blocks of data associated with intervals on various sequences (used, for example, to provide random access to individual alignments in huge files; optomized for use over network filesystems)
 * Generic data structure for indexing on disk files that contain blocks of data associated with intervals on various sequences (used, for example, to provide random access to individual alignments in huge files; optimized for use over network filesystems)
 * Data structures for working with intervals on sequences
 * "Binned bitsets" which act just like chromosome sized bit arrays, but lazily allocate regions and allow large blocks of all set or all unset bits to be stored compactly
 * "Intersecter" for performing fast intersection tests that preserve both query and target intervals and associated annotation 
+42 −47
Original line number Diff line number Diff line
"""
Tests for `bx.align.score`.
"""
import sys
import unittest

from numpy import array, cumsum, allclose
@@ -24,8 +23,7 @@ aligns = [ ( "CCACTAGTTTTTAAATAATCTACTATCAAATAAAAGATTTGTTAATAATAAATTTTAAATCATTAA
           -299),
          ("gggaattgaacaatgagaacacatggacacaggaaggggaacatcacacacc----------ggggcctgttgtggggtggggggaag",
           "ggaactagaacaagggagacacatacaaacaacaacaacaacaacacagcccttcccttcaaagagcttatagtctgatggaggagag",
             1690 )
         ]
           1690)]

mafs = """##maf
a score=2883.0
@@ -46,9 +44,7 @@ nonsymm_scheme = bx.align.score.build_scoring_scheme ( """ A C G T

aligns_for_nonsymm_scheme = [("AAAACCCCGGGGTTTT",
                              "ACGTACGTACGTACGT",
                                -580 )
                            ]

                              -580)]

asymm_scheme = bx.align.score.build_scoring_scheme("""    01   02    A    C    G    T
                                                       01  200 -200  -50  100  -50  100
@@ -57,8 +53,7 @@ asymm_scheme = bx.align.score.build_scoring_scheme ( """ 01 02 A C

aligns_for_asymm_scheme = [("\x01\x01\x01\x01\x01\x01",
                            "ACGT\x01\x02",
                              100 )
                          ]
                            100)]


class BasicTests(unittest.TestCase):
@@ -66,12 +61,12 @@ class BasicTests( unittest.TestCase ):
    def test_scoring_text(self):
        ss = bx.align.score.hox70
        for t1, t2, score in aligns:
            self.assertEquals( bx.align.score.score_texts( ss, t1, t2 ), score )
            self.assertEqual(bx.align.score.score_texts(ss, t1, t2), score)

    def test_align(self):
        ss = bx.align.score.hox70
        for block in bx.align.maf.Reader(StringIO(mafs)):
            self.assertEquals( bx.align.score.score_alignment( ss, block ), float( block.score ) )
            self.assertEqual(bx.align.score.score_alignment(ss, block), float(block.score))

    def test_accumulate(self):
        ss = bx.align.score.hox70
@@ -83,9 +78,9 @@ class BasicTests( unittest.TestCase ):
    def test_nonsymm_scoring(self):
        ss = nonsymm_scheme
        for t1, t2, score in aligns_for_nonsymm_scheme:
            self.assertEquals( bx.align.score.score_texts( ss, t1, t2 ), score )
            self.assertEqual(bx.align.score.score_texts(ss, t1, t2), score)

    def test_asymm_scoring(self):
        ss = asymm_scheme
        for t1, t2, score in aligns_for_asymm_scheme:
            self.assertEquals( bx.align.score.score_texts( ss, t1, t2 ), score )
            self.assertEqual(bx.align.score.score_texts(ss, t1, t2), score)
Loading