Description Usage Arguments Value Author(s) Examples
...
1 2 3 4 5 6 7 |
x |
a |
kid, sid, gid |
character strings specifying
the |
drop |
logical. Specifies whether |
a SingleCellExperiment
.
Helena L Crowell
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | # generate random counts
ng <- 50
nc <- 200
counts <- matrix(sample(ng * nc), nrow = ng, ncol = nc)
# generate some cell metadata
gids <- sample(c("groupA", "groupB"), nc, TRUE)
sids <- sample(paste0("sample", seq_len(3)), nc, TRUE)
kids <- sample(paste0("cluster", seq_len(5)), nc, TRUE)
batch <- sample(seq_len(3), nc, TRUE)
# construct SCE
library(SingleCellExperiment)
sce <- SingleCellExperiment(
assays = list(counts = counts),
colData = data.frame(group = gids, id = sids, cluster = kids, batch))
# prep. for workflow
sce <- prepSCE(sce, kid = "cluster", sid = "id", gid = "group")
head(colData(sce))
metadata(sce)$experiment_info
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.