lift_bed: Convert BED intervals between genome builds

View source: R/lift_bed.R

lift_bedR Documentation

Convert BED intervals between genome builds

Description

Use this utility to convert BED intervals between genome coordinate systems using liftOver. Only the chr/start/end fields of the input BED are used (strand is ignored). The output GRanges will have no associated seqinfo.

Usage

lift_bed(bed, chain, outfile = NULL)

Arguments

bed

Pathname of a BED file, or a GRanges (typically loaded from a BED file with rtracklayer::import.bed()).

chain

A UCSC-style chain file, or a Chain object (such as from rtracklayer::import.chain()).

outfile

If not NULL, the returned GRanges will be saved to the specified path using rtracklayer::export.chain().

Details

A warning is given if the lifted intervals are less than 95% of the size of the original intervals. When the BED input represents sequencing target intervals, most of the input intervals will usually lift successfully.

Value

GRanges representing lifted intervals from input bed.


Townsend-Lab-Yale/cancereffectsizeR documentation built on Feb. 15, 2025, 10:23 a.m.