-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsim.sce.Rd
31 lines (30 loc) · 1005 Bytes
/
sim.sce.Rd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/data.R
\docType{data}
\name{sim.sce}
\alias{sim.sce}
\title{A simulated scRNA-seq dataset}
\format{
This dataset contains 2k genes and 10k cells in a \code{SingleCellExperiment} object.
}
\usage{
data("sim.sce")
}
\description{
The counts are sampled from negative binomial distribution.
}
\details{
The code for generating it:
\if{html}{\out{<div class="sourceCode r">}}\preformatted{set.seed(123)
nGenes <- 2000
nCells <- 10000
rawCounts <- matrix(rnbinom(nGenes * nCells, mu=1, size=10),nGenes,nCells)
rownames(rawCounts) <- paste0("Gene", 1:nGenes)
colnames(rawCounts) <- paste0("Cell", 1:nCells)
celltypes <- paste0("celltype", sample.int(5, nCells, replace = T))
subjects <- paste0("subject", sample.int(10, nCells, replace = T))
cellAnnot <- data.frame(celltype=celltypes, subject=subjects)
sim.sce <- SingleCellExperiment(assays=list(counts=rawCounts), colData=cellAnnot)
}\if{html}{\out{</div>}}
}
\keyword{datasets}