simpledotplot: Plot simple dotplot of two sequences.

View source: R/plotDotp.R

simpledotplotR Documentation

Plot simple dotplot of two sequences.

Description

This function takes alignment coordinates from 'nucmer' or 'minimap2' aligner and construct a simple dot plot.

Usage

simpledotplot(
  coords.file = NULL,
  format = "nucmer",
  shape = "segment",
  min.align.len = 1000,
  keep.longest.aln = FALSE,
  highlight.pos = NULL,
  highlight.region = NULL,
  genome.coord = FALSE
)

Arguments

coords.file

A path to a PAF or NUCMER specific file containing alignments to be loaded.

format

Is either 'mm2' or 'nucmer' for minimap2 or NUCmer specific input 'coords.file', respectively.

shape

A shape used to plot aligned sequences: Either 'segment' or 'point'.

min.align.len

Minimum alignment length to retain.

keep.longest.aln

Set to TRUE if a target sequence with a single longest alignment should be kept.

highlight.pos

A single or a set of positions to be highlighted as vertical solid lines.

highlight.region

A pair of positions to be highlighted as vertical range.

genome.coord

Set to TRUE if the target sequence should be reported in genomic coordinates.

Value

A ggplot object.

Author(s)

David Porubsky

Examples

## Get NUCmer alignment coordinates to plot
nucmer.coords <- system.file("extdata", "HG00438_1_nucmer.coords", package = "SVbyEye")
## Make a dotplot
simpledotplot(coords.file = nucmer.coords, format = "nucmer")
## Get minimap2 alignments to plot
mm2.coords <- system.file("extdata", "HG01071_2_mm2.paf", package = "SVbyEye")
## Make a dotplot
simpledotplot(coords.file = mm2.coords, format = "mm2")
## Highlight desired genomic positions
highlight.pos <- c(330000, 560000)
simpledotplot(coords.file = mm2.coords, format = "mm2", highlight.pos = highlight.pos)


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