subsetPafAlignments: Subset PAF alignments at desired genomic range.

View source: R/subsetPafAlignments.R

subsetPafAlignmentsR Documentation

Subset PAF alignments at desired genomic range.

Description

This function takes loaded PAF alignments using readPaf function and then subsets as well as cuts PAF alignments at desired target coordinates. This function can only be applied to PAF alignments containing a single query and target sequence.

Usage

subsetPafAlignments(paf.table, target.region = NULL)

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.

target.region

A user defined target region either as character string ('chr:start-end') or as a GRanges-class object containing a single genomic region to which PAF alignments will be narrowed down.

Value

A tibble of subsetted PAF alignments.

Author(s)

David Porubsky

Examples

## Get PAF to plot
paf.file <- system.file("extdata", "test1.paf", package = "SVbyEye")
## Read in PAF
paf.table <- readPaf(paf.file = paf.file, include.paf.tags = TRUE, restrict.paf.tags = "cg")
## Subset PAF alignments based on desired target region
subsetPafAlignments(paf.table = paf.table, target.region = "target.region:19050000-19200000")


daewoooo/SVbyEye documentation built on March 31, 2024, 8:58 a.m.