Description Usage Arguments Details Value Examples
View source: R/SlalomModel-methods.R
Slalom fits relatively complicated hierarchical Bayesian factor analysis
models with data and results stored in a "SlalomModel"
object. This
function builds a new "SlalomModel"
object from minimal inputs.
1 2 3 | newSlalomModel(object, genesets, n_hidden = 5, prune_genes = TRUE,
min_genes = 15, design = NULL, anno_fpr = 0.01, anno_fnr = 0.001,
assay_name = "logcounts", verbose = TRUE)
|
object |
|
genesets |
a |
n_hidden |
number of hidden factors to fit in the model (2-5 recommended) |
prune_genes |
logical, should genes that are not annotated to any gene
sets be filtered out? If |
min_genes |
scalar, minimum number of genes required in order to retain a gene set for analysis |
design |
numeric design matrix providing values for covariates to fit in the model (rows represent cells) |
anno_fpr |
numeric(1), false positive rate (FPR) for assigning genes to factors (pathways); default is 0.01 |
anno_fnr |
numeric(1), false negative rate (FNR) for assigning genes to factors (pathways); default is 0.001 |
assay_name |
character(1), the name of the |
verbose |
logical(1), should information about what's going be printed to screen? |
This function builds and returns the object, checking for validity, which includes checking that the input data is of consistent dimensions.
a new Rcpp_SlalomModel object
1 2 3 4 5 6 7 8 9 | gmtfile <- system.file("extdata", "reactome_subset.gmt", package = "slalom")
genesets <- GSEABase::getGmt(gmtfile)
data("mesc")
model <- newSlalomModel(mesc, genesets, n_hidden = 5, min_genes = 10)
exprsfile <- system.file("extdata", "mesc.csv", package = "slalom")
mesc_mat <- as.matrix(read.csv(exprsfile))
sce <- SingleCellExperiment::SingleCellExperiment(assays = list(logcounts = mesc_mat))
# model2 <- newSlalomModel(mesc_mat, genesets, n_hidden = 5, min_genes = 10)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.