breakPafAlignment: Function to break PAF alignment into matching bases between...

View source: R/breakPafAlignment.R

breakPafAlignmentR Documentation

Function to break PAF alignment into matching bases between query and target sequence. In addition, locations of inserted bases in query and target sequence can be reported as well.

Description

Function to break PAF alignment into matching bases between query and target sequence. In addition, locations of inserted bases in query and target sequence can be reported as well.

Usage

breakPafAlignment(
  paf.aln = NULL,
  min.deletion.size = 50,
  min.insertion.size = 50,
  collapse.mismatches = TRUE,
  report.sv = TRUE
)

Arguments

paf.aln

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

min.deletion.size

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

min.insertion.size

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

collapse.mismatches

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

report.sv

Set to TRUE if to report also ranges of deleted and inserted bases.

Value

A list of tibble objects storing matched ('M') alignments as well as structurally variable ('SV') bases if 'report.sv' is TRUE.

Author(s)

David Porubsky

Examples

## Get PAF to break
paf.file <- system.file("extdata", "test2.paf", package = "SVbyEye")
## Read in PAF alignment
paf.aln <- readPaf(paf.file = paf.file)
## Break PAF alignment at indels of 1 kbp and longer
breakPafAlignment(paf.aln = paf.aln, min.deletion.size = 1000, min.insertion.size = 1000)


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