Skip to contents

Extract Cell Type Composition of UCSC Cell Browser Datasets.

Usage

ExtractCBComposition(meta = NULL, link = NULL, json.folder = NULL)

Arguments

meta

Metadata used to load, can be obtained with ExtractCBDatasets. Skip when link is not NULL. Default: NULL.

Vector contains dataset/collection link(s), e.g. "https://cells.ucsc.edu/?ds=adult-ureter". Skip when meta is not NULL. Default: NULL.

json.folder

Folder contains datasets json files, same as json.folder of ShowCBDatasets. Default: NULL (access json files online).

Value

Dataframe contains sample information and cell type composition.

Examples

if (FALSE) { # \dontrun{
# lazy mode, load datasets json files locally, need users to provide json folder
ucsc.cb.samples <- ShowCBDatasets(lazy = TRUE, json.folder = NULL, update = FALSE)
# cell number is between 1000 and 2000
hbb.sample.df <- ExtractCBDatasets(
  all.samples.df = ucsc.cb.samples, organ = c("brain", "blood"),
  organism = "Human (H. sapiens)", cell.num = c(1000, 2000)
)
hbb.sample.ct <- ExtractCBComposition(json.folder = getwd(), meta = hbb.sample.df)
# for given dataset
ureter.ct <- ExtractCBComposition(link = "https://cells.ucsc.edu/?ds=adult-ureter")
} # }