plotGenome: Visualize genome-wide PAF alignments.

View source: R/plotGenome.R

plotGenomeR Documentation

Visualize genome-wide PAF alignments.

Description

This function takes genome-wide alignments of de novo assembly to the reference genome PAF format and visualize the alignments with respect to all reference chromosomes in a single plot

Usage

plotGenome(
  paf.table,
  min.deletion.size = NULL,
  min.insertion.size = NULL,
  highlight.sv = NULL,
  binsize = NULL,
  color.by = "direction",
  color.palette = NULL,
  perc.identity.breaks = c(90, 95, 99, 99.5, 99.6, 99.7, 99.8, 99.9),
  chromosomes = NULL,
  chromosome.bar.width = grid::unit(2, "mm"),
  min.query.aligned.bp = NULL,
  genomic.scale = "bp",
  target.centromeres = 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.

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.

highlight.sv

Visualize alignment embedded structural variation either as an outlined ('outline') or filled ('fill') miropeats.

binsize

A size of a bin in base pairs to split a PAF alignment into.

color.by

Color alignments either by directionality ('direction'), fraction of matched base pairs ('identity'), or a custom column name present in submitted 'paf.table'.

color.palette

A discrete color palette defined as named character vector (elements = colors, names = discrete levels) to color alignment directionality, ‘[default: color.palette <- c(’-' = 'cornflowerblue', '+' = 'forestgreen')]'.

perc.identity.breaks

Set of percentage values to categorize alignment percent identity into a set of discrete colors.

chromosomes

User defined chromosomes (target sequence IDs) to be plotted.

chromosome.bar.width

A width of chromosome/contig bars over each alignment '[Default : 2mm]'.

min.query.aligned.bp

Only contigs with this minimum number of aligned base pairs will be plotted.

genomic.scale

Report genomic coordinates in base pairs ('bp') kilobase pairs ('kbp') or megabase pairs ('Mbp') ‘[default: ’bp']'.

target.centromeres

A GRanges-class object containing positions of centromeres in target chromosomes.

Value

A ggplot2 object.

Author(s)

David Porubsky

Examples

## Get PAF to plot ##
paf.file <- system.file("extdata", "PTR_test.paf", package = "SVbyEye")
## Read in PAF
paf.table <- readPaf(paf.file = paf.file)
## Make a plot ##
## Color by alignment directionality
plotGenome(paf.table = paf.table, chromosome.bar.width = grid::unit(2, 'mm'),
           min.query.aligned.bp = 5000000)


daewoooo/SVbyEye documentation built on Sept. 19, 2024, 6:19 p.m.