INSPEcT: Error when trying to run modelRates()
0
0
Entering edit mode
@kentriemondy-14219
Last seen 8 hours ago
Denver, University of Colorado Anschutz…

I recently encountered an error while trying to estimate mRNA synthesis, processing, and degradation rates using the INSPEcT package. The developer assisted in helping me correct the issue. I've reproduced the error and solution here in case others run into a similar issue. 

The INSPEcT package estimates mRNA synthesis, processing, and degradation rates from 4sU labeling time-course experiments. The input data for the modeling procedures are gene-level exonic and intronic RPKMs measurements. For these measurements I used RSEM to estimate mature mRNA levels or pre-mRNA levels using annotations that span the entire transcriptional unit (method described in this paper). When running the modelRates() function I would receive an error and the modeling would fail. 

Error in modelSynthesisRatefun$fun$value(.time_transf(tpts, log_shift),  : 
  attempt to apply non-function

Here's the code to reproduce the error:

library(INSPEcT)

## read in RPKMs from mature mRNA or pre-mRNA estimated by RSEM
## 21 genes in test dataset
in_dat <- readRDS(gzcon(url("https://www.dropbox.com/s/rzghmdro1sr2e47/test_data.rds?dl=1")))

## time points for the experiment
timepoints <- c(0, 0, 0.5, 0.5, 1, 1, 2, 2, 24, 24, 4, 4)
label_time <- 20 / 60

## guess first rates
inspect_obj <- newINSPEcT(timepoints,
                          label_time,  
                          in_dat$mature_4su, #  4sU exons
                          in_dat$mature_total, # Total exons
                          in_dat$premRNA_4su, # 4sU introns
                          in_dat$premRNA_total, # Total introns
                          degDuringPulse = T) 
## model rates
output <- modelRates(inspect_obj, 
                     seed = 42,
                     BPPARAM = SerialParam())

This error occurs because the input RPKMs for the mature mRNA are not the total amount of exonic signal. The total amount of exonic signal is instead pre-mRNA + mature mRNA. The correct input is as follows, and now modelRates() does not produce the error.

newINSPEcT(timepoints,
           label_time,  
           in_dat$premRNA_4su + in_dat$mature_4su, #  4sU exons
           in_dat$premRNA_total + in_dat$mature_total, # Total exons
           in_dat$premRNA_4su, # 4sU introns
           in_dat$premRNA_total, # Total introns
           degDuringPulse = T) 

output <- modelRates(inspect_obj, 
                         seed = 42,
                         BPPARAM = SerialParam())

 

Thanks to Stefano de Pretis for helping me find this solution.

Best,

Kent Riemondy

 

INSPEcT software error • 708 views
ADD COMMENT

Login before adding your answer.

Traffic: 674 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6