subsetPaf: Subset PAF alignments at desired genomic range.

View source: R/subsetPafAlignments.R

subsetPafR 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.

Usage

subsetPaf(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", "test_ava.paf", package = "SVbyEye")
## Read in PAF
paf.table <- readPaf(paf.file = paf.file, include.paf.tags = TRUE, restrict.paf.tags = "cg")
## Subset multiple PAF alignments based on desired target region
target.region <- 'HG01358_2:100000-200000'
subsetPaf(paf.table, target.region = target.region)


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