Access semData from a SNPEffectMatrixCollection object
Source:R/AllGenerics.R
, R/methods-SNPEffectMatrixCollection.R
, R/methods-SemplScores.R
semData.Rd
Access semData from a SNPEffectMatrixCollection object
Accessor semData slot in a SemplScores object
Usage
semData(x)
# S4 method for class 'SNPEffectMatrixCollection'
semData(x)
# S4 method for class 'SemplScores'
semData(x)
Examples
## Create example SEM
df <- data.frame(A=c(1, 2, 3),
C=c(1, 2, 3),
G=c(1, 2, 3),
T=c(1, 2, 3))
sem_data <- data.frame(SEM = "motif_id", TF = "tf_id")
s <- SNPEffectMatrix(df, 1.205, "motif_id")
sc <- SNPEffectMatrixCollection(s, semData = sem_data, semKey = "SEM")
## Access count matrix
semData(sc)
#> Key: <SEM>
#> SEM TF
#> <char> <char>
#> 1: motif_id tf_id
library(VariantAnnotation)
# load default SEMs
data(sc)
# 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)
semData(s)
#> Key: <SEM>
#> SEM TF
#> <char> <char>
#> 1: motif_id tf_id