Description Arguments Author(s) See Also Examples
Subset from the 'Kang18_8vs8()' object of the muscData
package.
Kang_subset |
contains a |
Simone Tiberi simone.tiberi@uzh.ch
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 32 33 34 35 36 37 38 39 40 41 42 43 44 | ####################
# Object 'Kang_subset' is generated as follows:
####################
# library(muscData)
# sce = Kang18_8vs8()
#
# library(scater)
# sce = computeLibraryFactors(sce)
# sce = logNormCounts(sce)
# cpm(sce) <- calculateCPM(sce)
#
# Select genes with at least 1000 non-zero cells:
# sce = sce[ rowSums(assays(sce)$counts > 0) >= 1000, ]
#
# randomly select 100 of these genes:
# set.seed(61217)
# sel = sample( rownames(sce), size = 100)
# sce = sce[ rownames(sce) %in% sel, ]
#
# select 3 individuals only:
# ind_selected = levels(factor(colData(sce)$ind))[1:3]
# sce = sce[, sce$ind %in% ind_selected]
#
# make a sample_id column:
# colData(sce)$sample_id = factor(paste(colData(sce)$stim, colData(sce)$ind, sep = "_"))
#
# create an experiment_info object containing sample-group information:
# experiment_info = unique(data.frame(sample_id = colData(sce)$sample_id,
# stim = colData(sce)$stim) )
# metadata(sce)$experiment_info = data.frame(experiment_info, row.names = NULL)
#
# remove unnecessary information to reduce storage space:
# sce$cluster = NULL;
# sce$multiplets = NULL;
# rowData(sce) = NULL;
# colnames(sce) = NULL;
# reducedDim(sce) = NULL
# sce$ind = NULL
# sce$sizeFactor = NULL
# rm assays counts
# assays(sce) = assays(sce)[2:3]
#
# Kang_subset = sce
# save(Kang_subset, file = "Kang_subset.RData")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.