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.
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:
Best,
Anusha
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: