liftRangesToAlignment: Function to lift coordinates to the alignment in PAF format.

View source: R/liftRangesToAlignment.R

liftRangesToAlignmentR Documentation

Function to lift coordinates to the alignment in PAF format.

Description

Function to lift coordinates to the alignment in PAF format.

Usage

liftRangesToAlignment(
  paf.table,
  gr = NULL,
  direction = "query2target",
  report.cigar.str = FALSE
)

Arguments

paf.table

A data.frame or tibble containing a single or multiple PAF record(s) with 12 mandatory columns along with CIGAR string defined in 'cg' column.

gr

A GRanges-class object containing single or multiple ranges in query or target sequence coordinates.

direction

One of the possible, lift ranges from query to target 'query2target' or vice versa 'target2query'.

report.cigar.str

Set to 'TRUE' if CIGAR string should be reported as well (Slow if >1000 regions).

Value

A GRanges-class object with resized original set of ranges.

Author(s)

David Porubsky

Examples

## Define range(s) to lift
roi.gr <- as("chr17:46645907-46697277", "GRanges")
## Get PAF alignment to lift to
paf.file <- system.file("extdata", "test_lift1.paf", package = "SVbyEye")
## Read in PAF
paf.table <- readPaf(paf.file = paf.file, include.paf.tags = TRUE, restrict.paf.tags = "cg")
## Lift target range to query coordinates
liftRangesToAlignment(paf.table = paf.table, gr = roi.gr, direction = "target2query")


daewoooo/SVbyEye documentation built on July 12, 2024, 3:05 p.m.