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
.
fetch_deconvo_data(
type = c("rse_gene", "sce", "sce_DLPFC_example"),
destdir = tempdir(),
eh = ExperimentHub::ExperimentHub(),
bfc = BiocFileCache::BiocFileCache()
)
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)
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.
An ExperimentHub
object
ExperimentHub-class.
A BiocFileCache
object
BiocFileCache-class. Used when
eh
is not available.
The requested object: rse_gene
that you assign to an object
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()
.
## Download the bulk RNA gene expression data
## A RangedSummarizedExperiment (41.16 MB)
if (!exists("rse-gene")) rse_gene <- fetch_deconvo_data("rse_gene")
#> 2024-10-31 13:26:55.810508 loading file /github/home/.cache/R/BiocFileCache/66143de2ada5_rse_gene.Rdata%3Frlkey%3Dsw2djr71y954yw4o3xrmjv59b%26dl%3D1
## explore bulk 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(80): SAMPLE_ID Sample ... diagnosis qc_class
## load example snRNA-seq data
## A SingleCellExperiment (4.79 MB)
if (!exists("sce_DLPFC_example")) sce_DLPFC_example <- fetch_deconvo_data("sce_DLPFC_example")
#> 2024-10-31 13:26:57.11949 loading file /github/home/.cache/R/BiocFileCache/66141272054e_sce_DLPFC_example.Rdata%3Frlkey%3Dv3z4u8ru0d2y12zgdl1az07q9%26st%3D1dcfqc1i%26dl%3D1
## explore example sce data
sce_DLPFC_example
#> class: SingleCellExperiment
#> dim: 557 10000
#> metadata(3): Samples cell_type_colors cell_type_colors_broad
#> assays(1): logcounts
#> rownames(557): GABRD PRDM16 ... AFF2 MAMLD1
#> rowData names(7): source type ... gene_type binomial_deviance
#> colnames(10000): 8_AGTGACTGTAGTTACC-1 17_GCAGCCAGTGAGTCAG-1 ...
#> 12_GGACGTCTCTGACAGT-1 1_GGTTAACTCTCTCTAA-1
#> colData names(32): Sample Barcode ... cellType_layer layer_annotation
#> reducedDimNames(0):
#> mainExpName: NULL
#> altExpNames(0):
## check the logcounts
SingleCellExperiment::logcounts(sce_DLPFC_example)[1:5, 1:5]
#> 8_AGTGACTGTAGTTACC-1 17_GCAGCCAGTGAGTCAG-1 3_CTGGACGAGCTTCATG-1
#> GABRD 0 0.9249246 0.000000
#> PRDM16 0 0.0000000 0.000000
#> MICOS10 0 0.0000000 0.000000
#> LINC01141 0 0.0000000 0.000000
#> ADGRB2 0 0.9249246 2.253612
#> 13_CCCTCAAAGTCTAGCT-1 11_TGTAAGCCATTCTGTT-1
#> GABRD 0.000000 0.0000000
#> PRDM16 0.000000 0.0000000
#> MICOS10 0.000000 0.6528615
#> LINC01141 0.000000 0.0000000
#> ADGRB2 2.253454 0.0000000
if (FALSE) { # \dontrun{
## 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")
)
} # }