Skip to content

Commit

Permalink
Improve doccumentation for fetch_deconvo_data
Browse files Browse the repository at this point in the history
  • Loading branch information
lahuuki committed Apr 19, 2024
1 parent f62c7ab commit 046f0bd
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 5 deletions.
27 changes: 25 additions & 2 deletions R/fetch_deconvo_data.R
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@


#' Download Human DLPFC Deconvolution Data
#'
#' 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.
#'
#' @param type A `character(1)` specifying which file you want to download.
#' `rse_gene` {RangedSummarizedExperiment} with 110 bulk RNA-seq samples
Expand All @@ -14,15 +22,30 @@
#' [BiocFileCache-class][BiocFileCache::BiocFileCache-class]. Used when
#' `eh` is not available.
#'
#' @return The requested object
#' @return The requested object: `rse_gene` that you assign to an object
#' @export
#' @import ExperimentHub
#' @import BiocFileCache
#' @importFrom AnnotationHub query
#' @importFrom methods is
#'
#' @examples
#' rse_gene <- fetch_deconvo_data("rse_gene")
#' ## 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
#'
fetch_deconvo_data <- function(type = c("rse_gene"),
destdir = tempdir(),
Expand Down
27 changes: 24 additions & 3 deletions man/fetch_deconvo_data.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 046f0bd

Please sign in to comment.