readSubset | R Documentation |
This function samples raw/normalized/scaled data from on-disk HDF5 files for plotting. This function assumes that the cell barcodes are unique across all datasets.
readSubset(
object,
slot.use = "norm.data",
balance = NULL,
max.cells = 1000,
chunk = 1000,
datasets.use = NULL,
genes.use = NULL,
rand.seed = 1,
verbose = TRUE
)
object |
|
slot.use |
Type of data for sampling (raw.data, norm.data(default), scale.data). |
balance |
Type of sampling. NULL means that max_cells are sampled from among all cells; balance="dataset" samples up to max_cells from each dataset; balance="cluster" samples up to max_cells from each cluster. |
max.cells |
Total number of cell to sample (default 5000). |
chunk |
is the max number of cells at a time to read from disk (default 1000). |
datasets.use |
uses only the specified datasets for sampling. Default is NULL (all datasets) |
genes.use |
samples from only the specified genes. Default is NULL (all genes) |
rand.seed |
for reproducibility (default 1). |
verbose |
Print progress bar/messages (TRUE by default) |
liger
object with sample.data slot set.
ligerex <- createLiger(list(ctrl = ctrl, stim = stim))
if (length(ligerex@H) > 0) {
# Downsampling is calculated basing on factorization result
ligerex <- readSubset(ligerex, slot.use = "norm.data", max.cells = 100)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.