View source: R/addSelfAlignments.R
addSelfAlignments | R Documentation |
This function takes a ggplot2
object generated using plotMiro
function and adds PAF self-alignments
stored in the 'paf.table' to the plot.
addSelfAlignments(
ggplot.obj = NULL,
paf.table = NULL,
color.by = "direction",
color.palette = NULL,
coordinate.space = "target",
annotation.level = 0.05,
annotation.label = NULL
)
ggplot.obj |
A |
paf.table |
A |
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). |
coordinate.space |
A coordinate space ranges in 'annot.gr' are reported, either 'target', 'query' or 'self'. |
annotation.level |
A |
annotation.label |
A |
A ggplot2
object.
David Porubsky
## 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")
## Make a plot
plt <- plotMiro(paf.table = paf.table)
## Create custom PAF alignments
paf.annot <- tibble::tibble(
q.name = "target.region",
q.len = 0,
q.start = c(19000000, 19200000),
q.end = c(19100000, 19220000),
strand = c("+", "-"),
t.name = "target.region",
t.len = 0,
t.start = c(19200000, 19300000),
t.end = c(19250000, 19330000),
n.match = 0,
aln.len = 0,
mapq = 0
)
## Add self-alignments to the plot
addSelfAlignments(ggplot.obj = plt, paf.table = paf.annot, coordinate.space = "target")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.