Download Human Cell Atlas Datasets.
Usage
ParseHCA(
meta,
file.ext = c("rds", "rdata", "h5", "h5ad", "loom", "tsv"),
out.folder = NULL,
timeout = 3600,
quiet = FALSE,
parallel = TRUE,
use.cores = NULL,
return.seu = FALSE,
merge = TRUE
)
Arguments
- meta
Metadata used to download, can be from
ExtractHCAMeta
, should contain entryId and name catalog.- file.ext
The valid file extension for download. When NULL, use "rds", "rdata", "h5", "h5ad", "loom", "tsv". Default: c("rds", "rdata", "h5", "h5ad", "loom", "tsv").
- 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).- use.cores
The number of cores used. Default: NULL (the minimum value of extracted
length(download.urls)
andparallel::detectCores()
).- return.seu
Logical value, whether to load downloaded datasets to Seurat. Valid when rds in
file.ext
and all datasets download successfully. Default: FALSE.- merge
Logical value, whether to merge Seurat list when there are multiple rds files, used when
return.seu
is TRUE. Default: FALSE.
Value
SeuratObject (return.seu
is TRUE, rds in file.ext
) or
list contains files' metadata of downloaded successfully (down.meta) and failed (fail.meta).
Examples
if (FALSE) {
# all available projects
all.hca.projects <- ShowHCAProjects()
# all human and 10x 3' v2
all.human.10x.projects <- ExtractHCAMeta(
all.projects.df = all.hca.projects,
organism = "Homo sapiens",
protocol = c("10x 3' v2", "10x 3' v3")
)
# download, need users to provide the output folder
ParseHCA(meta = all.human.10x.projects, out.folder = "/path/to/output")
}