Error with regionCounts()
1
0
Entering edit mode
Chris ▴ 20
@3fdb6f97
Last seen 3 months ago
United States

Hi all,

Would you have a suggestion how to fix this error?

peak.counts <- regionCounts(pe.bams, all.peaks, param=param)

Error: BiocParallel errors

1 remote errors, element index: 1 3 unevaluated and other errors first remote error: Error: position vector should be 1-based

I found a similar error here:

BiocParallel error with ChIPQC

Thank you so much!

csaw • 1.2k views
ADD COMMENT
1
Entering edit mode
ATpoint ★ 4.6k
@atpoint-13662
Last seen 1 minute ago
Germany

Googling 'position vector should be one-based'

https://www.biostars.org/p/9541255/#9541272

ADD COMMENT
0
Entering edit mode

Thanks ATpoint for your help. I read your biostars link and applied your code but got this:

start(all.peaks) <- start(all.peaks) + 1

Error in attr(x, "tsp") <- c(1, NROW(x), 1) : invalid time series parameters specified

The guys in the post figured out the solution but I still don't know how. Would you have a suggestion?

ADD REPLY
1
Entering edit mode

What is class(all.peaks). This works for GRanges objects.

library(GenomicRanges)

gr <- GRanges(seqnames=c("chr1", "chr2"),
              ranges=IRanges(start=c(0,1), end=c(5,6)))

start(gr) <- start(gr)+1

Maybe some namespace conflict, try also GenomicRanges::start().

ADD REPLY
0
Entering edit mode

ATpoint Thank you for your help!

class(all.peaks)

[1] "GRanges"
attr(,"package")
[1] "GenomicRanges"

Don't know why start(gr) <- start(gr)+1 doesn't have error anymore but still:

peak.counts <- regionCounts(pe.bams, all.peaks, param=param)

Error: BiocParallel errors 1 remote errors, element index: 1
3 unevaluated and other errors
first remote error:
Error: position vector should be 1-based

ADD REPLY

Login before adding your answer.

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