Skip to contents

Download UCSC Cell Browser Datasets.

Usage

ParseCBDatasets(
  sample.df = NULL,
  all.samples.df = NULL,
  collection = NULL,
  sub.collection = NULL,
  organ = NULL,
  disease = NULL,
  organism = NULL,
  project = NULL,
  fuzzy.match = TRUE,
  cell.num = NULL,
  timeout = 1000,
  merge = TRUE
)

Arguments

sample.df

Dataframe contains used datasets. Default: NULL.

all.samples.df

Dataframe contains all samples metadata, obtained with ShowCBDatasets. Default: NULL. sample.df and all.samples.df cannot be both NULL.

collection

The collection of the datasets, corresponds to shortLabel column of all.samples.df, obtain available values with StatDBAttribute. Default: NULL (without filtering).

sub.collection

The sub-collection of the datasets, corresponds to subLabel column of all.samples.df, obtain available values with StatDBAttribute. Default: NULL (without filtering).

organ

The organ of the datasets, corresponds to body_parts column of all.samples.df, obtain available values with StatDBAttribute. Default: NULL (without filtering).

disease

The disease of the datasets, corresponds to diseases column of all.samples.df, obtain available values with StatDBAttribute. Default: NULL (without filtering).

organism

The specie of the datasets, corresponds to organisms column of all.samples.df, obtain available values with StatDBAttribute. Default: NULL (without filtering).

project

The project of the datasets, corresponds to projects column of all.samples.df, obtain available values with StatDBAttribute. Default: NULL (without filtering).

fuzzy.match

Logical value, whether to perform fuzzy match with provided attribute values. Default: TRUE.

cell.num

Cell number filter. If NULL, no filter; if one value, lower filter; if two values, low and high filter. Deault: NULL.

timeout

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

merge

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

Value

Seurat object (if merge is TRUE) or list of Seurat objects (if merge is FALSE).

Examples

# # lazy mode, load datasets json files locally
# 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(sample.df = hbb.sample.df)
# # test 10x and matrix load
# complex.df = ucsc.cb.samples[c(1, 927, 379), ] # two 10x and one matrix
# complex.seu.list = ParseCBDatasets(sample.df = test.df, merge = F)