This function downloads from ExperimentHub, if ExperimentHub is not available, this function will download 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.

Based on spatialLIBD::fetch_data()

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

Arguments

type

A character(1) specifying which file you want to download. rse_gene RangedSummarizedExperiment with 110 bulk RNA-seq samples

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.

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")
#> 2024-05-02 22:22:25.147844 loading file /github/home/.cache/R/BiocFileCache/2343769e391_rse_gene.Rdata%3Frlkey%3Dsw2djr71y954yw4o3xrmjv59b%26dl%3D1

## explore data
rse_gene
#> class: RangedSummarizedExperiment 
#> dim: 21745 110 
#> metadata(1): SPEAQeasy_settings
#> assays(2): counts logcounts
#> rownames(21745): ENSG00000227232.5 ENSG00000278267.1 ...
#>   ENSG00000210195.2 ENSG00000210196.2
#> rowData names(11): Length gencodeID ... gencodeTx passExprsCut
#> colnames(110): 2107UNHS-0291_Br2720_Mid_Bulk
#>   2107UNHS-0291_Br2720_Mid_Cyto ... AN00000906_Br8667_Mid_Cyto
#>   AN00000906_Br8667_Mid_Nuc
#> colData names(78): SAMPLE_ID Sample ... diagnosis qc_class
# class: RangedSummarizedExperiment 
# dim: 21745 110 
# metadata(1): SPEAQeasy_settings
# assays(2): counts logcounts
# rownames(21745): ENSG00000227232.5 ENSG00000278267.1 ... ENSG00000210195.2 ENSG00000210196.2
# rowData names(11): Length gencodeID ... gencodeTx passExprsCut
# colnames(110): 2107UNHS-0291_Br2720_Mid_Bulk 2107UNHS-0291_Br2720_Mid_Cyto ... AN00000906_Br8667_Mid_Cyto
# AN00000906_Br8667_Mid_Nuc
# colData names(78): SAMPLE_ID Sample ... diagnosis qc_class

## load sce
if (!exists("rse-gene")) rse_gene <- fetch_deconvo_data("rse_gene")
#> 2024-05-02 22:22:26.756335 loading file /github/home/.cache/R/BiocFileCache/2343769e391_rse_gene.Rdata%3Frlkey%3Dsw2djr71y954yw4o3xrmjv59b%26dl%3D1
if (FALSE) {
sce_path_zip <- fetch_deconvo_data("sce")
sce_path <- unzip(sce_path_zip, exdir = tempdir())
sce <- HDF5Array::loadHDF5SummarizedExperiment(
    file.path(tempdir(), "sce_DLPFC_annotated")
)
}