Skip to content
This repository has been archived by the owner on Nov 25, 2023. It is now read-only.

Commit

Permalink
Release 0.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
vimalkvn committed Oct 15, 2015
1 parent 4c8576a commit ecc3e37
Show file tree
Hide file tree
Showing 10 changed files with 91 additions and 70 deletions.
36 changes: 36 additions & 0 deletions HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,39 @@
History
=======
0.2.0 (2015-10-15)
------------------
**riboplot**

* Support for color schemes - options: default, colorbrewer, rgb, greyorfs.
* Plot changes - colored, light background for ORF architecture, legend moved down.
* Image DPI change 300 |srarr| 600.
* Sample scripts to plot multiple transcripts and multiple color schemes.

**ribocount**

* Ability to output read counts in 5'(``-v``) and 3'(``-r``) leader region.

Bugfixes

1. Report error if a bam index could not be generated (ex. bam sorted using
reference names instead of chromosome coordinates).
2. No start/stop values when transcript sequences are in lower case.

Tests

* Split into three different files.
* Updated test configuration.

Minor

* XML wrapper changes - remove 'leader', add help text and output label change [ribocount].
* Remove unused pysam import [riboplot].
* Replace doc includes with sym links (breaks Galaxy toolshed otherwise).
* Updated CSS/Table styles (removed number column from table).
* y limit is now 1.25x [riboplot].
* Removed line width on bars [riboplot].

0.1.1 (2015-09-08)
------------------
* Remove invalid Python 3 version (whl).
Expand All @@ -12,3 +45,6 @@ History
0.1.0 (2015-08-24)
------------------
* First release on PyPI.

.. substitutions
.. |srarr| unicode:: U+02192 .. RIGHTWARDS ARROW
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@ There are two programs in the package:

Free software: GPL license.

Documentation: https://riboplot.readthedocs.org.
Documentation: http://pythonhosted.org/riboplot.

11 changes: 0 additions & 11 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,6 @@

import sys
import os
# To get the docs to build on readthedocs.org
from mock import Mock as MagicMock

class Mock(MagicMock):
@classmethod
def __getattr__(cls, name):
return Mock()

MOCK_MODULES = ['matplotlib']
sys.modules.update((mod_name, Mock()) for mod_name in MOCK_MODULES)


# If extensions (or modules to document with autodoc) are in another
# directory, add these directories to sys.path here. If the directory is
Expand Down
98 changes: 47 additions & 51 deletions docs/usage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ and the Ribo-Seq/RNA-Seq alignment (BAM).
++++++++++++++++++++++++++++++++++++++++++++
If you have RNA-Seq data (sorted BAM), you can select the option to plot RNA coverage.

5. Read lengths to consider [Optional] (Integer - 0 or greater)
5. Read lengths to consider [optional] (Integer - 0 or greater)
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
If this option is provided, only Ribo-Seq data of the given length is considered.

Expand All @@ -53,6 +53,7 @@ The open reading frame architecture appears below the plot with start (ATG) and
The color codes are start (white) and stop (dark gray).

.. image:: ../images/riboplot.png
:width: 80 %

2. RiboSeq read counts (CSV)
++++++++++++++++++++++++++++
Expand All @@ -63,44 +64,38 @@ Command line
............
``riboplot`` can also be run on the command line. The usage is ::

usage: riboplot [-h] -b RIBO_FILE -f TRANSCRIPTOME_FASTA -t TEXT
[-n RNA_FILE] [-l INTEGER] [-s INTEGER] [-m HTML_FILE]
[-o OUTPUT_PATH] [-d]
riboplot [-h] -b RIBO_FILE -f TRANSCRIPTOME_FASTA -t TEXT
[-n RNA_FILE] [-l INTEGER] [-s INTEGER]
[-c {default,colorbrewer,rgb,greyorfs}] [-m HTML_FILE]
[-o OUTPUT_PATH] [-d]

Plot and output read counts for a single transcript
Plot and output read counts for a single transcript

optional arguments:
-h, --help
show this help message and exit
**required arguments**:
-b RIBO_FILE, --ribo_file RIBO_FILE
Ribo-Seq alignment file in BAM format
-f TRANSCRIPTOME_FASTA, --transcriptome_fasta TRANSCRIPTOME_FASTA
FASTA format file of the transcriptome
-t TEXT, --transcript_name TEXT
Transcript name

**optional arguments**:
-h, --help show this help message and exit
-n RNA_FILE, --rna_file RNA_FILE
RNA-Seq alignment file (BAM)

-l INTEGER, --read_length INTEGER
Read length to consider (default: None)

-s INTEGER, --read_offset INTEGER
Read offset (default: 0)

-c COLOR_SCHEME, --color_scheme COLOR_SCHEME
Color scheme to use (default: default). Other options are colorbrewer, rgb, greyorfs
-m HTML_FILE, --html_file HTML_FILE
Output file for results (HTML)

-o OUTPUT_PATH, --output_path OUTPUT_PATH
Files are saved in this directory

-d, --debug
Flag. Produce debug output

required arguments:
-b RIBO_FILE, --ribo_file RIBO_FILE
Ribo-Seq alignment file in BAM format

-f TRANSCRIPTOME_FASTA, --transcriptome_fasta TRANSCRIPTOME_FASTA
FASTA format file of the transcriptome

-t TEXT, --transcript_name TEXT
Transcript name

RiboCount
---------
Output read counts for all transcripts in an alignment.
Expand All @@ -127,6 +122,12 @@ If this option is provided, only Ribo-Seq data of the given length is considered
+++++++++++++++++++++++++++++++++++++++++++++
If this option is provided, this offset is added to the read alignment positions.

5. Restrict read counts
+++++++++++++++++++++++
Choose whether to output read counts for the entire transcript or restrict read counts to the 5' or 3' region of the longest ORF.
Default start (ATG) and stop codons ('TAG', 'TGA', 'TAA') are used to identify the longest ORF in 3 frames.


Output
......
Read counts for all transcripts in the alignment (ZIP)
Expand All @@ -135,45 +136,40 @@ The output file ``ribocount_output.zip`` should first be uncompressed. This will
a folder called ``ribocount_output``. Open ``index.html`` in a web browser to view the results of ribocount.

Total reads for each transcript will be displayed in a table along with the name of the transcript and a link
to the CSV file containing the read counts in 3 frames for each position in the transcript.
to the CSV file containing the read counts in 3 frames for each position in the transcript. If 5' or 3' counts
are requested, an extra column will be present with reads in these regions.

.. image:: ../images/ribocount.png

Command line
............
``ribocount`` can also be run on the command line. The usage is ::

usage: ribocount [-h] -b RIBO_FILE -f TRANSCRIPTOME_FASTA [-l INTEGER]
[-s INTEGER] [-m HTML_FILE] [-o OUTPUT_PATH] [-d]
ribocount [-h] -b RIBO_FILE -f TRANSCRIPTOME_FASTA [-l INTEGER]
[-s INTEGER] [-v | -r] [-m HTML_FILE] [-o OUTPUT_PATH]
[-d]

Output read counts for all transcripts

optional arguments:

-h, --help show this help message and exit

-l INTEGER, --read_length INTEGER
Read length to consider (default: None)

-s INTEGER, --read_offset INTEGER
Read offset (default: 0)

-m HTML_FILE, --html_file HTML_FILE

Output file for results (HTML)

-o OUTPUT_PATH, --output_path OUTPUT_PATH
Files are saved in this directory

-d, --debug Flag. Produce debug output

required arguments:

-b RIBO_FILE, --ribo_file RIBO_FILE
Ribo-Seq alignment file in BAM format
**required arguments**:
-b RIBO_FILE, --ribo_file RIBO_FILE
Ribo-Seq alignment file in BAM format
-f TRANSCRIPTOME_FASTA, --transcriptome_fasta TRANSCRIPTOME_FASTA
FASTA format file of the transcriptome

-f TRANSCRIPTOME_FASTA, --transcriptome_fasta TRANSCRIPTOME_FASTA
FASTA format file of the transcriptome
**optional arguments**:
-h, --help show this help message and exit
-l INTEGER, --read_length INTEGER
Read length to consider (default: None)
-s INTEGER, --read_offset INTEGER
Read offset (default: 0)
-v, --count_five Flag. Output reads in 5' region
-r, --count_three Flag. Output reads in 3' region
-m HTML_FILE, --html_file HTML_FILE
Output file for results (HTML)
-o OUTPUT_PATH, --output_path OUTPUT_PATH
Files are saved in this directory
-d, --debug Flag. Produce debug output

.. links
.. _RiboGalaxy: http://ribogalaxy.ucc.ie
Expand Down
Binary file modified images/ribocount.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified images/riboplot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 0 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
mock==1.0.1
matplotlib==1.4.3
pysam==0.8.3
2 changes: 1 addition & 1 deletion riboplot/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

__author__ = 'Vimalkumar Velayudhan'
__email__ = '[email protected]'
__version__ = '0.1.1'
__version__ = '0.2.0'
2 changes: 1 addition & 1 deletion riboplot/riboplot.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ def get_color_palette(scheme):
"""
color_schemes = {
'default': {
'frames': ['tomato', 'limegreen', 'deepskyblue'], 'background': '#f5f5f5',
'frames': ['tomato', 'limegreen', 'deepskyblue'], 'background': '#fafafa',
'color': '#616161', 'ticks': '#757575', 'start': '#ffffff', 'stop': '#919191',
'rna': '#e0e0e0', 'axis': '#e0e0e0', 'grey': '#bdbdbd'
},
Expand Down
9 changes: 5 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@
with open('HISTORY.rst') as history_file:
history = history_file.read().replace('.. :changelog:', '')

requirements = ['matplotlib', 'pysam', 'mock==1.0.1']
requirements = ['matplotlib', 'pysam']

test_requirements = [
# TODO: put package test requirements here
]

setup(
name='riboplot',
version='0.1.1',
version='0.2.0',
description="Plot read counts of RiboSeq data from BAM format alignment files",
long_description=readme + '\n\n' + history,
author="Vimalkumar Velayudhan",
Expand All @@ -39,8 +39,9 @@
zip_safe=False,
keywords='riboplot',
classifiers=[
'Development Status :: 2 - Pre-Alpha',
'Intended Audience :: Developers',
'Development Status :: 5 - Production/Stable',
'Intended Audience :: Science/Research',
'Topic :: Scientific/Engineering :: Bio-Informatics',
'License :: OSI Approved :: GNU General Public License (GPL)',
'Natural Language :: English',
"Programming Language :: Python :: 2",
Expand Down

0 comments on commit ecc3e37

Please sign in to comment.