Description Usage Arguments Value Examples
This function simulate group data through R package Splatter
1 | simgroups(m, n, k)
|
m |
m is the gene number |
n |
n is the cell number |
k |
k is the group/cluster number |
Returned value 'sim.group' is an S4 structure, and it contains single cell data with group/cluster information of each cell.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | ##---- Should be DIRECTLY executable !! ----
##-- ==> Define data, use random,
##-- or do help(data=index) for the standard data sets.
## The function is currently defined as
function (m, n, k)
{
params <- newSplatParams()
params <- setParams(params, nGenes = m)
params <- setParams(params, batchCells = n)
rk <- 1/k
params <- setParams(params, group.prob = c(rep(rk, k - 1),
1 - (k - 1) * rk))
sim.groups <- splatSimulate(params, method = "group", verbose = FALSE)
sim.groups <- normalize(sim.groups)
return(sim.groups)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.