Description Usage Arguments Details Value Examples
Given single-cell expression data fit a Bayesian non-linear factor analysis model using Ouija. This infers pseudotimes along with interpretable gene behaviour parameters (corresponding to switch times and strengths, peak times and lengths). Each gene must be specified beforehand as switch-like or transient (default to all switch-like). Priors on all parameters may also be specified.
1 2 3 4 5 6 | ouija(x, response_type = "switch", switch_strengths = NULL,
switch_times = NULL, switch_strength_sd = NULL,
switch_time_sd = NULL, peak_times = NULL, peak_lengths = NULL,
peak_time_sd = NULL, peak_length_sd = NULL, student_df = 10,
inference_type = c("hmc", "vb"), normalise_expression = TRUE,
single_cell_experiment_assay = "logcounts", ...)
|
x |
Input expression. See details below. |
response_type |
A vector declaring whether each gene exhibits "switch" or "transient" expression. Defaults to "switch" for all genes |
switch_strengths |
Prior means of switch strengths |
switch_times |
Prior means of switch times |
switch_strength_sd |
Prior standard deviations of switch strengths |
switch_time_sd |
Prior standard deviations of switch times |
peak_times |
Prior means of peak times |
peak_lengths |
Prior means of peak lengths |
peak_time_sd |
Prior standard deviations of peak times |
peak_length_sd |
Prior standard deviations of peak lengths |
student_df |
Degrees of freedom for the student's t likelihood |
inference_type |
The type of inference to be performed, either |
normalise_expression |
Logical, default TRUE. If TRUE the data is pre-normalised so the average peak expression is approximately 1. This makes the strength parameters approximately comparable between genes. |
single_cell_experiment_assay |
Character vector specifying the assay from
|
... |
Additional arguments to |
Input format
Ouija takes input in three formats:
A cell-by-gene expression matrix of non-negative values. We recommend using log2(TPM + 1) or log2(RPKM + 1) as this is what the mean-variance relationship in the model is designed for.
[Recommended] A SingleCellExperiment
(from the SingleCellExperiment) package
Controlling inference with stan
The ...
argument accepts various parameters than can be passed to rstan
to control inference using HMC sampling. Specifically these are
iter
Number of HMC iterations (default 1e4
)
warmup
Number of iterations to use as warmup (defaults to iter/2
)
chains
Number of HMC chains to run in parallel (defaults to 1, but more recommended)
thin
The thinning of the markov chain (ie every thin
iteration is kept). Defaults
so that 1000 samples are returned.
An object of type ouija_fit
which contains both the stan
fit
along with information about the setup. For more information see the vignette
(online at http://kieranrcampbell.github.io/ouija/).
1 2 3 4 5 6 | ## Not run:
data(example_gex)
response_types <- c(rep("switch", 9), rep("transient", 2))
oui <- ouija(example_gex[1:40,], response_type = response_types, iter = 100)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.