diff --git a/CHANGELOG.txt b/CHANGELOG.txt index caccf887..6e7970f7 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -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) diff --git a/Makefile b/Makefile index 061fa997..8b72f247 100644 --- a/Makefile +++ b/Makefile @@ -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: @@ -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" @@ -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" diff --git a/bin/reademption b/bin/reademption index ef6640fb..4d4ba524 100755 --- a/bin/reademption +++ b/bin/reademption @@ -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 @@ -9,7 +9,7 @@ __author__ = "Konrad Foerstner " __copyright__ = "2011-2016 by Konrad Foerstner " __license__ = "ISC license" __email__ = "konrad@foerstner.org" -__version__ = "0.3.9" +__version__ = "0.4.0" def main(): diff --git a/docs/source/conf.py b/docs/source/conf.py index ce32d65a..f671e547 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -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. diff --git a/docs/source/installation.rst b/docs/source/installation.rst index c28106d9..b0ad4ae0 100644 --- a/docs/source/installation.rst +++ b/docs/source/installation.rst @@ -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 `_, -`pysam `_ as well as `setuptools -`_ and `pip +case `setuptools `_ and `pip `_ should be available on the system in order to make the installation easy. READemption uses the short read mapper `segemehl @@ -44,18 +42,18 @@ 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 @@ -63,13 +61,13 @@ Copying the executable to a location that is part of the ``PATH`` e.g :: - 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 ~~~~~~~~~~~~~~~~~ @@ -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:: @@ -130,7 +127,7 @@ Install ``matplotlib``: :: - pip3 install python3-matplotlib + pip3 install matplotlib 2. Installing segemehl, DESeq, pysam and READemption @@ -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 diff --git a/reademptionlib/sambamconverter.py b/reademptionlib/sambamconverter.py index 5f86f975..864fc7bd 100644 --- a/reademptionlib/sambamconverter.py +++ b/reademptionlib/sambamconverter.py @@ -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 diff --git a/setup.py b/setup.py index c79b1c1e..07068e64 100644 --- a/setup.py +++ b/setup.py @@ -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='konrad@foerstner.org',