library("spiDE")
data(toySpiDE)
spe <- buildNiches(toySpiDE, sigma = 30)
fit <- fitSpiDE(spe, index = "A", sigma = 30, verbose = FALSE)
head(patientIntercepts(fit, gene = "G1"))Each patient’s intercept
Description
Every index type’s shared fit has an intercept per patient and gene: the patient’s expression level of the gene in that type, at zero niche density and a reference depth: the index type’s mean log library size under depth = “loglib” or “nonlinear”, each patient’s own mean under “spatial_spline”. The intercepts absorb every difference between patients – the condition’s main effect, composition, batch – which is why the niche slopes are within-patient slopes. plotPatientEffects() shows what they capture. Kept by fitSpiDE() from spiDE 0.99.34 on, for both engines.
Usage
patientIntercepts(object, ...)
## S4 method for signature 'SpiDEFit'
patientIntercepts(object, gene = NULL, index = NULL, ...)
## S4 method for signature 'SpiDEResults'
patientIntercepts(object, ...)
Arguments
object
|
a SpiDEFit or SpiDEResults. |
…
|
unused. |
gene, index
|
optional character vectors to subset. |
Value
a data.frame: gene, index, patient, intercept (log scale), ncells (the patient’s cells of the index type), plus the patient-level colData columns recorded by fitSpiDE().