View source: R/fetch_deconvo_data.R
fetch_deconvo_data | R Documentation |
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", "sce_example"),
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 requested object: rse_gene
that you assign to an object
## Download the bulk RNA gene expression data
## A RangedSummarizedExperiment (41.16 MB)
if (!exists("rse-gene")) rse_gene <- fetch_deconvo_data("rse_gene")
## 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
## load example snRNA-seq data
## Not run: ## TODO fix
## A SingleCellExperiment (41.16 MB)
if (!exists("sce_example")) sce_example2 <- fetch_deconvo_data("sce_example")
sce_example
# class: SingleCellExperiment
# dim: 557 5000
# metadata(3): Samples cell_type_colors cell_type_colors_broad
# assays(2): counts logcounts
# rownames(557): GABRD PRDM16 ... AFF2 MAMLD1
# rowData names(7): source type ... gene_type binomial_deviance
# colnames(5000): 17_TTCCAATTCAACGTGT-1 6_CATCGTCGTCGCCACA-1 ... 9_GGATGTTTCTAAACGC-1 3_GAGCTGCAGTAAACAC-1
# colData names(32): Sample Barcode ... cellType_layer layer_annotation
# reducedDimNames(0):
# mainExpName: NULL
# altExpNames(0):
## End(Not run)
## Not run:
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.