Skip to contents

Plot SEM scores for each nucleic acid in each position of the motif

Usage

plotSEM(
  s,
  motif = NULL,
  motifSeq = NULL,
  highlight = NULL,
  hcol = "dodgerblue"
)

Arguments

s

A SNPEffectMatrix or SNPEffectMatrixCollection object.

motif

sem id to plot. If providing a SNPEffectMatrixCollection object, must match a name in the list. If providing a single SNPEffectMatrix object, this parameter is ignored and the SNPEffectMatrix's semId is used for plotting.

motifSeq

(optional) character sequence to color on plot

highlight

(optional) index of variant location on reference

hcol

(optional) color of motifSeq basepairs

Value

a ggplot with sem scores for each nucleic acid per position

Examples

library(VariantAnnotation)

# create an SNP Effect Matrix (SEM)
sem <- matrix(rnorm(12), ncol = 4)
colnames(sem) <- c("A", "C", "G", "T")

# create a list of SNPEffectMatrix objects
s <- SNPEffectMatrix(sem, baseline = -1, semId = "sem_id")

# plot the motif
plotSEM(s, semId(s))


# color by sequence
plotSEM(s, semId(s), motifSeq = "ACT", highlight = 2)