Skip to content

Commit

Permalink
Fixed minor distribution issues
Browse files Browse the repository at this point in the history
  • Loading branch information
jpiper committed Sep 26, 2013
1 parent d8d3dc1 commit 676f0ce
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 7 deletions.
11 changes: 6 additions & 5 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,19 @@ 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())
>>> reads["chr6,170863500,170863532,+"]
{'+': 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

Expand All @@ -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
Expand All @@ -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/‎
8 changes: 7 additions & 1 deletion docs/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,20 @@ 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

#. samtools_
* **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`
~~~~~~~~~~~~~~~~~~~~~~~~~
Expand Down
11 changes: 10 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -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:
Expand All @@ -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/*"]},
Expand Down

0 comments on commit 676f0ce

Please sign in to comment.