filterPaf: Filter PAF alignments.

View source: R/filterPaf.R

filterPafR Documentation

Filter PAF alignments.

Description

This function takes loaded PAF alignments using readPaf function and perform user defined filtering of input alignments based on mapping quality, alignment length, and minimum alignments between target and query.

Usage

filterPaf(
  paf.table,
  min.mapq = 10,
  min.align.len = 1000,
  min.align.n = 1,
  is.selfaln = FALSE,
  min.selfaln.dist = 0
)

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.

min.mapq

Minimum mapping quality to retain.

min.align.len

Minimum alignment length to retain.

min.align.n

Minimum number of alignments between a pair of sequences/regions.

is.selfaln

Set to TRUE if processing alignments of a given sequence to itself.

min.selfaln.dist

Keep alignment pairs with this or larger distance from each other (Applied only to FASTA self-alignments).

Value

A tibble of filtered 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")
## Filter PAF alignments based on desired target region
filterPaf(paf.table = paf.table, min.align.len = 50000)


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