collapsePaf: Collapse PAF query and target ranges based on unique...

View source: R/helpers.R

collapsePafR Documentation

Collapse PAF query and target ranges based on unique identifier.

Description

This function takes PAF alignments stored in using tibble object and collapse them based on grouping variable defined in 'collapse.by' that have to be a valid column name present in 'paf.table'.

Usage

collapsePaf(paf.table, collapse.by = 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.

collapse.by

A user defined column name present in 'paf.table' to serve as grouping variable.

Value

A tibble of collapsed 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")
## Split PAF alignments into user defined bins
paf.table <- pafToBins(paf.table = paf.table, binsize = 1000)
## Collapse PAF alignments by bin id
collapsePaf(paf.table = paf.table, collapse.by = "bin.id")


daewoooo/SVbyEye documentation built on Oct. 15, 2024, 6:12 a.m.