diff --git a/R/add_key.R b/R/add_key.R index 648ecc30..ce851b66 100644 --- a/R/add_key.R +++ b/R/add_key.R @@ -21,13 +21,20 @@ #' head(spe$key) #' #' ## We can clean it +#' spe$key_original <- spe$key #' spe$key <- NULL #' #' ## and then add it back -#' head(add_key(spe)$key) +#' spe <- add_key(spe) +#' head(spe$key) #' #' ## Note that the original 'key' order was 'sample_id'_'barcode' and we' #' ## have since changed it to 'barcode'_'sample_id'. +#' +#' ## Below we restore the original 'key' +#' spe$key <- spe$key_original +#' spe$key_original <- NULL +#' head(spe$key) #' } add_key <- function(spe, overwrite = TRUE) { if ("key" %in% colnames(colData(spe))) { diff --git a/R/add_qc_metrics.R b/R/add_qc_metrics.R index c1213184..a5c7ca32 100644 --- a/R/add_qc_metrics.R +++ b/R/add_qc_metrics.R @@ -90,7 +90,7 @@ #' vis_clus(spe_qc, sample_id = "Br6432_ant", clustervar = "our_low_lib_edge") #' #' ## Clean up -#' rm(spe_qc, spec_pre_qc) +#' rm(spe_qc, spe_pre_qc, vars) #' add_qc_metrics <- function(spe, overwrite = FALSE) { stopifnot("in_tissue" %in% colnames(colData(spe))) diff --git a/R/check_sce_layer.R b/R/check_sce_layer.R index e7280113..5ca9b5ae 100644 --- a/R/check_sce_layer.R +++ b/R/check_sce_layer.R @@ -14,10 +14,11 @@ #' #' @examples #' -#' ## Obtain the necessary data +#' ## Obtain example data from the HumanPilot project +#' ## (Maynard, Collado-Torres, et al, 2021) #' if (!exists("sce_layer")) sce_layer <- fetch_data("sce_layer") #' -#' ## Check the object +#' ## Check the pseudo-bulked data #' check_sce_layer(sce_layer) check_sce_layer <- function(sce_layer, variables = "spatialLIBD") { ## Should be a SingleCellExperiment object diff --git a/R/vis_clus.R b/R/vis_clus.R index 1bca16bf..e1e0eaa0 100644 --- a/R/vis_clus.R +++ b/R/vis_clus.R @@ -4,7 +4,11 @@ #' using (by default) the histology information on the background. To visualize #' gene-level (or any continuous variable) use [vis_gene()]. #' -#' @inheritParams run_app +#' @param spe A +#' [SpatialExperiment-class][SpatialExperiment::SpatialExperiment-class] +#' object. See [fetch_data()] for how to download some example objects or +#' [read10xVisiumWrapper()] to read in `spaceranger --count` output files and +#' build your own `spe` object. #' @param sampleid A `character(1)` specifying which sample to plot from #' `colData(spe)$sample_id` (formerly `colData(spe)$sample_name`). #' @param clustervar A `character(1)` with the name of the `colData(spe)` diff --git a/R/vis_clus_p.R b/R/vis_clus_p.R index d2b37cec..f74b95f6 100644 --- a/R/vis_clus_p.R +++ b/R/vis_clus_p.R @@ -6,8 +6,8 @@ #' gene-level (or any continuous variable) use [vis_gene_p()]. #' #' @inheritParams vis_clus -#' @param d A data.frame with the sample-level information. This is typically -#' obtained using `cbind(colData(spe), spatialCoords(spe))`. +#' @param d A `data.frame()` with the sample-level information. This is +#' typically obtained using `cbind(colData(spe), spatialCoords(spe))`. #' @param title The title for the plot. #' #' @return A [ggplot2][ggplot2::ggplot] object. diff --git a/R/vis_gene.R b/R/vis_gene.R index 38a233aa..ed056ba5 100644 --- a/R/vis_gene.R +++ b/R/vis_gene.R @@ -7,11 +7,11 @@ #' #' @inheritParams vis_clus #' @param geneid A `character()` specifying the gene ID(s) stored in -#' `rowData(spe)$gene_search` or a continuous variable(s) stored in `colData(spe)` -#' to visualize. For each ID, if `rowData(spe)$gene_search` is missing, then -#' `rownames(spe)` is used to search for the gene ID. When a vector of length > 1 -#' is supplied, the continuous variables are combined according to \code{multi_gene_method}, -#' producing a single value for each spot. +#' `rowData(spe)$gene_search` or a continuous variable(s) stored in +#' `colData(spe)` to visualize. For each ID, if `rowData(spe)$gene_search` is +#' missing, then `rownames(spe)` is used to search for the gene ID. When a +#' vector of length > 1 is supplied, the continuous variables are combined +#' according to `multi_gene_method`, producing a single value for each spot. #' @param assayname The name of the `assays(spe)` to use for extracting the #' gene expression data. Defaults to `logcounts`. #' @param minCount A `numeric(1)` specifying the minimum gene expression (or @@ -25,9 +25,9 @@ #' dependent on cell density. #' @param cont_colors A `character()` vector of colors that supersedes the #' `viridis` argument. -#' @param multi_gene_method A \code{character(1)}: either "pca", "sparsity", or -#' "z_score". This parameter controls how multiple continuous variables are -#' combined for visualization, and only applies when \code{geneid} has length +#' @param multi_gene_method A `character(1)`: either `"pca"`, `"sparsity"`, or +#' `"z_score"`. This parameter controls how multiple continuous variables are +#' combined for visualization, and only applies when `geneid` has length #' great than 1. `z_score`: to summarize multiple continuous variables, each is #' normalized to represent a Z-score. The multiple scores are then averaged. #' `pca`: PCA dimension reduction is conducted on the matrix formed by the diff --git a/R/vis_gene_p.R b/R/vis_gene_p.R index 632b864c..baeee29e 100644 --- a/R/vis_gene_p.R +++ b/R/vis_gene_p.R @@ -3,12 +3,12 @@ #' This function visualizes the gene expression stored in `assays(spe)` or any #' continuous variable stored in `colData(spe)` for one given sample at the #' spot-level using (by default) the histology information on the background. -#' This is the function that does all the plotting behind [vis_gene()]. +#' This is the function that does all the plotting behind [vis_gene()] #' To visualize clusters (or any discrete variable) use [vis_clus_p()]. #' -#' @param d A data.frame with the sample-level information. This is typically -#' obtained using `cbind(colData(spe), spatialCoords(spe))`. -#' The data.frame has to contain +#' @param d A `data.frame()` with the sample-level information. This is +#' typically obtained using `cbind(colData(spe), spatialCoords(spe))`. +#' The `data.frame` has to contain #' a column with the continuous variable data to plot stored under `d$COUNT`. #' @param legend_title A `character(1)` specifying the legend title. #' @inheritParams vis_clus_p diff --git a/man/add_images.Rd b/man/add_images.Rd index dfe964fd..6e85ffb5 100644 --- a/man/add_images.Rd +++ b/man/add_images.Rd @@ -14,11 +14,11 @@ add_images( ) } \arguments{ -\item{spe}{Defaults to the output of -\code{fetch_data(type = 'spe')}. This is a +\item{spe}{A \link[SpatialExperiment:SpatialExperiment]{SpatialExperiment-class} -object with the spot-level Visium data and information required for -visualizing the histology. See \code{\link[=fetch_data]{fetch_data()}} for more details.} +object. See \code{\link[=fetch_data]{fetch_data()}} for how to download some example objects or +\code{\link[=read10xVisiumWrapper]{read10xVisiumWrapper()}} to read in \code{spaceranger --count} output files and +build your own \code{spe} object.} \item{image_dir}{A \code{character(1)} specifying a path to a directory containing image files with the pattern \code{sampleID_pattern.png}.} diff --git a/man/add_key.Rd b/man/add_key.Rd index 699aaf67..b13e780f 100644 --- a/man/add_key.Rd +++ b/man/add_key.Rd @@ -31,12 +31,19 @@ if (enough_ram()) { head(spe$key) ## We can clean it + spe$key_original <- spe$key spe$key <- NULL ## and then add it back - head(add_key(spe)$key) + spe <- add_key(spe) + head(spe$key) ## Note that the original 'key' order was 'sample_id'_'barcode' and we' ## have since changed it to 'barcode'_'sample_id'. + + ## Below we restore the original 'key' + spe$key <- spe$key_original + spe$key_original <- NULL + head(spe$key) } } diff --git a/man/add_qc_metrics.Rd b/man/add_qc_metrics.Rd index 22e91df7..7623b2c2 100644 --- a/man/add_qc_metrics.Rd +++ b/man/add_qc_metrics.Rd @@ -95,7 +95,7 @@ spe_qc$our_low_lib_edge <- spe_qc$scran_low_lib_size & spe_qc$edge_distance < 5 vis_clus(spe_qc, sample_id = "Br6432_ant", clustervar = "our_low_lib_edge") ## Clean up -rm(spe_qc, spec_pre_qc) +rm(spe_qc, spe_pre_qc, vars) } \author{ diff --git a/man/check_sce_layer.Rd b/man/check_sce_layer.Rd index cac2d6c7..d2c9bf32 100644 --- a/man/check_sce_layer.Rd +++ b/man/check_sce_layer.Rd @@ -25,10 +25,11 @@ For more details please check the vignette documentation. } \examples{ -## Obtain the necessary data +## Obtain example data from the HumanPilot project +## (Maynard, Collado-Torres, et al, 2021) if (!exists("sce_layer")) sce_layer <- fetch_data("sce_layer") -## Check the object +## Check the pseudo-bulked data check_sce_layer(sce_layer) } \seealso{ diff --git a/man/check_spe.Rd b/man/check_spe.Rd index ecaa9867..577afeec 100644 --- a/man/check_spe.Rd +++ b/man/check_spe.Rd @@ -10,11 +10,11 @@ check_spe( ) } \arguments{ -\item{spe}{Defaults to the output of -\code{fetch_data(type = 'spe')}. This is a +\item{spe}{A \link[SpatialExperiment:SpatialExperiment]{SpatialExperiment-class} -object with the spot-level Visium data and information required for -visualizing the histology. See \code{\link[=fetch_data]{fetch_data()}} for more details.} +object. See \code{\link[=fetch_data]{fetch_data()}} for how to download some example objects or +\code{\link[=read10xVisiumWrapper]{read10xVisiumWrapper()}} to read in \code{spaceranger --count} output files and +build your own \code{spe} object.} \item{variables}{A \code{character()} vector of variable names expected to be present in \code{colData(spe)}.} diff --git a/man/cluster_export.Rd b/man/cluster_export.Rd index 613e5cdf..238cb5aa 100644 --- a/man/cluster_export.Rd +++ b/man/cluster_export.Rd @@ -12,11 +12,11 @@ cluster_export( ) } \arguments{ -\item{spe}{Defaults to the output of -\code{fetch_data(type = 'spe')}. This is a +\item{spe}{A \link[SpatialExperiment:SpatialExperiment]{SpatialExperiment-class} -object with the spot-level Visium data and information required for -visualizing the histology. See \code{\link[=fetch_data]{fetch_data()}} for more details.} +object. See \code{\link[=fetch_data]{fetch_data()}} for how to download some example objects or +\code{\link[=read10xVisiumWrapper]{read10xVisiumWrapper()}} to read in \code{spaceranger --count} output files and +build your own \code{spe} object.} \item{cluster_var}{A \code{character(1)} with the name of the variable you wish to export.} diff --git a/man/cluster_import.Rd b/man/cluster_import.Rd index 778a73d8..2c7288fa 100644 --- a/man/cluster_import.Rd +++ b/man/cluster_import.Rd @@ -12,11 +12,11 @@ cluster_import( ) } \arguments{ -\item{spe}{Defaults to the output of -\code{fetch_data(type = 'spe')}. This is a +\item{spe}{A \link[SpatialExperiment:SpatialExperiment]{SpatialExperiment-class} -object with the spot-level Visium data and information required for -visualizing the histology. See \code{\link[=fetch_data]{fetch_data()}} for more details.} +object. See \code{\link[=fetch_data]{fetch_data()}} for how to download some example objects or +\code{\link[=read10xVisiumWrapper]{read10xVisiumWrapper()}} to read in \code{spaceranger --count} output files and +build your own \code{spe} object.} \item{cluster_dir}{A \code{character(1)} specifying the output directory, similar to the \code{outs/analysis/clustering} produced by SpaceRanger.} diff --git a/man/frame_limits.Rd b/man/frame_limits.Rd index 8b5cbe77..9274af88 100644 --- a/man/frame_limits.Rd +++ b/man/frame_limits.Rd @@ -13,11 +13,11 @@ frame_limits( ) } \arguments{ -\item{spe}{Defaults to the output of -\code{fetch_data(type = 'spe')}. This is a +\item{spe}{A \link[SpatialExperiment:SpatialExperiment]{SpatialExperiment-class} -object with the spot-level Visium data and information required for -visualizing the histology. See \code{\link[=fetch_data]{fetch_data()}} for more details.} +object. See \code{\link[=fetch_data]{fetch_data()}} for how to download some example objects or +\code{\link[=read10xVisiumWrapper]{read10xVisiumWrapper()}} to read in \code{spaceranger --count} output files and +build your own \code{spe} object.} \item{sampleid}{A \code{character(1)} specifying which sample to plot from \code{colData(spe)$sample_id} (formerly \code{colData(spe)$sample_name}).} diff --git a/man/img_edit.Rd b/man/img_edit.Rd index 699bea07..a2392bce 100644 --- a/man/img_edit.Rd +++ b/man/img_edit.Rd @@ -26,11 +26,11 @@ img_edit( ) } \arguments{ -\item{spe}{Defaults to the output of -\code{fetch_data(type = 'spe')}. This is a +\item{spe}{A \link[SpatialExperiment:SpatialExperiment]{SpatialExperiment-class} -object with the spot-level Visium data and information required for -visualizing the histology. See \code{\link[=fetch_data]{fetch_data()}} for more details.} +object. See \code{\link[=fetch_data]{fetch_data()}} for how to download some example objects or +\code{\link[=read10xVisiumWrapper]{read10xVisiumWrapper()}} to read in \code{spaceranger --count} output files and +build your own \code{spe} object.} \item{sampleid}{A \code{character(1)} specifying which sample to plot from \code{colData(spe)$sample_id} (formerly \code{colData(spe)$sample_name}).} diff --git a/man/img_update.Rd b/man/img_update.Rd index 3d0c1315..b3b1ecdb 100644 --- a/man/img_update.Rd +++ b/man/img_update.Rd @@ -14,11 +14,11 @@ img_update( ) } \arguments{ -\item{spe}{Defaults to the output of -\code{fetch_data(type = 'spe')}. This is a +\item{spe}{A \link[SpatialExperiment:SpatialExperiment]{SpatialExperiment-class} -object with the spot-level Visium data and information required for -visualizing the histology. See \code{\link[=fetch_data]{fetch_data()}} for more details.} +object. See \code{\link[=fetch_data]{fetch_data()}} for how to download some example objects or +\code{\link[=read10xVisiumWrapper]{read10xVisiumWrapper()}} to read in \code{spaceranger --count} output files and +build your own \code{spe} object.} \item{sampleid}{A \code{character(1)} specifying which sample to plot from \code{colData(spe)$sample_id} (formerly \code{colData(spe)$sample_name}).} diff --git a/man/img_update_all.Rd b/man/img_update_all.Rd index 2040e55b..a4d4f36c 100644 --- a/man/img_update_all.Rd +++ b/man/img_update_all.Rd @@ -13,11 +13,11 @@ img_update_all( ) } \arguments{ -\item{spe}{Defaults to the output of -\code{fetch_data(type = 'spe')}. This is a +\item{spe}{A \link[SpatialExperiment:SpatialExperiment]{SpatialExperiment-class} -object with the spot-level Visium data and information required for -visualizing the histology. See \code{\link[=fetch_data]{fetch_data()}} for more details.} +object. See \code{\link[=fetch_data]{fetch_data()}} for how to download some example objects or +\code{\link[=read10xVisiumWrapper]{read10xVisiumWrapper()}} to read in \code{spaceranger --count} output files and +build your own \code{spe} object.} \item{image_id}{A \code{character(1)} with the name of the image ID you want to use in the background.} diff --git a/man/locate_images.Rd b/man/locate_images.Rd index 6041b6c8..58448fb8 100644 --- a/man/locate_images.Rd +++ b/man/locate_images.Rd @@ -7,11 +7,11 @@ locate_images(spe, image_dir, image_pattern) } \arguments{ -\item{spe}{Defaults to the output of -\code{fetch_data(type = 'spe')}. This is a +\item{spe}{A \link[SpatialExperiment:SpatialExperiment]{SpatialExperiment-class} -object with the spot-level Visium data and information required for -visualizing the histology. See \code{\link[=fetch_data]{fetch_data()}} for more details.} +object. See \code{\link[=fetch_data]{fetch_data()}} for how to download some example objects or +\code{\link[=read10xVisiumWrapper]{read10xVisiumWrapper()}} to read in \code{spaceranger --count} output files and +build your own \code{spe} object.} \item{image_dir}{A \code{character(1)} specifying a path to a directory containing image files with the pattern \code{sampleID_pattern.png}.} diff --git a/man/tstats_Human_DLPFC_snRNAseq_Nguyen_topLayer.Rd b/man/tstats_Human_DLPFC_snRNAseq_Nguyen_topLayer.Rd index 11d2c849..2996d31a 100644 --- a/man/tstats_Human_DLPFC_snRNAseq_Nguyen_topLayer.Rd +++ b/man/tstats_Human_DLPFC_snRNAseq_Nguyen_topLayer.Rd @@ -19,8 +19,12 @@ and tstats_Human_DLPFC_snRNAseq_Nguyen_topLayer } \description{ -Using the DLPFC snRNA-seq data from Matthew N Tran et al we computed -enrichment t-statistics for the cell clusters. This is a subset of them -used in examples such as in \code{\link[=layer_stat_cor_plot]{layer_stat_cor_plot()}}. +Using the DLPFC snRNA-seq data from Matthew N Tran et al +\url{https://doi.org/10.1016/j.neuron.2021.09.001} we computed +enrichment t-statistics for the cell clusters. The Tran et al data has been +subset to the top 100 DLPFC layer markers found in Maynard, Collado-Torres, +et al 2021. This data is used in examples such as in +\code{\link[=layer_stat_cor_plot]{layer_stat_cor_plot()}}. The Tran et al data is from the pre-print version +of that project. } \keyword{datasets} diff --git a/man/vis_clus.Rd b/man/vis_clus.Rd index 10729e46..34513c66 100644 --- a/man/vis_clus.Rd +++ b/man/vis_clus.Rd @@ -21,11 +21,11 @@ vis_clus( ) } \arguments{ -\item{spe}{Defaults to the output of -\code{fetch_data(type = 'spe')}. This is a +\item{spe}{A \link[SpatialExperiment:SpatialExperiment]{SpatialExperiment-class} -object with the spot-level Visium data and information required for -visualizing the histology. See \code{\link[=fetch_data]{fetch_data()}} for more details.} +object. See \code{\link[=fetch_data]{fetch_data()}} for how to download some example objects or +\code{\link[=read10xVisiumWrapper]{read10xVisiumWrapper()}} to read in \code{spaceranger --count} output files and +build your own \code{spe} object.} \item{sampleid}{A \code{character(1)} specifying which sample to plot from \code{colData(spe)$sample_id} (formerly \code{colData(spe)$sample_name}).} diff --git a/man/vis_clus_p.Rd b/man/vis_clus_p.Rd index 3706e6a2..b8202f1f 100644 --- a/man/vis_clus_p.Rd +++ b/man/vis_clus_p.Rd @@ -20,14 +20,14 @@ vis_clus_p( ) } \arguments{ -\item{spe}{Defaults to the output of -\code{fetch_data(type = 'spe')}. This is a +\item{spe}{A \link[SpatialExperiment:SpatialExperiment]{SpatialExperiment-class} -object with the spot-level Visium data and information required for -visualizing the histology. See \code{\link[=fetch_data]{fetch_data()}} for more details.} +object. See \code{\link[=fetch_data]{fetch_data()}} for how to download some example objects or +\code{\link[=read10xVisiumWrapper]{read10xVisiumWrapper()}} to read in \code{spaceranger --count} output files and +build your own \code{spe} object.} -\item{d}{A data.frame with the sample-level information. This is typically -obtained using \code{cbind(colData(spe), spatialCoords(spe))}.} +\item{d}{A \code{data.frame()} with the sample-level information. This is +typically obtained using \code{cbind(colData(spe), spatialCoords(spe))}.} \item{clustervar}{A \code{character(1)} with the name of the \code{colData(spe)} column that has the cluster values.} diff --git a/man/vis_gene.Rd b/man/vis_gene.Rd index 2a6f94e6..bba4dc60 100644 --- a/man/vis_gene.Rd +++ b/man/vis_gene.Rd @@ -25,21 +25,21 @@ vis_gene( ) } \arguments{ -\item{spe}{Defaults to the output of -\code{fetch_data(type = 'spe')}. This is a +\item{spe}{A \link[SpatialExperiment:SpatialExperiment]{SpatialExperiment-class} -object with the spot-level Visium data and information required for -visualizing the histology. See \code{\link[=fetch_data]{fetch_data()}} for more details.} +object. See \code{\link[=fetch_data]{fetch_data()}} for how to download some example objects or +\code{\link[=read10xVisiumWrapper]{read10xVisiumWrapper()}} to read in \code{spaceranger --count} output files and +build your own \code{spe} object.} \item{sampleid}{A \code{character(1)} specifying which sample to plot from \code{colData(spe)$sample_id} (formerly \code{colData(spe)$sample_name}).} \item{geneid}{A \code{character()} specifying the gene ID(s) stored in -\code{rowData(spe)$gene_search} or a continuous variable(s) stored in \code{colData(spe)} -to visualize. For each ID, if \code{rowData(spe)$gene_search} is missing, then -\code{rownames(spe)} is used to search for the gene ID. When a vector of length > 1 -is supplied, the continuous variables are combined according to \code{multi_gene_method}, -producing a single value for each spot.} +\code{rowData(spe)$gene_search} or a continuous variable(s) stored in +\code{colData(spe)} to visualize. For each ID, if \code{rowData(spe)$gene_search} is +missing, then \code{rownames(spe)} is used to search for the gene ID. When a +vector of length > 1 is supplied, the continuous variables are combined +according to \code{multi_gene_method}, producing a single value for each spot.} \item{spatial}{A \code{logical(1)} indicating whether to include the histology layer from \code{\link[=geom_spatial]{geom_spatial()}}. If you plan to use @@ -81,8 +81,8 @@ alpha blending already, which will make non-NA values pop up more and the NA values will show with a lighter color. This behavior is lost when \code{alpha} is set to a non-\code{NA} value.} -\item{multi_gene_method}{A \code{character(1)}: either "pca", "sparsity", or -"z_score". This parameter controls how multiple continuous variables are +\item{multi_gene_method}{A \code{character(1)}: either \code{"pca"}, \code{"sparsity"}, or +\code{"z_score"}. This parameter controls how multiple continuous variables are combined for visualization, and only applies when \code{geneid} has length great than 1. \code{z_score}: to summarize multiple continuous variables, each is normalized to represent a Z-score. The multiple scores are then averaged. diff --git a/man/vis_gene_p.Rd b/man/vis_gene_p.Rd index c1115f71..d8fb4ea0 100644 --- a/man/vis_gene_p.Rd +++ b/man/vis_gene_p.Rd @@ -26,15 +26,15 @@ vis_gene_p( ) } \arguments{ -\item{spe}{Defaults to the output of -\code{fetch_data(type = 'spe')}. This is a +\item{spe}{A \link[SpatialExperiment:SpatialExperiment]{SpatialExperiment-class} -object with the spot-level Visium data and information required for -visualizing the histology. See \code{\link[=fetch_data]{fetch_data()}} for more details.} +object. See \code{\link[=fetch_data]{fetch_data()}} for how to download some example objects or +\code{\link[=read10xVisiumWrapper]{read10xVisiumWrapper()}} to read in \code{spaceranger --count} output files and +build your own \code{spe} object.} -\item{d}{A data.frame with the sample-level information. This is typically -obtained using \code{cbind(colData(spe), spatialCoords(spe))}. -The data.frame has to contain +\item{d}{A \code{data.frame()} with the sample-level information. This is +typically obtained using \code{cbind(colData(spe), spatialCoords(spe))}. +The \code{data.frame} has to contain a column with the continuous variable data to plot stored under \code{d$COUNT}.} \item{sampleid}{A \code{character(1)} specifying which sample to plot from @@ -84,7 +84,7 @@ A \link[ggplot2:ggplot]{ggplot2} object. This function visualizes the gene expression stored in \code{assays(spe)} or any continuous variable stored in \code{colData(spe)} for one given sample at the spot-level using (by default) the histology information on the background. -This is the function that does all the plotting behind \code{\link[=vis_gene]{vis_gene()}}. +This is the function that does all the plotting behind \code{\link[=vis_gene]{vis_gene()}} To visualize clusters (or any discrete variable) use \code{\link[=vis_clus_p]{vis_clus_p()}}. } \examples{ diff --git a/man/vis_grid_clus.Rd b/man/vis_grid_clus.Rd index 19dd2c3a..af943564 100644 --- a/man/vis_grid_clus.Rd +++ b/man/vis_grid_clus.Rd @@ -25,11 +25,11 @@ vis_grid_clus( ) } \arguments{ -\item{spe}{Defaults to the output of -\code{fetch_data(type = 'spe')}. This is a +\item{spe}{A \link[SpatialExperiment:SpatialExperiment]{SpatialExperiment-class} -object with the spot-level Visium data and information required for -visualizing the histology. See \code{\link[=fetch_data]{fetch_data()}} for more details.} +object. See \code{\link[=fetch_data]{fetch_data()}} for how to download some example objects or +\code{\link[=read10xVisiumWrapper]{read10xVisiumWrapper()}} to read in \code{spaceranger --count} output files and +build your own \code{spe} object.} \item{clustervar}{A \code{character(1)} with the name of the \code{colData(spe)} column that has the cluster values.} diff --git a/man/vis_grid_gene.Rd b/man/vis_grid_gene.Rd index a102cbbe..40b7461c 100644 --- a/man/vis_grid_gene.Rd +++ b/man/vis_grid_gene.Rd @@ -28,18 +28,18 @@ vis_grid_gene( ) } \arguments{ -\item{spe}{Defaults to the output of -\code{fetch_data(type = 'spe')}. This is a +\item{spe}{A \link[SpatialExperiment:SpatialExperiment]{SpatialExperiment-class} -object with the spot-level Visium data and information required for -visualizing the histology. See \code{\link[=fetch_data]{fetch_data()}} for more details.} +object. See \code{\link[=fetch_data]{fetch_data()}} for how to download some example objects or +\code{\link[=read10xVisiumWrapper]{read10xVisiumWrapper()}} to read in \code{spaceranger --count} output files and +build your own \code{spe} object.} \item{geneid}{A \code{character()} specifying the gene ID(s) stored in -\code{rowData(spe)$gene_search} or a continuous variable(s) stored in \code{colData(spe)} -to visualize. For each ID, if \code{rowData(spe)$gene_search} is missing, then -\code{rownames(spe)} is used to search for the gene ID. When a vector of length > 1 -is supplied, the continuous variables are combined according to \code{multi_gene_method}, -producing a single value for each spot.} +\code{rowData(spe)$gene_search} or a continuous variable(s) stored in +\code{colData(spe)} to visualize. For each ID, if \code{rowData(spe)$gene_search} is +missing, then \code{rownames(spe)} is used to search for the gene ID. When a +vector of length > 1 is supplied, the continuous variables are combined +according to \code{multi_gene_method}, producing a single value for each spot.} \item{pdf_file}{A \code{character(1)} specifying the path for the resulting PDF.}