cigar2ranges: Function to load CIGAR string reported in PAF alignments into...

View source: R/cigarUtils.R

cigar2rangesR Documentation

Function to load CIGAR string reported in PAF alignments into a set of genomic ranges.

Description

Function to load CIGAR string reported in PAF alignments into a set of genomic ranges.

Usage

cigar2ranges(
  paf.table = NULL,
  coordinate.space = "reference",
  min.insertion.size = 50,
  min.deletion.size = 50,
  collapse.mismatches = TRUE
)

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.

coordinate.space

A used defined coordinate space given CIGAR should be parsed against, either 'reference' or 'query'.

min.insertion.size

A minimum size (in base pairs) of an insertion to be retained.

min.deletion.size

A minimum size (in base pairs) of a deletion to be retained.

collapse.mismatches

Set to TRUE if mismatches should be collapsed in order expand matched regions.

Value

A GRanges object.

Author(s)

David Porubsky

Examples

## Get PAF to process
paf.file <- system.file("extdata", "test3.paf", package = "SVbyEye")
## Parse CIGAR into a set of genomic ranges
paf.table <- readPaf(paf.file = paf.file)
cigar2ranges(paf.table = paf.table)


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