Skip to contents

Download Data with Zenodo DOI and Return SeuratObject.

Usage

ParseZenodo(
  doi = NULL,
  file.ext = c("rdata", "rds", "h5ad"),
  doi.df = NULL,
  out.folder = NULL,
  timeout = 1000,
  quiet = FALSE,
  parallel = TRUE,
  use.cores = NULL,
  return.seu = FALSE,
  merge = TRUE
)

Arguments

doi

A vector of Zenodo DOIs to download. Default: NULL.

file.ext

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

doi.df

DOI dataframe for download. This is useful when something wrong happens in downloading (e.g. MD5 verification failure, DownloadZenodo will return a dataframe contains failure terms.). Default: NULL. It is required to provide either doi or doi.df.

out.folder

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

timeout

Maximum request time. Default: 1000.

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 nrow(doi.df) (specified by doi.df or extract with doi) and parallel::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

Dataframe contains failed datasets, SeuratObject (return.seu is TRUE, rds in file.ext) or NULL (return.seu is FALSE or rds not in file.ext).

Examples

if (FALSE) {
# need users to provide the output folder
multi.dois.parse <- ParseZenodo(
  doi = c(
    "1111", "10.5281/zenodo.7243603",
    "10.5281/zenodo.7244441"
  ),
  file.ext = c("rdata", "rds"),
  out.folder = "/path/to/outfoder"
)
}