Constructs a SNPEffectMatrix class object.
Arguments
- sem
A
data.table
object of format base position (rows) by nucleic acid (columns). Column names must inclue A, C, T, and G; other columns will be ignored.- baseline
A
numeric
scrambled baseline, representing the binding score of randomly scrambled kmers of the same length.- semId
A
character
unique identifier for the SEM.
Examples
# build a matrix for a motif of length 4
m <- matrix(rnorm(16), nrow = 4)
colnames(m) <- c("A", "C", "G", "T")
# build a SNPEffectMatrix object
SNPEffectMatrix(m, baseline = 1, semId = "sem_id")
#> An object of class SNPEffectMatrix
#> semId: sem_id
#> baseline: 1
#> sem:
#> A C G T
#> <num> <num> <num> <num>
#> 1: -1.400043517 0.6215527 -0.2441996 2.0650249
#> 2: 0.255317055 1.1484116 -0.2827054 -1.6309894
#> 3: -2.437263611 -1.8218177 -0.5536994 0.5124269
#> 4: -0.005571287 -0.2473253 0.6289820 -1.8630115