R-native liftover backend using rtracklayer::liftOver() with a UCSC chain
file. This is the default backend for liftover_intervals(); it requires no
external tools but needs the Bioconductor packages rtracklayer,
GenomicRanges, IRanges, and S4Vectors.
Arguments
- intervals
A tibble of intervals with
seqnames,start,end, an optionalstrand, and a.feature_idkey (supplied byliftover_intervals()).- chain
Path to a UCSC chain file.
- ...
Unused.
Examples
# \donttest{
# rtracklayer and the packages it depends on take a few seconds to load.
if (
requireNamespace("rtracklayer", quietly = TRUE) &&
requireNamespace("GenomicRanges", quietly = TRUE)
) {
chain <- tempfile(fileext = ".chain")
writeLines(
c(
"chain 1000 chr1 100000 + 0 1000 chrT 200000 + 10000 11000 1",
"1000",
""
),
chain
)
ints <- tibble::tibble(
seqnames = c("chr1", "chr1"),
start = c(100, 5000),
end = c(200, 5100),
.feature_id = 1:2
)
out <- liftover_rtracklayer(ints, chain)
out$mapped
unlink(chain)
}
# }