pois_mash_sim_data: Simulate Data Based on a Real Single-cell Dataset

pois_mash_sim_dataR Documentation

Simulate Data Based on a Real Single-cell Dataset

Description

Simulate Data Based on a Real Single-cell Dataset

Usage

pois_mash_sim_data(J = 1000, R = 5, effects, seed = 1)

Arguments

J

Number of features to simulate (should be 2 or greater).

R

Number of conditions to simulate (should be 2 or greater).

effects

List consisting of the following components: “umat”, an R x K matrix with each of the K columns specifying a pattern of non-null effects; “prob”, a non-negative vector of length K specifying the relative frequency of each non-null effect among all J features.

seed

Random seed (for reproducing the output).

Value

A list containing the following components:

Y

J x N sparse matrix of counts with features (e.g., genes) as rows and observations (e.g., cells) as columns.

condition

Factor of length N with R levels giving the condition for each observation.

Examples

umat <- cbind(c(1,1,0,0,0),c(0,0,0,1,0.5))
pois_mash_sim_data(1000,5,effects = list(umat = umat,prob = rep(0.05,2)))


stephenslab/poisson.mash.alpha documentation built on Dec. 11, 2023, 3:50 a.m.