Power Lifter
power_lifter.Rd
A function to convert genomic regions from one assembly to another.
Usage
power_lifter(
these_regions = NULL,
qchrom = NULL,
qstart = NULL,
qend = NULL,
original_assembly = "hg38",
target_assembly = "grch37"
)
Arguments
- these_regions
The region(s) to be queried. Can be a data frame with regions with the following columns; chrom, start, end. Or in a string in the following format chr:start-end.
- qchrom
Query chromosome (prefixed or un-prefixed), Required if `these_regions` is not provided.
- qstart
Query start position. Required if `these_regions` is not provided.
- qend
Query end position. Required if `these_regions` is not provided.
- original_assembly
The original assembly of the regions. Default is hg38
- target_assembly
The target assembly of the regions. Default is grch37.
Details
This function is a wrapper for the [rtracklayer::liftOver] function. Specify the original assembly and the target assembly, and the function will convert the regions accordingly. Regions can be provided as a data frame with `these_regions`, or as a string with `qchrom`, `qstart`, and `qend`.
Examples
#Example 1 - Convert MYC region from hg38 to grch37
power_lifter(these_regions = "chr8:127735434-127742951")
#> chrom start end width strand
#> 1 8 128747680 128755197 7518 *
#Example 2 - Convert MYC region from grch37 to hg38
power_lifter(these_regions = "18:60790579-60987361",
original_assembly = "grch37",
target_assembly = "hg38")
#> Discarding unchained sequences: 18
#> [1] chrom start end width strand
#> <0 rows> (or 0-length row.names)
#Example 3 - Same as Example 1, but use the `qchrom`, `qstart`, and `qend`.
power_lifter(qchrom = "chr8",
qstart = 127735434,
qend = 127742951)
#> chrom start end width strand
#> 1 8 128747680 128755197 7518 *