Perform genome build liftover to one or more GRanges objects at once.

liftover_grlist(
  grlist,
  input_build,
  output_build = "hg19",
  style = "UCSC",
  keep_chr = paste0("chr", c(seq_len(22), "X", "Y")),
  as_grangeslist = FALSE,
  merge_all = FALSE,
  verbose = TRUE
)

Arguments

grlist

A named list of GRanges objects, or simply a single unlisted GRanges object. Can perform liftover within species or across species.

input_build

The genome build of grlist.

output_build

Desired genome build for grlist to be lifted over to.

style

Chromosome style, set by seqlevelsStyle.

  • "UCSC" : Uses the chromosome style "chr1".

  • "NCBI" : Uses the chromosome style "1"

keep_chr

Which chromosomes to keep.

as_grangeslist

Return as a GRangesList.

merge_all

Merge all GRanges into a single GRanges object.

verbose

Print messages.

Value

Named list of lifted GRanges objects.

Examples

grlist <- list("gr1"=GenomicRanges::GRanges("4:1-100000"),
               "gr2"=GenomicRanges::GRanges("6:1-100000"),
               "gr3"=GenomicRanges::GRanges("8:1-100000"))

grlist_lifted <- liftover_grlist(grlist = grlist,
                                 input_build = "hg19",
                                 output_build="hg38")
#> Preparing chain file.
#> loading from cache
#> require(“rtracklayer”)
#> Performing liftover:  hg19  -->  hg38
#> Removing non-standard chromosomes.