From 676f0cec7df16cf05993a40795fd917b7e0a1809 Mon Sep 17 00:00:00 2001 From: Jason Piper Date: Thu, 26 Sep 2013 10:35:05 +0100 Subject: [PATCH] Fixed minor distribution issues --- README.rst | 11 ++++++----- docs/installation.rst | 8 +++++++- setup.py | 11 ++++++++++- 3 files changed, 23 insertions(+), 7 deletions(-) diff --git a/README.rst b/README.rst index c668ba1..a2f07cd 100644 --- a/README.rst +++ b/README.rst @@ -8,7 +8,7 @@ Introduction Many people currently analyzing DNase-seq data are using tools designed for ChIP-seq work, but may be inappropriate for DNase-seq data where one is less interested in the overlaps of sequenced fragments, but the site at which the cut occurs (the 5' most end of the aligned sequence fragment). -We have developed :mod:`pyDNase` to interface with a sorted and indexed BAM file from a DNase-seq experiment, allowing efficient and easy random access of DNase-seq cut data from any genomic location, e.g. +We have developed `pyDNase` to interface with a sorted and indexed BAM file from a DNase-seq experiment, allowing efficient and easy random access of DNase-seq cut data from any genomic location, e.g. >>> import pyDNase >>> reads = pyDNase.BAMHandler(pyDNase.example_reads()) @@ -16,11 +16,11 @@ We have developed :mod:`pyDNase` to interface with a sorted and indexed BAM file {'+': array([0,0,0,1,0,0,1,1,2,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1,0,0,1,1,0,0,0,1]), '-': array([0,10,1,0,1,0,4,9,0,1,0,2,1,0,0,0,0,0,3,0,6,3,0,0,0,1,1,1,3,0,3,6])} -Querying the ``BAMHandler`` object returns a dictionary containing numpy arrays with DNase cut counts on the positive reference strand (+), and cuts on the negative reference strand (-). :mod:`pyDNase` efficiently caches the cut data queried, so that multiple requests from the same genomic locations do not require repeated lookups from the BAM file (this can be disabled). +Querying the ``BAMHandler`` object returns a dictionary containing numpy arrays with DNase cut counts on the positive reference strand (+), and cuts on the negative reference strand (-). `pyDNase` efficiently caches the cut data queried, so that multiple requests from the same genomic locations do not require repeated lookups from the BAM file (this can be disabled). -:mod:`pyDNase` comes with several analysis scripts covering several common use cases of DNase-seq analysis, and also an implementation of the Wellington and Wellington 1D footprinting algorithms. +`pyDNase` comes with several analysis scripts covering several common use cases of DNase-seq analysis, and also an implementation of the Wellington and Wellington 1D footprinting algorithms. -to install :mod:`pyDNase` is as easy as:: +to install `pyDNase`, ensure NumPy_ is installed, and run:: $ pip install pyDNase @@ -41,7 +41,7 @@ Reference --------- .. note :: - If you use :mod:`pyDNase` or the Wellington algorithm in your work, please cite the following paper. + If you use `pyDNase` or the Wellington algorithm in your work, please cite the following paper. Piper et al. 2013. *Wellington: A novel method for the accurate identification of digital genomic footprints from DNase-seq data*, Nucleic Acids Research 2013; doi: 10.1093/nar/gkt850 @@ -50,3 +50,4 @@ License Copyright (C) 2013 Jason Piper. This work is licensed under the GNU GPLv3 license, see ``LICENCE.TXT`` for details. +.. _NumPy: http://www.numpy.org/‎ diff --git a/docs/installation.rst b/docs/installation.rst index d2f4d6c..83df193 100644 --- a/docs/installation.rst +++ b/docs/installation.rst @@ -51,7 +51,7 @@ on their system. I have attempted to list them in the order that you need to ins $ curl https://raw.github.com/pypa/pip/master/contrib/get-pip.py | python #. Cython_ - * Provided you installed the above, you should be able to simply run :: + * Provided you installed pip_, you should be able to simply run :: $ pip install Cython @@ -59,6 +59,12 @@ on their system. I have attempted to list them in the order that you need to ins * **On OS X** the simplest way to install samtools_ is using the homebrew_ command ``brew tap homebrew/science`` followed by ``brew install homebrew/science/samtools``. * **On Ubuntu** you can use ``sudo apt-get install samtools`` + +#. NumPy_ + * Provided you installed pip_, you should be able to simply run :: + + $ pip install numpy + Installing :mod:`pyDNase` ~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/setup.py b/setup.py index c702c06..544a173 100644 --- a/setup.py +++ b/setup.py @@ -1,5 +1,13 @@ __author__ = 'Jason Piper' +#Unfortunately, we have to ensure that the user has numpy is installed, +#as pip is bad at installing numpy and scipy at the same time, and just breaks + +try: + import numpy +except ImportError: + raise ImportError("Due to a quirk with pip, pyDNase requires numpy to be installed before starting setup") + try: from setuptools import setup, Extension except ImportError: @@ -22,13 +30,14 @@ ], #Uses a custom version of clint that has a time estimator on the progress bar - dependency_links = ["http://github.com/jpiper/clint/tarball/develop#egg=clint-0.3.1dev"], + dependency_links = ["http://github.com/jpiper/clint/tarball/develop#egg=clint-0.3.0p"], install_requires=[ "numpy", "scipy", "matplotlib", "pysam", + "clint==0.3.0p" ], package_data = {'pyDNase':["data/*"]},