MASC {SignacX} | R Documentation |
Mixed effect modeling
Description
MASC
was imported from https://github.com/immunogenomics/masc.
Performs mixed-effect modeling.
Usage
MASC(
dataset,
cluster,
contrast,
random_effects = NULL,
fixed_effects = NULL,
verbose = FALSE
)
Arguments
dataset |
data frame of covariate, cell type, clustering or disease information |
cluster |
celltypes returned by Signac or cluster identities |
contrast |
Typically disease |
random_effects |
User specified random effect variables in dataset |
fixed_effects |
User specific fixed effects in dataset |
verbose |
If TRUE, algorithm reports outputs |
Value
mixed effect model results
Examples
## Not run:
# Load metadata
file.dir = "https://kleintools.hms.harvard.edu/tools/client_datasets/"
file = "AMP_Phase1_SLE_Apr2019/FullDataset_v1/categorical_coloring_data.json"
download.file(paste0(file.dir, file, "?raw=true"), destfile = "categorical_coloring_data.json")
d = rjson::fromJSON(file='categorical_coloring_data.json')
d = data.frame(sapply(d, function(x) x$label_list))
# run MASC
x = d$CellStates # optionally use clusters or cell types
d$Disease = factor(d$Disease) # the contrast term must be encoded as a factor
Q = MASC(d, cluster = x, contrast = 'Disease', random_effects = c( "Tissue", "Plate", "Sample"))
## End(Not run)
[Package SignacX version 2.2.5 Index]