Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

readSubset

Sample data for plotting


Description

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.

Usage

readSubset(
  object,
  slot.use = "norm.data",
  balance = NULL,
  max.cells = 1000,
  chunk = 1000,
  datasets.use = NULL,
  genes.use = NULL,
  rand.seed = 1,
  verbose = TRUE
)

Arguments

object

liger object. Should call normalize and selectGenes before calling.

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)

Value

liger object with sample.data slot set.

Examples

## Not run: 
# Only for online liger object (based on HDF5 files)
# Example: sample a total amount of 5000 cells from norm.data for downstream analysis 
ligerex <- readSubset(ligerex, slot.use = "norm.data", max.cells = 5000)

## End(Not run)

rliger

Linked Inference of Genomic Experimental Relationships

v1.0.0
GPL-3
Authors
Joshua Welch [aut, ctb], Chao Gao [aut, ctb, cre], Jialin Liu [aut, ctb], Joshua Sodicoff [aut, ctb], Velina Kozareva [aut, ctb], Evan Macosko [aut, ctb], Paul Hoffman [ctb], Ilya Korsunsky [ctb], Robert Lee [ctb]
Initial release
2021-04-18

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.