Entering edit mode
dondelelcaro
▴
10
@dondelelcaro-11528
Last seen 8.2 years ago
USA/Champaign/University of Illinois
GenomicRanges::nearest
fails because strand(subject) != "-"
is not logical:
>
nearest(GRanges(seqnames=Rle("1",1),ranges=IRanges(start=1,end=10)),GRanges(seqnames=Rle("1",1),ranges=IRanges(start=100,end=120)))
Error in base::which(x, arr.ind, useNames, ...) :
argument to 'which' is not logical
Changing which(strand(subject)!="-")
to which(as.logical(strand(subject)!="-"))
should fix this.
sessionInfo? I am not able to reproduce this. Probably a namespace/generic issue, because there should be no need to coerce the logical Rle to a logical vector just to call
which()
.Looks like I can reduce this to:
Hmm. I've tried to replicate your environment but I still can't reproduce it. Maybe try removing and reinstalling Bioconductor from scratch? Something might be cached somewhere.
OK, I'm still not sure what is causing this, but rebuilding S4Vectors and BiocGenerics fixes the issue.
The difference that I can tell is:
vs on a rebuild:
Maybe it's because something changed in the S4 inheritance between R versions? Kind of out of my depth here.