Learn R Programming

scfetch (version 0.5.0)

ParseCELLxGENE: Download CELLxGENE Datasets.

Description

Download CELLxGENE Datasets.

Usage

ParseCELLxGENE(
  meta,
  file.ext = c("rds", "h5ad"),
  out.folder = NULL,
  timeout = 3600,
  quiet = FALSE,
  parallel = TRUE
)

Value

Dataframe contains failed datasets or NULL.

Arguments

meta

Metadata used to download, can be from ExtractCELLxGENEMeta, should contain dataset_id, rds_id/h5ad_id (depend on file.ext) and name columns.

file.ext

The valid file extension for download. When NULL, use "rds" and "h5ad". Default: c("rds", "h5ad").

out.folder

The output folder. Default: NULL (current working directory).

timeout

Maximum request time. Default: 3600.

quiet

Logical value, whether to show downloading progress. Default: FALSE (show).

parallel

Logical value, whether to download parallelly. Default: TRUE. When "libcurl" is available for download.file, the parallel is done by default (parallel can be FALSE).

References

https://gist.github.com/ivirshup/f1a1603db69de3888eacb4bdb6a9317a

Examples

Run this code
if (FALSE) {
# all available datasets
all.cellxgene.datasets <- ShowCELLxGENEDatasets()
# human 10x v2 and v3 datasets
human.10x.cellxgene.meta <- ExtractCELLxGENEMeta(
  all.samples.df = all.cellxgene.datasets,
  assay = c("10x 3' v2", "10x 3' v3"),
  organism = "Homo sapiens"
)
# download, need to provide the output folder
ParseCELLxGENE(meta = human.10x.cellxgene.meta, out.folder = "/path/to/output")
}

Run the code above in your browser using DataLab