Extract Cell Type Composition of UCSC Cell Browser Datasets.
Source:R/UCSCCellBrowser.R
ExtractCBComposition.RdExtract Cell Type Composition of UCSC Cell Browser Datasets.
Usage
ExtractCBComposition(
json.folder = NULL,
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
)Arguments
- json.folder
Folder contains datasets json files, same as
json.folderofShowCBDatasets. Default: NULL (current working directory).- sample.df
Dataframe contains used datasets. Default: NULL.
- all.samples.df
Dataframe contains all samples metadata, obtained with
ShowCBDatasets. Default: NULL.sample.dfandall.samples.dfcannot be both NULL.- collection
The collection of the datasets, corresponds to
shortLabelcolumn ofall.samples.df, obtain available values withStatDBAttribute. Default: NULL (without filtering).- sub.collection
The sub-collection of the datasets, corresponds to
subLabelcolumn ofall.samples.df, obtain available values withStatDBAttribute. Default: NULL (without filtering).- organ
The organ of the datasets, corresponds to
body_partscolumn ofall.samples.df, obtain available values withStatDBAttribute. Default: NULL (without filtering).- disease
The disease of the datasets, corresponds to
diseasescolumn ofall.samples.df, obtain available values withStatDBAttribute. Default: NULL (without filtering).- organism
The specie of the datasets, corresponds to
organismscolumn ofall.samples.df, obtain available values withStatDBAttribute. Default: NULL (without filtering).- project
The project of the datasets, corresponds to
projectscolumn ofall.samples.df, obtain available values withStatDBAttribute. 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.
Examples
if (FALSE) {
# 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 = NULL, sample.df = hbb.sample.df)
}