ribosomeprofiling / ribor

R interface for .ribo files
4 stars 1 forks source link

pulling TEs #13

Closed mhassan closed 3 years ago

mhassan commented 3 years ago

Is there a quick way to pullout the translation efficiencies for all experiments at the end of the RiboR walkthrough? Right now am using cbind join the te_CDS and rc_CDS$transcripts, but am not sure they're true representation of what's in the te_CDS.

hakanozadam commented 3 years ago

There is no separate function to pull out the translation efficiencies for all experiments. Though, as you pointed out, this can easily be obtained using the following two function calls and one expression

rnaseq_CDS <- get_rnaseq(ribo.object = original.ribo,
                         tidy        = TRUE,
                         alias       = TRUE,
                         region      = "CDS",
                         compact     = FALSE,
                         experiment  = "GSM1606108")

rc_CDS <- get_region_counts(ribo.object    = original.ribo,
                                tidy       = TRUE,
                                alias      = TRUE,
                                transcript = FALSE,
                                region     = "CDS",
                                compact    = FALSE,
                                experiment = "GSM1606108")

## Here, you might want to put a threshold on RNA-Seq counts 
## as described in the walkthrough.

te_CDS    <- rc_CDS$count/rnaseq_CDS$count 

Translation efficiencies are in te_CDS. You can iterate over all experiments to obtain their translation efficiencies.

Note that, for each gene, translation efficiency is defined as follows:

[ribosome occupancy on CDS] / [gene expression coming from CDS]

imilenkovic commented 3 years ago

Is it possible to obtain TEs for each of the replicates separately, so that one can do the statistics afterwards?

hakanozadam commented 3 years ago

Yes, that is possible.

Take a look at the example here: https://ribosomeprofiling.github.io/ribor/ribor.html#sample_analysis

The idea is, for an individual replicate, you can get transcript expression ( from RNA-Seq data ) and ribosome occupancy ( from ribosome profiling data ). Then, you can simply divide ribosome occupancy by gene expression to get translation efficiency.