flipPaf: Flip orientation of PAF alignments.

View source: R/flipPaf.R

flipPafR Documentation

Flip orientation of PAF alignments.

Description

This function takes loaded PAF alignments using readPaf function and flips the orientation of PAF alignments given the desired 'majority.strand' orientation (Either '+' or '-').

Usage

flipPaf(paf.table, majority.strand = NULL, force = FALSE, flip.seqnames = 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.

majority.strand

A desired majority strand directionality to be reported.

force

Set to TRUE if query PAF alignments should be flipped.

flip.seqnames

User defined query or target sequence IDs to be flipped in orientation.

Value

A tibble of PAF alignments flipped based on desired majority strand orientation.

Author(s)

David Porubsky

Examples

## Get PAF to process
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")
## Force to flip PAF alignments
flipPaf(paf.table = paf.table, force = TRUE)


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