Search
Question: error with detectTranscripts
0
gravatar for warrena
10 weeks ago by
warrena0
warrena0 wrote:

Greetings,

I am attempting to use detectTranscripts() from groHMM using bams from a PRO-seq experiment. I am getting the following error:

Error in Fp[[i]] + 1 : non-numeric argument to binary operator
In addition: Warning messages:
1: In mclapply(readsList, function(x) { :
  all scheduled cores encountered errors in user code
2: In mclapply(readsList, function(x) { :
  all scheduled cores encountered errors in user code

 

Here is my code:

s1 <- as(readGAlignments("poolA_index1_sample.bam"), "GRanges")
s2 <- as(readGAlignments("poolA_index2_sample.bam"), "GRanges")
S0m <- c(s1, s2)
Sall <- sort(c(S0m))
hmmResult <- detectTranscripts(Sall, LtProbB=-200, UTS=5, threshold=1)

 

From what I can tell, my data are formatted identically to the data from the groHMM vignette (those data give the expected output), e.g.,

> head(Sall)
GRanges object with 6 ranges and 0 metadata columns:
      seqnames             ranges strand
         <Rle>          <IRanges>  <Rle>
  [1]     chr1 [3000917, 3000935]      +
  [2]     chr1 [3010291, 3010321]      +
  [3]     chr1 [3102785, 3102808]      +
  [4]     chr1 [3190350, 3190371]      +
  [5]     chr1 [3230646, 3230667]      +
  [6]     chr1 [3282720, 3282739]      +
  -------
  seqinfo: 66 sequences from an unspecified genome

 

I have also verified that my genomic ranges contain all numeric entries, e.g.:

rang <- as.data.frame( ranges(Sall) )
inds = which(is.numeric(rang[,1])==F) # integer(0)

 

Assistance or advice would be greatly appreciated.

 

ADD COMMENTlink modified 10 weeks ago by lee.kraus0 • written 10 weeks ago by warrena0

Hello! Removing the random chr annotations (chrUn_gl0000230, chr9_gl000198_random) from your bam file should take of that error with the current version of groHMM package. Please try: 

Sall_stdchr <- keepStandardChromosomes(Sall)
hmmResult <- detectTranscripts(Sall_stdchr, LtProbB=-200, UTS=5, threshold=1)

Best,

Anusha

 

 

 

 

ADD REPLYlink modified 10 weeks ago • written 10 weeks ago by anusha.nagari20

Thanks, Anusha. This worked. I'll add that for users of R 3.4.4 I had to call keepStandardChromosomes() with pruning.mode="coarse". Here is the code:

require(groHMM)
library(IRanges)
library(GenomicRanges)
library(Rsamtools)
library(GenomicAlignments)

data <- readGAlignments("poolA_index1_sample.bam")
data_gr <- granges(data)
data_gr <- sort(data_gr)
gr <- keepStandardChromosomes(data_gr, pruning.mode="coarse")
hmmResult <- detectTranscripts(gr, LtProbB=-200, UTS=5, threshold=1)

 

ADD REPLYlink written 10 weeks ago by warrena0
0
gravatar for lee.kraus
10 weeks ago by
lee.kraus0
United States
lee.kraus0 wrote:
Hi Anusha, Can you please respond to this? Thanks, Lee W. Lee Kraus 607-227-8726 Lee.Kraus@utsouthwestern.edu<mailto:lee.kraus@utsouthwestern.edu> On Jul 9, 2018, at 1:31 PM, warrena [bioc] <noreply@bioconductor.org<mailto:noreply@bioconductor.org>> wrote: Activity on a post you are following on support.bioconductor.org<https: support.bioconductor.org=""> User warrena<https: support.bioconductor.org="" u="" 16186=""/> wrote Question: error with detectTranscripts<https: support.bioconductor.org="" p="" 110852=""/>: Greetings, I am attempting to use detectTranscripts() from groHMM using bams from a PRO-seq experiment. I am getting the following error: Error in Fp[[i]] + 1 : non-numeric argument to binary operator In addition: Warning messages: 1: In mclapply(readsList, function(x) { : all scheduled cores encountered errors in user code 2: In mclapply(readsList, function(x) { : all scheduled cores encountered errors in user code Here is my code: s1 <- as(readGAlignments("poolA_index1_sample.bam"), "GRanges") s2 <- as(readGAlignments("poolA_index2_sample.bam"), "GRanges") S0m <- c(s1, s2) Sall <- sort(c(S0m)) hmmResult <- detectTranscripts(Sall, LtProbB=-200, UTS=5, threshold=1) From what I can tell, my data are formatted identically to the data from the groHMM vignette (those data give the expected output), e.g., > head(Sall) GRanges object with 6 ranges and 0 metadata columns: seqnames ranges strand <rle> <iranges> <rle> [1] chr1 [3000917, 3000935] + [2] chr1 [3010291, 3010321] + [3] chr1 [3102785, 3102808] + [4] chr1 [3190350, 3190371] + [5] chr1 [3230646, 3230667] + [6] chr1 [3282720, 3282739] + ------- seqinfo: 66 sequences from an unspecified genome I have also verified that my genomic ranges contain all numeric entries, e.g.: rang <- as.data.frame( ranges(Sall) ) inds = which(is.numeric(rang[,1])==F) # integer(0) Assistance or advice would be greatly appreciated. ________________________________ Post tags: groHMM You may reply via email or visit error with detectTranscripts ________________________________ UT Southwestern Medical Center The future of medicine, today.
ADD COMMENTlink written 10 weeks ago by lee.kraus0
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.2.0
Traffic: 121 users visited in the last hour