Skip to contents

Plot non-alt versus alt binding propensity for a single motif

Usage

plotSemVariants(
  semplObj,
  semId,
  label = "varId",
  changedCols = c("#F8766D", "dodgerblue2")
)

Arguments

semplObj

a SemplScores object with scores populated

semId

a single character vector matching a semId in the semplObj

label

column in scores slot of semplObj to use for point labels

changedCols

vector of length 2 with colors to use for plotting gained and lost motifs respectively

Value

a ggplot scatter plot of non-alt binding propensity versus alt binding propensity

Examples

library(VariantAnnotation)
data(sc)

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

# create a VRanges object
vr <- VRanges(seqnames = "chr12",
              ranges = 94136009, 
              ref = "G", alt = "C")

# calculate binding propensity
s <- scoreVariants(vr, sc, BSgenome.Hsapiens.UCSC.hg19::Hsapiens)

plotSemVariants(s, "IKZF1_HUMAN.GM12878")