Skip to contents

Download UCSC Cell Browser Datasets.

Usage

ParseCBDatasets(
  meta = NULL,
  link = NULL,
  timeout = 1000,
  obs.value.filter = NULL,
  obs.keys = NULL,
  include.genes = NULL,
  merge = TRUE
)

Arguments

meta

Metadata used to load, can be obtained with ExtractCBDatasets, should contain name, matrixType, matrix, barcode, feature, coords columns. 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.

timeout

Maximum request time when loading data online. Default: 1000.

obs.value.filter

Filter expression for cell's metadata, e.g., `Louvain Cluster` == 1 & sex == 'M' (use `` to wrap columns with space). Default: NULL.

obs.keys

Columns to fetch for the cell's metadata. e.g., c("cluster", "Louvain Cluster", "donor","sex"). Default: NULL.

include.genes

Genes to include. Default: NULL.

merge

Logical value, whether to merge Seurat list. Default: FALSE.

Value

SeuratObject (if merge is TRUE) or list of SeuratObjects (if merge is FALSE).

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.seu <- ParseCBDatasets(meta = hbb.sample.df)
# 10x and matrix load
complex.df <- ucsc.cb.samples[c(1, 927, 379), ] # two 10x and one matrix
complex.seu.list <- ParseCBDatasets(meta = complex.df, merge = FALSE)
# for given dataset
ureter.seu.list <- ParseCBDatasets(link = "https://cells.ucsc.edu/?ds=adult-ureter", merge = FALSE)
} # }