fetch_deconvo_data: Download Human DLPFC Deconvolution Data

View source: R/fetch_deconvo_data.R

fetch_deconvo_dataR Documentation

Download Human DLPFC Deconvolution Data

Description

This function downloads the processed data for the experiment documented at https://github.com/LieberInstitute/Human_DLPFC_Deconvolution. Internally, this function downloads the data from ExperimentHub.

Usage

fetch_deconvo_data(
  type = c("rse_gene", "sce", "sce_DLPFC_example"),
  destdir = tempdir(),
  eh = ExperimentHub::ExperimentHub(),
  bfc = BiocFileCache::BiocFileCache()
)

Arguments

type

A character(1) specifying which file you want to download.

  • rse_gene: A RangedSummarizedExperiment-class with 110 bulk RNA-seq samples x 21k genes. (41 MB)

  • sce: A SingleCellExperiment object with Human DLPFC snRNA-seq data. 77k nuclei x 36k genes (172 MB)

  • sce_DLPFC_example: An example subset of sec SingleCellExperiment with 10k nuclei x 557 genes (49 MB)

destdir

The destination directory to where files will be downloaded to in case the ExperimentHub resource is not available. If you already downloaded the files, you can set this to the current path where the files were previously downloaded to avoid re-downloading them.

eh

An ExperimentHub object ExperimentHub-class.

bfc

A BiocFileCache object BiocFileCache-class. Used when eh is not available.

Details

We are currently waiting for https://doi.org/10.1101/2024.02.09.579665 to pass peer review at a journal, which could lead to changes requested by the peer reviewers on the processed data for this study. Thus, this function temporarily downloads the files from Dropbox using BiocFileCache::bfcrpath() unless the files are present already at destdir.

Note that ExperimentHub and BiocFileCache will cache the data and automatically detect if you have previously downloaded it, thus making it the preferred way to interact with the data.

This function is based on spatialLIBD::fetch_data().

Value

The requested object: rse_gene that you assign to an object

Examples

## Download the bulk RNA gene expression data
## A RangedSummarizedExperiment (41.16 MB)

if (!exists("rse-gene")) rse_gene <- fetch_deconvo_data("rse_gene")

## explore bulk data
rse_gene

## load example snRNA-seq data
## A SingleCellExperiment (4.79 MB)
if (!exists("sce_DLPFC_example")) sce_DLPFC_example <- fetch_deconvo_data("sce_DLPFC_example")

## explore example sce data
sce_DLPFC_example

## check the logcounts
SingleCellExperiment::logcounts(sce_DLPFC_example)[1:5, 1:5]

## Not run: 
## download the full sce experiment object
sce_path_zip <- fetch_deconvo_data("sce")
sce_path <- unzip(sce_path_zip, exdir = tempdir())
sce <- HDF5Array::loadHDF5SummarizedExperiment(
    file.path(tempdir(), "sce_DLPFC_annotated")
)

## End(Not run)

LieberInstitute/DeconvoBuddies documentation built on Dec. 16, 2024, 10:32 p.m.