Other import.* functions simply ignore the which= arg when it's set to NULL, but import.bb throws an error instead
Reprex
Code
f <- "https://www.encodeproject.org/files/ENCFF096UAE/@@download/ENCFF096UAE.bigBed"
gr <- rtracklayer::import(con = f, which=NULL)
gr <- rtracklayer::import.bb(con = f, which=NULL)
Console output
Error in as(ranges, "IntegerRangesList") :
no method or default for coercing “NULL” to “IntegerRangesList”
13.
stop(gettextf("no method or default for coercing %s to %s", dQuote(thisClass),
dQuote(Class)), domain = NA)
12.
as(ranges, "IntegerRangesList")
11.
initialize(value, ...)
10.
initialize(value, ...)
9.
new("BigBedSelection", ranges = as(ranges, "IntegerRangesList"),
colnames = colnames)
8.
BigBedSelection(which, ...)
7.
.class1(object)
6.
as(selection, "BigBedSelection")
5.
.local(con, format, text, ...)
4.
import(FileForFormat(con), ...)
3.
import(FileForFormat(con), ...)
2.
rtracklayer::import(con = f, which = NULL)
1.
rtracklayer::import(con = f, which = NULL)
Other
import.*
functions simply ignore thewhich=
arg when it's set toNULL
, butimport.bb
throws an error insteadReprex
Code
Console output
Session info
Best, Brian