fetch_data | R Documentation |
This function downloads from ExperimentHub
Visium, Visium Spatial
Proteogenomics (Visium-SPG), or single nucleus RNA-seq (snRNA-seq) data
and results analyzed by LIBD from multiple projects.
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.
fetch_data(
type = c("sce", "sce_layer", "modeling_results", "sce_example", "spe",
"spatialDLPFC_Visium", "spatialDLPFC_Visium_example_subset",
"spatialDLPFC_Visium_pseudobulk", "spatialDLPFC_Visium_modeling_results",
"spatialDLPFC_Visium_SPG", "spatialDLPFC_snRNAseq",
"Visium_SPG_AD_Visium_wholegenome_spe", "Visium_SPG_AD_Visium_targeted_spe",
"Visium_SPG_AD_Visium_wholegenome_pseudobulk_spe",
"Visium_SPG_AD_Visium_wholegenome_modeling_results", "visiumStitched_brain_spe",
"visiumStitched_brain_spaceranger", "visiumStitched_brain_Fiji_out"),
destdir = tempdir(),
eh = ExperimentHub::ExperimentHub(),
bfc = BiocFileCache::BiocFileCache()
)
type |
A |
destdir |
The destination directory to where files will be downloaded
to in case the |
eh |
An |
bfc |
A |
The data was initially prepared by scripts at https://github.com/LieberInstitute/HumanPilot and further refined by https://github.com/LieberInstitute/spatialLIBD/blob/master/inst/scripts/make-data_spatialLIBD.R.
The requested object: sce
, sce_layer
, ve
or modeling_results
that
you have to assign to an object. If you didn't you can still avoid
re-loading the object by using .Last.value
.
## Download the SingleCellExperiment object
## at the layer-level
if (!exists("sce_layer")) sce_layer <- fetch_data("sce_layer")
## Explore the data
sce_layer
## How to download and load "spatialDLPFC_snRNAseq"
## Not run:
sce_path_zip <- fetch_data("spatialDLPFC_snRNAseq")
sce_path <- unzip(sce_path_zip, exdir = tempdir())
sce <- HDF5Array::loadHDF5SummarizedExperiment(
file.path(tempdir(), "sce_DLPFC_annotated")
)
sce
#> class: SingleCellExperiment
#> dim: 36601 77604
#> metadata(3): Samples cell_type_colors cell_type_colors_broad
#> assays(2): counts logcounts
#> rownames(36601): MIR1302-2HG FAM138A ... AC007325.4 AC007325.2
#> rowData names(7): source type ... gene_type binomial_deviance
#> colnames(77604): 1_AAACCCAAGTTCTCTT-1 1_AAACCCACAAGGTCTT-1 ... 19_TTTGTTGTCTCATTGT-1 19_TTTGTTGTCTTAAGGC-1
#> colData names(32): Sample Barcode ... cellType_layer layer_annotation
#> reducedDimNames(4): GLMPCA_approx TSNE UMAP HARMONY
#> mainExpName: NULL
#> altExpNames(0):
lobstr::obj_size(sce)
#> 172.28 MB
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.