diff --git a/DESCRIPTION b/DESCRIPTION index ac5820b..acdbb68 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: SpatialData.data Title: SpatialData datasets Depends: R (>= 4.4), SpatialData -Version: 0.99.1 +Version: 0.99.2 Description: Makes 'scverse' data examples available through the NSF OSN, and accessible from within R, using 'BiocFileCache'. Furthermore, provides an interface to Python's 'spatialdata-io' for reading and diff --git a/NAMESPACE b/NAMESPACE index ad4ebfb..482e75c 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -2,6 +2,7 @@ export(Breast2fov_10x) export(ColorectalCarcinomaMIBITOF) +export(HumanLungMulti_10x) export(JanesickBreastVisiumEnh) export(JanesickBreastXeniumRep1) export(JanesickBreastXeniumRep2) diff --git a/R/demodata_code.R b/R/demodata_code.R deleted file mode 100644 index 4081cf7..0000000 --- a/R/demodata_code.R +++ /dev/null @@ -1,223 +0,0 @@ -#' a data.frame with information about available resources -#' @docType data -#' @examples -#' utils::data(demo_spatialdata) -#' if (requireNamespace("DT")) { -#' DT::datatable(demo_spatialdata) -#' } -#' @note This information was scraped from -#' [scverse spatialdata](https://spatialdata.scverse.org/en/latest/tutorials/notebooks/datasets/README.html) download site on 5 Dec 2024. -#' The bracketed numbers under "Sample" refer to footnotes provided at that site. -#' The individual functions in this package give similarly detailed references. -"demo_spatialdata" - -#' this function consolidates the retrieval and caching and -#' transformation of scverse-curated Zarr archives and 10x-curated -#' Xenium archives -#' @param patt character(1) sufficient to identify a resource in OSN -#' @param cache like BiocFileCache -#' @param target character(1), defaults to tempfile(). Use a -#' different value if you wish to retain the unzipped Zarr -#' store persistently. -#' @examples -#' (br2fov <- get_demo_SD("Breast_2fov")) -#' @export -get_demo_SD <- function(patt, - cache=BiocFileCache::BiocFileCache(), - target=tempfile()) { - - # Bioconductor's OSN bucket - buckprefix = "https://mghp.osn.xsede.org/bir190004-bucket01" - - # work on zipped Zarr archives from scverse SpatialData datasets page - sdfold <- "BiocSpatialData" - - sdzips <- c( - "mcmicro_io.zip", "merfish.zarr.zip", - "mibitof.zip", "steinbock_io.zip", - "visium_associated_xenium_io_aligned.zip", "visium_hd_3.0.0_io.zip", - "xenium_rep1_io_aligned.zip", "xenium_rep2_io_aligned.zip") - - sdurls <- paste(buckprefix, sdfold, sdzips, sep="/") - - # work on zipped Xenium minimal outputs, retrieved and zipped in OSN - # these must be expanded and processed with use_sdio - xdfold <- "BiocXenDemo" - xdzips <- c( - "Xenium_V1_human_Breast_2fov_outs.zip", - "Xenium_V1_human_Lung_2fov_outs.zip") - - # collect names of all zip files - allz <- c(sdzips, xdzips) - # build a tibble with all relevant information - xdurls <- paste(buckprefix, xdfold, xdzips, sep="/") - allurls <- c(sdurls, xdurls) - - ca <- BiocFileCache::BiocFileCache() - chk <- lapply(allurls, \(x) BiocFileCache::bfcquery(ca, x)) - chkdf <- do.call(rbind, chk) - ind <- grep(patt, chkdf$rname) - nupatt <- "pattern does not uniquely identify a resource, please be more specific" - if (length(ind) > 1) stop(nupatt) - if (length(ind) == 0) { - chkxen <- grep(patt, xdzips) - if (length(chkxen) > 1) stop(nupatt) - if (length(chkxen) == 0) { # add a zipped zarr - zipind = grep(patt, sdzips) # already ruled out xenium group, must be from spatialdata archive - if (length(zipind) == 0) stop("patt not matched in available resources") - zipname <- sdzips[zipind] - message(sprintf("caching %s", zipname)) - fpath <- sdurls[zipind] - loc <- BiocFileCache::bfcadd(cache, rname=zipname, fpath=fpath, rtype="web") - td <- target - dir.create(td) - unzip(loc, exdir=td) - return(SpatialData::readSpatialData(dir(td, full.names=TRUE))) - } # end zipped zarr, now retrieve Xenium, run use_sdio, then read - zipname <- xdzips[chkxen] - message(sprintf("caching %s", zipname)) - fpath <- xdurls[chkxen] - preloc <- BiocFileCache::bfcadd(cache, rname=zipname, fpath=fpath, rtype="web") - td <- tempfile() # can't use target' - dir.create(td) - unzip(preloc, exdir=td) # manufacturer output - if (dir.exists(target)) print("target exists") - use_sdio("xenium", srcdir=td, dest=target) # zarr in target - return(SpatialData::readSpatialData(target)) - } - # so a single pattern has hit, and it is in cache - if (chkdf[ind,]$rname %in% xdzips) { # it is a Xenium 10x output resource - preloc <- chkdf[ind,]$rpath - td <- tempfile() # can't use target - dir.create(td) - unzip(preloc, exdir=td) # manufacturer output - use_sdio("xenium", srcdir=td, dest=target) # zarr in target - return(SpatialData::readSpatialData(target)) - } - loc <- chkdf[ind,]$rpath - td <- target - dir.create(td) - unzip(loc, exdir=td) - SpatialData::readSpatialData(dir(td, full.names=TRUE)) -} - -#' Retrieve 10x-published mouse intestine sample, Visium HD 3.0.0 -#' @param target character(1) defaults to tempfile(). -#' Set to a different folder for persistent Zarr store. -#' @note From -#' `https://www.10xgenomics.com/datasets/visium-hd-cytassist-gene-expression-libraries-of-mouse-intestine` -#' It takes at least a minute for this function to return, -#' as there is considerable decompression and reassembly -#' once the basic resource has been retrieved from cache. -#' @export -MouseIntestineVisHD <- function(target=tempfile()) { - get_demo_SD("visium_hd_3.0.0", target=target) -} - -#' Retrieve small cell lung adenocarcinoma sample assayed with mcmicro -#' @param target character(1) defaults to tempfile(). -#' Set to a different folder for persistent Zarr store. -#' @note From scverse spatialdata archive citing `https://www.nature.com/articles/s41592-021-01308-y`. -#' @examples -#' LungAdenocarcinomaMCMICRO() -#' @export -LungAdenocarcinomaMCMICRO <- function(target=tempfile()) { - get_demo_SD("mcmicro_io", target=target) -} - -#' Retrieve small cell lung adenocarcinoma sample assayed with mcmicro -#' @param target character(1) defaults to tempfile(). -#' Set to a different folder for persistent Zarr store. -#' @note From scverse spatialdata archive citing `Moffitt, J. R. et al. Molecular, spatial, and functional single-cell profiling of the hypothalamic preoptic region. Science 362, (2018).` -#' @examples -#' (sd <- MouseBrainMERFISH()) -#' @export -MouseBrainMERFISH = function(target=tempfile()) { - get_demo_SD("merfish", target=target) -} - -#' Retrieve spatial mass cytometry experiments for four cancers -#' @param target character(1) defaults to tempfile(). -#' Set to a different folder for persistent Zarr store. -#' @note From spatialdata archive -#' citing `https://www.nature.com/articles/s41596-023-00881-0`. -#' See also `https://bodenmillergroup.github.io/steinbock/latest/`. -#' @examples -#' MulticancerSteinbock() -#' @export -MulticancerSteinbock <- function(target=tempfile()) { - get_demo_SD("steinbock_io", target=target) -} - -#' Retrieve colorectal carcinoma MIBI-TOF experiment. -#' @param target character(1) defaults to tempfile(). -#' Set to a different folder for persistent Zarr store. -#' @note From spatialdata archive citing `Hartmann, F. J. et al. Single-cell metabolic profiling of human cytotoxic T cells. Nat. Biotechnol. (2020) doi:10.1038/s41587-020-0651-8.` -#' @examples -#' ColorectalCarcinomaMIBITOF() -#' @export -ColorectalCarcinomaMIBITOF <- function(target=tempfile()) { - get_demo_SD("mibitof", target=target) -} - - -#' Retrieve a version of Janesick FFPE breast cancer experiment, Visium platform -#' @param target character(1) defaults to tempfile(). -#' Set to a different folder for persistent Zarr store. -#' @note From spatialdata archive citing the biorxiv antecedent to `https://www.nature.com/articles/s41467-023-43458-x` -#' This is annotated as Visium associated xenium, and has been enhanced -#' with cell type annotation -#' @examples -#' JanesickBreastVisiumEnh() -#' @export -JanesickBreastVisiumEnh = function(target = tempfile()) { - get_demo_SD("visium_associated_xenium_io", target=target) -} - -#' Retrieve replicate 1 of Janesick FFPE breast cancer experiment, Xenium platform -#' @param target character(1) defaults to tempfile(). -#' Set to a different folder for persistent Zarr store. -#' @note From spatialdata archive citing the biorxiv antecedent to `https://www.nature.com/articles/s41467-023-43458-x` -#' This has been enhanced with cell type annotation. -#' @examples -#' JanesickBreastXeniumRep1() -#' @export -JanesickBreastXeniumRep1 = function(target = tempfile()) { - get_demo_SD("xenium_rep1_io", target=target) -} - -#' Retrieve replicate 2 of Janesick FFPE breast cancer experiment, Xenium platform -#' @param target character(1) defaults to tempfile(). -#' Set to a different folder for persistent Zarr store. -#' @note From spatialdata archive citing the biorxiv antecedent to `https://www.nature.com/articles/s41467-023-43458-x` -#' This has been enhanced with cell type annotation. -#' @examples -#' (sd <- JanesickBreastXeniumRep2()) -#' @export -JanesickBreastXeniumRep2 <- function(target=tempfile()) { - get_demo_SD("xenium_rep2_io", target=target) -} - - - -#' Retrieve 10x-trimmed breast cancer demonstration data, "two fields of view" -#' @param target character(1) defaults to tempfile(). -#' Set to a different folder for persistent Zarr store. -#' @note From `https://www.10xgenomics.com/support/software/xenium-onboard-analysis/latest/resources/xenium-example-data`. -#' @examples -#' (sd <- Breast2fov_10x()) -#' @export -Breast2fov_10x <- function(target=tempfile()) { - get_demo_SD("human_Breast_2fov", target=target) -} - -#' Retrieve 10x-trimmed lung cancer demonstration data, "two fields of view" -#' @param target character(1) defaults to tempfile(). -#' Set to a different folder for persistent Zarr store. -#' @note From `https://www.10xgenomics.com/support/software/xenium-onboard-analysis/latest/resources/xenium-example-data`. -#' @examples -#' (sd <- Lung2fov_10x()) -#' @export -Lung2fov_10x <- function(target=tempfile()) { - get_demo_SD("human_Lung_2fov", target=target) -} diff --git a/R/get_demo_SD.R b/R/get_demo_SD.R new file mode 100644 index 0000000..e828eb5 --- /dev/null +++ b/R/get_demo_SD.R @@ -0,0 +1,217 @@ +#' @title a data.frame with information about available resources +#' @docType data +#' @examples +#' utils::data(demo_spatialdata) +#' if (requireNamespace("DT")) { +#' DT::datatable(demo_spatialdata) +#' } +#' @note This information was scraped from +#' [scverse spatialdata](https://spatialdata.scverse.org/en/latest/tutorials/notebooks/datasets/README.html) download site on 5 Dec 2024. +#' The bracketed numbers under "Sample" refer to footnotes provided at that site. +#' The individual functions in this package give similarly detailed references. +"demo_spatialdata" + +#' @title retrieve scverse-curated `SpatialData` .zarr archive +#' @aliases MouseIntestineVisHD +#' +#' @description +#' This function consolidates the retrieval and caching and transformation +#' of scverse-curated Zarr archives and 10x-curated Xenium archives. +#' +#' @param patt character(1) sufficient to identify an OSN resource +#' @param cache like `BiocFileCache` +#' @param target character(1), defaults to tempfile(); use a different +#' value if you wish to retain the unzipped .zarr store persistently. +#' +#' @details +#' \describe{ +#' \item{ +#' \code{MouseIntestineVisHD()}}{ +#' Visium HD 3.0.0 (10x Genomics) dataset of mouse intestine; source: +#' \emph{https://www.10xgenomics.com/datasets/visium-hd-cytassist-gene-expression-libraries-of-mouse-intestine}} +#' \item{ +#' \code{LungAdenocarcinomaMCMICRO()}}{ +#' MCMICRO dataset of human small cell lung adenocarcinoma} +#' \item{ +#' \code{MouseBrainMERFISH()}}{ +#' MERFISH dataset of mouse brain tissue} +#' \item{ +#' \code{MulticancerSteinbock()}}{ +#' imaging mass cytometry dataset of four cancers; source: +#' \emph{https://www.nature.com/articles/s41596-023-00881-0}} +#' \item{ +#' \code{ColorectalCarcinomaMIBITOF()}}{ +#' MIBI-TOF dataset of colorectal carcinoma} +#' \item{ +#' \code{JanesickBreastVisiumEnh()}}{ +#' Visium (10x Genomics) dataset of breast cancer; source: +#' \emph{https://www.nature.com/articles/s41467-023-43458-x}} +#' \item{ +#' \code{JanesickBreastXeniumRep1/2()}}{ +#' two Xenium (10x Genomics) sections associated with +#' the above Visium section from Janesick \emph{et al.}} +#' \item{ +#' \code{Breast2fov_10x()}}{ +#' Xenium (10x Genomics) data on breast cancer, trimmed to 2 FOVs; source: +#' \emph{https://www.10xgenomics.com/support/software/xenium-onboard-analysis/latest/resources/xenium-example-data}} +#' \item{ +#' \code{Lung2fov_10x()}}{ +#' Xenium (10x Genomics) data on lung cancer, trimmed to 2 FOVs; source: +#' \emph{https://www.10xgenomics.com/support/software/xenium-onboard-analysis/latest/resources/xenium-example-data}} +#' \item{ +#' \code{HumanLungMulti_10x()}}{ +#' Xenium (10x Genomics) data on lung cancer; +#' source: \emph{https://www.10xgenomics.com/datasets/preview-data-ffpe-human-lung-cancer-with-xenium-multimodal-cell-segmentation-1-standard}} +#' } +#' +#' @examples +#' # the following are equivalent: +#' get_demo_SD("merfish") +#' MouseBrainMERFISH() +#' +#' @export +get_demo_SD <- function(patt, + cache=BiocFileCache::BiocFileCache(), + target=tempfile()) { + + # Bioconductor's OSN bucket + buckprefix <- "https://mghp.osn.xsede.org/bir190004-bucket01" + + # work on zipped Zarr archives from scverse SpatialData datasets page + sdfold <- "BiocSpatialData" + + sdzips <- c( + "mcmicro_io.zip", "merfish.zarr.zip", + "mibitof.zip", "steinbock_io.zip", + "visium_associated_xenium_io_aligned.zip", "visium_hd_3.0.0_io.zip", + "xenium_rep1_io_aligned.zip", "xenium_rep2_io_aligned.zip", + "HuLungXenmulti.zip") + + sdurls <- paste(buckprefix, sdfold, sdzips, sep="/") + + # work on zipped Xenium minimal outputs, retrieved and zipped in OSN + # these must be expanded and processed with use_sdio + xdfold <- "BiocXenDemo" + xdzips <- c( + "Xenium_V1_human_Breast_2fov_outs.zip", + "Xenium_V1_human_Lung_2fov_outs.zip") + + # collect names of all zip files + allz <- c(sdzips, xdzips) + # build a tibble with all relevant information + xdurls <- paste(buckprefix, xdfold, xdzips, sep="/") + allurls <- c(sdurls, xdurls) + + ca <- BiocFileCache::BiocFileCache() + chk <- lapply(allurls, \(x) BiocFileCache::bfcquery(ca, x)) + chkdf <- do.call(rbind, chk) + ind <- grep(patt, chkdf$rname) + nupatt <- "pattern does not uniquely identify a resource, please be more specific" + if (length(ind) > 1) stop(nupatt) + if (length(ind) == 0) { + chkxen <- grep(patt, xdzips) + if (length(chkxen) > 1) stop(nupatt) + if (length(chkxen) == 0) { # add a zipped zarr + zipind = grep(patt, sdzips) # already ruled out xenium group, must be from spatialdata archive + if (length(zipind) == 0) stop("patt not matched in available resources") + zipname <- sdzips[zipind] + message(sprintf("caching %s", zipname)) + fpath <- sdurls[zipind] + loc <- BiocFileCache::bfcadd(cache, rname=zipname, fpath=fpath, rtype="web") + td <- target + dir.create(td) + unzip(loc, exdir=td) + return(SpatialData::readSpatialData(dir(td, full.names=TRUE))) + } # end zipped zarr, now retrieve Xenium, run use_sdio, then read + zipname <- xdzips[chkxen] + message(sprintf("caching %s", zipname)) + fpath <- xdurls[chkxen] + preloc <- BiocFileCache::bfcadd(cache, rname=zipname, fpath=fpath, rtype="web") + td <- tempfile() # can't use target' + dir.create(td) + unzip(preloc, exdir=td) # manufacturer output + if (dir.exists(target)) print("target exists") + use_sdio("xenium", srcdir=td, dest=target) # zarr in target + return(SpatialData::readSpatialData(target)) + } + # so a single pattern has hit, and it is in cache + if (chkdf[ind,]$rname %in% xdzips) { # it is a Xenium 10x output resource + preloc <- chkdf[ind,]$rpath + td <- tempfile() # can't use target + dir.create(td) + unzip(preloc, exdir=td) # manufacturer output + use_sdio("xenium", srcdir=td, dest=target) # zarr in target + return(SpatialData::readSpatialData(target)) + } + loc <- chkdf[ind,]$rpath + td <- target + dir.create(td) + unzip(loc, exdir=td) + SpatialData::readSpatialData(dir(td, full.names=TRUE)) +} + +#' @rdname get_demo_SD +#' @export +MouseIntestineVisHD <- function(target=tempfile()) { + get_demo_SD("visium_hd_3.0.0", target=target) +} + +#' @rdname get_demo_SD +#' @export +LungAdenocarcinomaMCMICRO <- function(target=tempfile()) { + get_demo_SD("mcmicro_io", target=target) +} + +#' @rdname get_demo_SD +#' @export +MouseBrainMERFISH = function(target=tempfile()) { + get_demo_SD("merfish", target=target) +} + +#' @rdname get_demo_SD +#' @export +MulticancerSteinbock <- function(target=tempfile()) { + get_demo_SD("steinbock_io", target=target) +} + +#' @rdname get_demo_SD +#' @export +ColorectalCarcinomaMIBITOF <- function(target=tempfile()) { + get_demo_SD("mibitof", target=target) +} + +#' @rdname get_demo_SD +#' @export +JanesickBreastVisiumEnh <- function(target=tempfile()) { + get_demo_SD("visium_associated_xenium_io", target=target) +} + +#' @rdname get_demo_SD +#' @export +JanesickBreastXeniumRep1 <- function(target=tempfile()) { + get_demo_SD("xenium_rep1_io", target=target) +} + +#' @rdname get_demo_SD +#' @export +JanesickBreastXeniumRep2 <- function(target=tempfile()) { + get_demo_SD("xenium_rep2_io", target=target) +} + +#' @rdname get_demo_SD +#' @export +Breast2fov_10x <- function(target=tempfile()) { + get_demo_SD("human_Breast_2fov", target=target) +} + +#' @rdname get_demo_SD +#' @export +Lung2fov_10x <- function(target=tempfile()) { + get_demo_SD("human_Lung_2fov", target=target) +} + +#' @rdname get_demo_SD +#' @export +HumanLungMulti_10x <- function(target=tempfile()) { + get_demo_SD("HuLungXenmulti", target=target) +} \ No newline at end of file diff --git a/inst/NEWS b/inst/NEWS index 3d5723e..83b0083 100644 --- a/inst/NEWS +++ b/inst/NEWS @@ -1,4 +1,12 @@ -changes in version 0.99.0 +changes in version 0.99.2 + +- add Xenium dataset of human lung cancer to OSN and + corresponding caching function 'HumanLungMulti_10x()' + +changes in version 0.99.1 + +- move 'SpatialData' from 'Imports:' to 'Depends': + to fix issues related to order of attachment changes in version 0.99.0 diff --git a/man/Breast2fov_10x.Rd b/man/Breast2fov_10x.Rd deleted file mode 100644 index 2d7a06d..0000000 --- a/man/Breast2fov_10x.Rd +++ /dev/null @@ -1,21 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/demodata_code.R -\name{Breast2fov_10x} -\alias{Breast2fov_10x} -\title{Retrieve 10x-trimmed breast cancer demonstration data, "two fields of view"} -\usage{ -Breast2fov_10x(target = tempfile()) -} -\arguments{ -\item{target}{character(1) defaults to tempfile(). -Set to a different folder for persistent Zarr store.} -} -\description{ -Retrieve 10x-trimmed breast cancer demonstration data, "two fields of view" -} -\note{ -From `https://www.10xgenomics.com/support/software/xenium-onboard-analysis/latest/resources/xenium-example-data`. -} -\examples{ -(sd <- Breast2fov_10x()) -} diff --git a/man/ColorectalCarcinomaMIBITOF.Rd b/man/ColorectalCarcinomaMIBITOF.Rd deleted file mode 100644 index d68b239..0000000 --- a/man/ColorectalCarcinomaMIBITOF.Rd +++ /dev/null @@ -1,21 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/demodata_code.R -\name{ColorectalCarcinomaMIBITOF} -\alias{ColorectalCarcinomaMIBITOF} -\title{Retrieve colorectal carcinoma MIBI-TOF experiment.} -\usage{ -ColorectalCarcinomaMIBITOF(target = tempfile()) -} -\arguments{ -\item{target}{character(1) defaults to tempfile(). -Set to a different folder for persistent Zarr store.} -} -\description{ -Retrieve colorectal carcinoma MIBI-TOF experiment. -} -\note{ -From spatialdata archive citing `Hartmann, F. J. et al. Single-cell metabolic profiling of human cytotoxic T cells. Nat. Biotechnol. (2020) doi:10.1038/s41587-020-0651-8.` -} -\examples{ -ColorectalCarcinomaMIBITOF() -} diff --git a/man/JanesickBreastVisiumEnh.Rd b/man/JanesickBreastVisiumEnh.Rd deleted file mode 100644 index f9e4916..0000000 --- a/man/JanesickBreastVisiumEnh.Rd +++ /dev/null @@ -1,23 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/demodata_code.R -\name{JanesickBreastVisiumEnh} -\alias{JanesickBreastVisiumEnh} -\title{Retrieve a version of Janesick FFPE breast cancer experiment, Visium platform} -\usage{ -JanesickBreastVisiumEnh(target = tempfile()) -} -\arguments{ -\item{target}{character(1) defaults to tempfile(). -Set to a different folder for persistent Zarr store.} -} -\description{ -Retrieve a version of Janesick FFPE breast cancer experiment, Visium platform -} -\note{ -From spatialdata archive citing the biorxiv antecedent to `https://www.nature.com/articles/s41467-023-43458-x` -This is annotated as Visium associated xenium, and has been enhanced -with cell type annotation -} -\examples{ -JanesickBreastVisiumEnh() -} diff --git a/man/JanesickBreastXeniumRep1.Rd b/man/JanesickBreastXeniumRep1.Rd deleted file mode 100644 index 009fb97..0000000 --- a/man/JanesickBreastXeniumRep1.Rd +++ /dev/null @@ -1,22 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/demodata_code.R -\name{JanesickBreastXeniumRep1} -\alias{JanesickBreastXeniumRep1} -\title{Retrieve replicate 1 of Janesick FFPE breast cancer experiment, Xenium platform} -\usage{ -JanesickBreastXeniumRep1(target = tempfile()) -} -\arguments{ -\item{target}{character(1) defaults to tempfile(). -Set to a different folder for persistent Zarr store.} -} -\description{ -Retrieve replicate 1 of Janesick FFPE breast cancer experiment, Xenium platform -} -\note{ -From spatialdata archive citing the biorxiv antecedent to `https://www.nature.com/articles/s41467-023-43458-x` -This has been enhanced with cell type annotation. -} -\examples{ -JanesickBreastXeniumRep1() -} diff --git a/man/JanesickBreastXeniumRep2.Rd b/man/JanesickBreastXeniumRep2.Rd deleted file mode 100644 index 703f4d9..0000000 --- a/man/JanesickBreastXeniumRep2.Rd +++ /dev/null @@ -1,22 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/demodata_code.R -\name{JanesickBreastXeniumRep2} -\alias{JanesickBreastXeniumRep2} -\title{Retrieve replicate 2 of Janesick FFPE breast cancer experiment, Xenium platform} -\usage{ -JanesickBreastXeniumRep2(target = tempfile()) -} -\arguments{ -\item{target}{character(1) defaults to tempfile(). -Set to a different folder for persistent Zarr store.} -} -\description{ -Retrieve replicate 2 of Janesick FFPE breast cancer experiment, Xenium platform -} -\note{ -From spatialdata archive citing the biorxiv antecedent to `https://www.nature.com/articles/s41467-023-43458-x` -This has been enhanced with cell type annotation. -} -\examples{ -(sd <- JanesickBreastXeniumRep2()) -} diff --git a/man/Lung2fov_10x.Rd b/man/Lung2fov_10x.Rd deleted file mode 100644 index c5732f5..0000000 --- a/man/Lung2fov_10x.Rd +++ /dev/null @@ -1,21 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/demodata_code.R -\name{Lung2fov_10x} -\alias{Lung2fov_10x} -\title{Retrieve 10x-trimmed lung cancer demonstration data, "two fields of view"} -\usage{ -Lung2fov_10x(target = tempfile()) -} -\arguments{ -\item{target}{character(1) defaults to tempfile(). -Set to a different folder for persistent Zarr store.} -} -\description{ -Retrieve 10x-trimmed lung cancer demonstration data, "two fields of view" -} -\note{ -From `https://www.10xgenomics.com/support/software/xenium-onboard-analysis/latest/resources/xenium-example-data`. -} -\examples{ -(sd <- Lung2fov_10x()) -} diff --git a/man/LungAdenocarcinomaMCMICRO.Rd b/man/LungAdenocarcinomaMCMICRO.Rd deleted file mode 100644 index 64f0c8c..0000000 --- a/man/LungAdenocarcinomaMCMICRO.Rd +++ /dev/null @@ -1,21 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/demodata_code.R -\name{LungAdenocarcinomaMCMICRO} -\alias{LungAdenocarcinomaMCMICRO} -\title{Retrieve small cell lung adenocarcinoma sample assayed with mcmicro} -\usage{ -LungAdenocarcinomaMCMICRO(target = tempfile()) -} -\arguments{ -\item{target}{character(1) defaults to tempfile(). -Set to a different folder for persistent Zarr store.} -} -\description{ -Retrieve small cell lung adenocarcinoma sample assayed with mcmicro -} -\note{ -From scverse spatialdata archive citing `https://www.nature.com/articles/s41592-021-01308-y`. -} -\examples{ -LungAdenocarcinomaMCMICRO() -} diff --git a/man/MouseBrainMERFISH.Rd b/man/MouseBrainMERFISH.Rd deleted file mode 100644 index f598cf6..0000000 --- a/man/MouseBrainMERFISH.Rd +++ /dev/null @@ -1,21 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/demodata_code.R -\name{MouseBrainMERFISH} -\alias{MouseBrainMERFISH} -\title{Retrieve small cell lung adenocarcinoma sample assayed with mcmicro} -\usage{ -MouseBrainMERFISH(target = tempfile()) -} -\arguments{ -\item{target}{character(1) defaults to tempfile(). -Set to a different folder for persistent Zarr store.} -} -\description{ -Retrieve small cell lung adenocarcinoma sample assayed with mcmicro -} -\note{ -From scverse spatialdata archive citing `Moffitt, J. R. et al. Molecular, spatial, and functional single-cell profiling of the hypothalamic preoptic region. Science 362, (2018).` -} -\examples{ -(sd <- MouseBrainMERFISH()) -} diff --git a/man/MouseIntestineVisHD.Rd b/man/MouseIntestineVisHD.Rd deleted file mode 100644 index fbd94fb..0000000 --- a/man/MouseIntestineVisHD.Rd +++ /dev/null @@ -1,22 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/demodata_code.R -\name{MouseIntestineVisHD} -\alias{MouseIntestineVisHD} -\title{Retrieve 10x-published mouse intestine sample, Visium HD 3.0.0} -\usage{ -MouseIntestineVisHD(target = tempfile()) -} -\arguments{ -\item{target}{character(1) defaults to tempfile(). -Set to a different folder for persistent Zarr store.} -} -\description{ -Retrieve 10x-published mouse intestine sample, Visium HD 3.0.0 -} -\note{ -From -`https://www.10xgenomics.com/datasets/visium-hd-cytassist-gene-expression-libraries-of-mouse-intestine` -It takes at least a minute for this function to return, -as there is considerable decompression and reassembly -once the basic resource has been retrieved from cache. -} diff --git a/man/MulticancerSteinbock.Rd b/man/MulticancerSteinbock.Rd deleted file mode 100644 index 9ad7ba4..0000000 --- a/man/MulticancerSteinbock.Rd +++ /dev/null @@ -1,23 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/demodata_code.R -\name{MulticancerSteinbock} -\alias{MulticancerSteinbock} -\title{Retrieve spatial mass cytometry experiments for four cancers} -\usage{ -MulticancerSteinbock(target = tempfile()) -} -\arguments{ -\item{target}{character(1) defaults to tempfile(). -Set to a different folder for persistent Zarr store.} -} -\description{ -Retrieve spatial mass cytometry experiments for four cancers -} -\note{ -From spatialdata archive -citing `https://www.nature.com/articles/s41596-023-00881-0`. -See also `https://bodenmillergroup.github.io/steinbock/latest/`. -} -\examples{ -MulticancerSteinbock() -} diff --git a/man/demo_spatialdata.Rd b/man/demo_spatialdata.Rd index bb967e9..41aa07d 100644 --- a/man/demo_spatialdata.Rd +++ b/man/demo_spatialdata.Rd @@ -1,5 +1,5 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/demodata_code.R +% Please edit documentation in R/get_demo_SD.R \docType{data} \name{demo_spatialdata} \alias{demo_spatialdata} diff --git a/man/get_demo_SD.Rd b/man/get_demo_SD.Rd index 1f2ae7f..8bca4e2 100644 --- a/man/get_demo_SD.Rd +++ b/man/get_demo_SD.Rd @@ -1,27 +1,100 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/demodata_code.R +% Please edit documentation in R/get_demo_SD.R \name{get_demo_SD} \alias{get_demo_SD} -\title{this function consolidates the retrieval and caching and -transformation of scverse-curated Zarr archives and 10x-curated -Xenium archives} +\alias{MouseIntestineVisHD} +\alias{LungAdenocarcinomaMCMICRO} +\alias{MouseBrainMERFISH} +\alias{MulticancerSteinbock} +\alias{ColorectalCarcinomaMIBITOF} +\alias{JanesickBreastVisiumEnh} +\alias{JanesickBreastXeniumRep1} +\alias{JanesickBreastXeniumRep2} +\alias{Breast2fov_10x} +\alias{Lung2fov_10x} +\alias{HumanLungMulti_10x} +\title{retrieve scverse-curated `SpatialData` .zarr archive} \usage{ get_demo_SD(patt, cache = BiocFileCache::BiocFileCache(), target = tempfile()) + +MouseIntestineVisHD(target = tempfile()) + +LungAdenocarcinomaMCMICRO(target = tempfile()) + +MouseBrainMERFISH(target = tempfile()) + +MulticancerSteinbock(target = tempfile()) + +ColorectalCarcinomaMIBITOF(target = tempfile()) + +JanesickBreastVisiumEnh(target = tempfile()) + +JanesickBreastXeniumRep1(target = tempfile()) + +JanesickBreastXeniumRep2(target = tempfile()) + +Breast2fov_10x(target = tempfile()) + +Lung2fov_10x(target = tempfile()) + +HumanLungMulti_10x(target = tempfile()) } \arguments{ -\item{patt}{character(1) sufficient to identify a resource in OSN} +\item{patt}{character(1) sufficient to identify an OSN resource} -\item{cache}{like BiocFileCache} +\item{cache}{like `BiocFileCache`} -\item{target}{character(1), defaults to tempfile(). Use a -different value if you wish to retain the unzipped Zarr -store persistently.} +\item{target}{character(1), defaults to tempfile(); use a different +value if you wish to retain the unzipped .zarr store persistently.} } \description{ -this function consolidates the retrieval and caching and -transformation of scverse-curated Zarr archives and 10x-curated -Xenium archives +This function consolidates the retrieval and caching and transformation +of scverse-curated Zarr archives and 10x-curated Xenium archives. +} +\details{ +\describe{ +\item{ + \code{MouseIntestineVisHD()}}{ + Visium HD 3.0.0 (10x Genomics) dataset of mouse intestine; source: +\emph{https://www.10xgenomics.com/datasets/visium-hd-cytassist-gene-expression-libraries-of-mouse-intestine}} +\item{ + \code{LungAdenocarcinomaMCMICRO()}}{ + MCMICRO dataset of human small cell lung adenocarcinoma} +\item{ + \code{MouseBrainMERFISH()}}{ + MERFISH dataset of mouse brain tissue} +\item{ + \code{MulticancerSteinbock()}}{ + imaging mass cytometry dataset of four cancers; source: + \emph{https://www.nature.com/articles/s41596-023-00881-0}} +\item{ + \code{ColorectalCarcinomaMIBITOF()}}{ + MIBI-TOF dataset of colorectal carcinoma} +\item{ + \code{JanesickBreastVisiumEnh()}}{ + Visium (10x Genomics) dataset of breast cancer; source: + \emph{https://www.nature.com/articles/s41467-023-43458-x}} +\item{ + \code{JanesickBreastXeniumRep1/2()}}{ + two Xenium (10x Genomics) sections associated with + the above Visium section from Janesick \emph{et al.}} +\item{ + \code{Breast2fov_10x()}}{ + Xenium (10x Genomics) data on breast cancer, trimmed to 2 FOVs; source: + \emph{https://www.10xgenomics.com/support/software/xenium-onboard-analysis/latest/resources/xenium-example-data}} +\item{ + \code{Lung2fov_10x()}}{ + Xenium (10x Genomics) data on lung cancer, trimmed to 2 FOVs; source: + \emph{https://www.10xgenomics.com/support/software/xenium-onboard-analysis/latest/resources/xenium-example-data}} +\item{ + \code{HumanLungMulti_10x()}}{ + Xenium (10x Genomics) data on lung cancer; + source: \emph{https://www.10xgenomics.com/datasets/preview-data-ffpe-human-lung-cancer-with-xenium-multimodal-cell-segmentation-1-standard}} +} } \examples{ -(br2fov <- get_demo_SD("Breast_2fov")) +# the following are equivalent: +get_demo_SD("merfish") +MouseBrainMERFISH() + }