error with detectTranscripts
1
0
Entering edit mode
warrena • 0
@warrena-16186
Last seen 5.7 years ago

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.

 

groHMM • 968 views
ADD COMMENT
0
Entering edit mode

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 REPLY
0
Entering edit mode

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 REPLY
0
Entering edit mode
lee.kraus • 0
@leekraus-8431
Last seen 8.8 years ago
United States
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 COMMENT

Login before adding your answer.

Traffic: 632 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