Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
konrad committed Jul 27, 2016
2 parents 8f514ff + 1950c62 commit 5d51d61
Show file tree
Hide file tree
Showing 7 changed files with 37 additions and 31 deletions.
5 changes: 4 additions & 1 deletion CHANGELOG.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
v0.3.8 (2016-03-07)
v0.4.0 (2016-07-27)
- Fix issue with pysam in samtobam.py
- Update installation documentation
v0.3.9 (2016-03-07)
- Add support for centered approach in coverage and gene_quanti
(by Thorsten Bischler)
- Fix bar chart creation in viz_gene_quanti (by Thorsten Bischler)
Expand Down
12 changes: 6 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ package:
ls dist/*

build:
python3 setup.py bdist
python3 setup.py bdist_wheel

package_to_pypi:
python3 setup.py sdist upload
python3 setup.py bdist_wheel upload
@echo "Go to https://pypi.python.org/pypi/READemption/"

html_doc:
Expand Down Expand Up @@ -48,8 +48,8 @@ pylint:

new_release:
@echo "* Create/checkout a release branch"
@echo " git branch release_v0.3.X"
@echo " git checkout release_v0.3.X"
@echo " git branch release_v0.4.X"
@echo " git checkout release_v0.4.X"
@echo "* Change bin/reademption"
@echo "* Change setup.py"
@echo "* Change docs/source/conf.py"
Expand All @@ -59,8 +59,8 @@ new_release:
@echo "* Test doc creation"
@echo "* make package_to_pypi"
@echo "* git add CHANGELOG.txt bin/reademption docs/source/conf.py setup.py"
@echo "* Commit changes e.g. 'git commit -m \"Set version to 0.3.X\"'"
@echo "* Tag the commit e.g. 'git tag -a v0.3.X -m \"version v0.3.X\"'"
@echo "* Commit changes e.g. 'git commit -m \"Set version to 0.4.X\"'"
@echo "* Tag the commit e.g. 'git tag -a v0.4.X -m \"version v0.4.X\"'"
@echo "* Merge release into dev and master"
@echo "* Push it to github: git push"
@echo "* Generate a new release based on this tag at"
Expand Down
4 changes: 2 additions & 2 deletions bin/reademption
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env python3

"""READemption - A RNA-seq Analysis PipeLine"""
"""READemption - A RNA-seq Analysis Pipeline"""

import argparse
from reademptionlib.controller import Controller
Expand All @@ -9,7 +9,7 @@ __author__ = "Konrad Foerstner <[email protected]>"
__copyright__ = "2011-2016 by Konrad Foerstner <[email protected]>"
__license__ = "ISC license"
__email__ = "[email protected]"
__version__ = "0.3.9"
__version__ = "0.4.0"


def main():
Expand Down
6 changes: 3 additions & 3 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,16 +41,16 @@

# General information about the project.
project = u'READemption'
copyright = u'2015, Konrad U. Förstner'
copyright = u'2016, Konrad U. Förstner'

# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# The short X.Y version.
version = '0.3'
version = '0.4'
# The full version, including alpha/beta/rc tags.
release = '0.3.9'
release = '0.4.0'

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down
31 changes: 14 additions & 17 deletions docs/source/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@ Requirements

READemption was started to be developed using Python 3.2 and the user
is advised to run READemption with this or a higher version. In any
case, the third party packages `Biopython <http://biopython.org>`_,
`pysam <https://code.google.com/p/pysam>`_ as well as `setuptools
<https://pypi.python.org/pypi/setuptools>`_ and `pip
case `setuptools <https://pypi.python.org/pypi/setuptools>`_ and `pip
<http://www.pip-installer.org>`_ should be available on the system in
order to make the installation easy. READemption uses the short read
mapper `segemehl
Expand Down Expand Up @@ -44,32 +42,32 @@ Now you can install the packages::

Some comments:

- Ubuntu 14.04 should have Python 3.4 already installed.
- Ubuntu 16.04 should have Python 3.5 already installed.
- ``cython`` is required for ``pysam``
- ``make``, ``libncurses5-dev`` and ``zlib1g-dev`` are needed for ``segemehl``
- ``libxml2`` required for the installation of some of the R-packages
- ``libxml2`` is required for the installation of some of the R-packages

2. Install segemehl
~~~~~~~~~~~~~~~~~~~

::

curl http://www.bioinf.uni-leipzig.de/Software/segemehl/segemehl_0_1_9.tar.gz > segemehl_0_1_9.tar.gz
tar xzf segemehl_0_1_9.tar.gz
curl http://www.bioinf.uni-leipzig.de/Software/segemehl/segemehl_0_2_0.tar.gz > segemehl_0_2_0.tar.gz
tar xzf segemehl_0_2_0.tar.gz
cd segemehl_*/segemehl/ && make && cd ../../

Copying the executable to a location that is part of the ``PATH`` e.g
``/usr/bin/`` ...

::

sudo cp segemehl_0_1_9/segemehl/segemehl.x /usr/bin/segemehl.x
sudo cp segemehl_0_1_9/segemehl/lack.x /usr/bin/lack.x
sudo cp segemehl_0_2_0/segemehl/segemehl.x /usr/bin/segemehl.x
sudo cp segemehl_0_2_0/segemehl/lack.x /usr/bin/lack.x

... or the bin folder of your home directory::

mkdir ~/bin
cp segemehl_0_1_9/segemehl/segemehl.x ~/bin
cp segemehl_0_2_0/segemehl/segemehl.x ~/bin

3. Install DESeq2
~~~~~~~~~~~~~~~~~
Expand All @@ -90,13 +88,12 @@ Leave ``R``::
quit(save = "no")


Install Biopython, pysam and READemption
Install READemption and it's dependcies
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Now you can use ``pip`` to install ``pysam`` and ``READemption``::
Now you can use ``pip`` to install ``READemption`` and further python
packages::

sudo pip3 install biopython
sudo pip3 install pysam
sudo pip3 install READemption

Voilà! You should now be able to call READemption::
Expand Down Expand Up @@ -130,7 +127,7 @@ Install ``matplotlib``:

::

pip3 install python3-matplotlib
pip3 install matplotlib


2. Installing segemehl, DESeq, pysam and READemption
Expand All @@ -144,8 +141,8 @@ Updating READemption
--------------------

Once you have installed READemption as described above you can easily
update it to the newest version by running
upgrade it to the newest version by running

::

pip3 install READemption -U
pip3 install --upgrade READemption
8 changes: 7 additions & 1 deletion reademptionlib/sambamconverter.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,13 @@ def sam_to_bam(self, sam_path, bam_path_prefix):
temp_unsorted_bam_path = self._temp_unsorted_bam_path(
bam_path_prefix)
# Generate unsorted BAM file
pysam.view("-Sb", "-o%s" % temp_unsorted_bam_path, sam_path)
#### The following line does not work since pysam 0.9.1.4:
#### pysam.view("-Sb", "-o%s" % temp_unsorted_bam_path, sam_path)
####
#### This is nasty, hopefully only temporaly work-around:
with open(temp_unsorted_bam_path, "wb") as unsorted_bam_fh:
bam_content = pysam.view("-Sb", sam_path)
unsorted_bam_fh.write(bam_content)
# Generate sorted BAM file
pysam.sort(temp_unsorted_bam_path, "-o", bam_path_prefix + ".bam")
# Generate index for BAM file
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

setup(
name='READemption',
version='0.3.9',
version='0.4.0',
packages=['reademptionlib', 'tests'],
author='Konrad U. Förstner',
author_email='[email protected]',
Expand Down

0 comments on commit 5d51d61

Please sign in to comment.