Skip to main content

Python package to detect translating ORF from Ribo-seq data

Project description

Accurate detection of short and long active ORFs using Ribo-seq data

Installation

We highly recommend that you install ribotricer via conda:

conda install -c bioconda ribotricer

To install locally, you can either download the source code from release or clone the latest version using git clone. After you get a copy of the source code, please change into the directory where the source code locates, and type

python setup.py install

NOTE: The above will install the following depencies:

pyfaidx>=0.5.0
pysam>=0.11.2.2
numpy>=1.11.0
pandas>=0.20.3
scipy>=0.19.1
matplotlib>=2.1.0
click>=6.0
click-help-colors>=0.3
quicksect>=0.2.0
tqdm>=4.23.4

If some of these are already present, they might be replaced by the designated version. So we strongly recommend creating a separate enrivoment (using venv or conda) before installing ribotricer.


Workflow of ribotricer

In order to run ribotricer, you need to have the following three files prepared including:

  • genome annotation file in GTF format, supporting both GENCODE and Ensembl annotation
  • reference genome file in FASTA format
  • alignment file in BAM format

Preparing candidate ORFs

The first step of ribotricer is to take the GTF file and the FASTA file to find all candidate ORFs. In order to generate all candidate ORFs, please run

ribotricer prepare-orfs --gtf {GTF} --fasta {FASTA} --prefix {PREFIX}

The command above by default only includes ORFs with length longer than 60 nts, and only uses 'ATG' as start codon. You can change the setting by including options --min_orf_length and --start_codons.
Output: {PREFIX}_candidate_orfs.tsv.

Detecting translating ORFs

The second step of ribotricer is to take the index file generated by prepare-orfs and the BAM file to detect the actively translating ORFs by assessing the periodicity of all candidate ORFs:

ribotricer detect-orfs --bam {BAM} --ribotricer_index {PREFIX}_candidate_ORFs.tsv --prefix {PREFIX}

The ORF detection step consists of several small steps including:

  1. Infer the experimental protocol (strandedness of the reads)
    You can directly assign the strandedness using option --stranded, it can be 'yes', 'no', or 'reverse'. If this option is not provided, ribotricer will automatically infer the experimental protocol by comparing the strand of reads to the reference.
    Output: {PREFIX}_protocol.txt

  2. Split the bam file by strand and read length
    In this step, all mapped reads will be filtered to include only uniquely mapped reads. Reads will be split by strand and read length with respect to the strandedness provided or inferred from the previous step. If you only want to include certain read lengths, they can be assigned with option --read_lengths.
    Output: {PREFIX}_bam_summary.txt

  3. Plot read length distribution
    In this step, read length distribution will be plotted and serves as quality control
    Output: {PREFIX}_read_length_dist.pdf

  4. Calculate metagene profiles
    In this step, the metagene profile of all CDS transcripts for each read length is calculated by aligning with start codon or stop codon.
    Output: {PREFIX}_metagene_profiles_5p.tsv is the metagene profile aligning with the start codon and {PREFIX}_metagene_profiles_3p.tsv is the metagene profile aligning with the stop codon

  5. Plot metagene profiles
    In this step, metagene plots will be made to serve as quality control.
    Output: {PREFIX}_metagene_plots.pdf

  6. Align metagene profiles
    If the P-site offsets are not provided, this step will use cross-correlation to find out the relative offsets between different read lengths
    Output: {PREFIX}_psite_offsets.txt

  7. merge reads from different read lengths based on P-site offsets
    This step will integrate reads of different read lengths by shifting with the P-site offsets

  8. Export wig file
    A WIG file is exported in this step to be used for visualization in Genome Browser
    Output: {PREFIX}_pos.wig for the positive strand and {PREFIX}_neg.wig for the negative strand.

  9. Export actively translating ORFs
    The periodicity of all ORF profiles are assessed and the translating ones are outputed. You can output all ORFs regardless of the translation status with option --report_all
    Output: {PREFIX}_translating_ORFs.tsv


Definition of ORF types

Ribotricer reports eight different ORF types as defined below:

  • annotated: CDS annotated in the provided GTF file
  • super_uORF: upstream ORF of the annotated CDS, not overlapping with any CDS of the same gene
  • super_dORF: downstream ORF of the annotated CDS, not overlapping with any CDS of the same gene
  • uORF: upstream ORF of the annotated CDS, not overlapping with the main CDS
  • dORF: downstream ORF of the annotated CDS, not overlapping with the main CDS
  • overlap_uORF: upstream ORF of the annotated CDS, overlapping with the main CDS
  • overlap_dORF: downstream ORF of the annotated CDS, overlapping with the main CDS
  • novel: ORF in non-coding genes or in non-coding transcripts of coding genes

Contacts and bug reports

Andrew D. Smith andrewds@usc.edu

Wenzheng Li wenzhenl@usc.edu

Saket Choudhary skchoudh@usc.edu

We are dedicated to make the best ORF detector for Ribo-seq data analysis. If you found a bug or mistake in this project, we would like to know about it. Before you send us the bug report though, please check the following:

  1. Are you using the latest version? The bug you found may already have been fixed.
  2. Check that your input is in the correct format and you have selected the correct options.
  3. Please reduce your input to the smallest possible size that still produces the bug; we will need your input data to reproduce the problem, and the smaller you can make it, the easier it will be.

LICENSE

Ribotricer for detecting actively translating ORFs from Ribo-seq data Copyright (C) 2018 Andrew D Smith, Wenzheng Li, Saket Choudhary and the University of Southern California

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ribotricer-1.0.3.tar.gz (38.5 kB view hashes)

Uploaded Source

Built Distribution

ribotricer-1.0.3-py3-none-any.whl (47.5 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page