Learn R Programming

HTSCluster (version 2.0.11)

PoisMixSim: Simulate data from a Poisson mixture model

Description

This function simulates data from a Poisson mixture model, as described by Rau et al. (2011). Data are simulated with varying expression level (\(w_i\)) for 4 clusters. Clusters may be simulated with “high” or “low” separation, and three different options are available for the library size setting: “equal”, “A”, and “B”, as described by Rau et al. (2011).

Usage

PoisMixSim(n = 2000, libsize, separation)

Value

y

(n x q) matrix of simulated counts for n observations and q variables

labels

Vector of length n defining the true cluster labels of the simulated data

pi

Vector of length 4 (the number of clusters) containing the true value of \(\boldsymbol{\pi}\)

lambda

(d x 4) matrix of \(\boldsymbol{\lambda}\) values for d conditions (3 in the case of libsize =equal” or “A”, and 2 otherwise) in 4 clusters (see note below)

w

Row sums of y (estimate of \(\hat{w}\))

conditions

Vector of length q defining the condition (treatment group) for each variable (column) in y

Arguments

n

Number of observations

libsize

The type of library size difference to be simulated (“equal”, “A”, or “B”, as described by Rau et al. (2011))

separation

Cluster separation (“high” or “low”, as described by Rau et al. (2011))

Author

Andrea Rau

References

Rau, A., Celeux, G., Martin-Magniette, M.-L., Maugis-Rabusseau, C. (2011). Clustering high-throughput sequencing data with Poisson mixture models. Inria Research Report 7786. Available at https://inria.hal.science/inria-00638082.

Examples

Run this code

set.seed(12345)

## Simulate data as shown in Rau et al. (2011)
## Library size setting "A", high cluster separation
## n = 200 observations

simulate <- PoisMixSim(n = 200, libsize = "A", separation = "high")
y <- simulate$y
conds <- simulate$conditions

Run the code above in your browser using DataLab