From d504136d027b21ba3e6658f43c062e49edc6e5ea Mon Sep 17 00:00:00 2001 From: Nick-Eagles Date: Thu, 2 Nov 2023 12:05:06 -0400 Subject: [PATCH] Fix roxygen for some functions. Inherit parameters in a couple cases instead of just copying --- R/multi_gene.R | 24 ++++++++------------- man/dot-multi_gene_validity_check.Rd | 32 ++++++++++++++++++++++++++++ 2 files changed, 41 insertions(+), 15 deletions(-) create mode 100644 man/dot-multi_gene_validity_check.Rd diff --git a/R/multi_gene.R b/R/multi_gene.R index 369a11a..92f4e77 100644 --- a/R/multi_gene.R +++ b/R/multi_gene.R @@ -23,7 +23,7 @@ #' #' @export #' @author Nicholas J. Eagles -#' @import SpatialExperiment SummarizedExperiment rlang +#' @import SpatialExperiment SummarizedExperiment #' @family Spot plots summarizing expression of multiple genes simultaneously #' #' @examples @@ -76,24 +76,14 @@ spot_plot_z_score = function( #' computed of how many \code{genes} have nonzero expression, and this quantity #' is plotted across the entire capture area. #' -#' @param spe A \code{SpatialExperiment} with colData column \code{exclude_overlapping}, -#' passed to \code{spatialLIBD::vis_gene} or \code{spatialLIBD::vis_clus} -#' @param genes character() of gene names to plot in combination, expected to be -#' in \code{rownames(spe)} -#' @param sample_id character(1) passed to \code{sampleid} in -#' \code{spatialLIBD::vis_gene} or \code{spatialLIBD::vis_clus}. Assumed to be a -#' donor, possibly consisting of several capture areas to plot at once -#' @param assayname character(1) passed to \code{spatialLIBD::vis_gene} -#' @param minCount numeric(1) passed to passed to \code{spatialLIBD::vis_gene} -#' @param ... Parameters accepted by \code{spot_plot}, excluding -#' \code{is_discrete} or \code{var_name}, which are handled internally +#' @inheritParams spot_plot_z_score #' #' @return A \code{ggplot} object containing a "spot plot" of the specified #' sample and genes #' #' @export #' @author Nicholas J. Eagles -#' @import SpatialExperiment SummarizedExperiment rlang +#' @import SpatialExperiment SummarizedExperiment #' @family Spot plots summarizing expression of multiple genes simultaneously #' #' @examples @@ -136,8 +126,12 @@ spot_plot_sparsity = function( return(p) } -# Check the validity of arguments passed to plotting functions defined in -# this script +#' Check the validity of arguments passed to \code{multi_gene.R} plotting functions +#' +#' @author Nicholas J. Eagles +#' @inheritParams spot_plot_z_score +#' @import SpatialExperiment SummarizedExperiment rlang +#' @return NULL .multi_gene_validity_check = function( spe, genes, sample_id, assayname, minCount, ... ) { diff --git a/man/dot-multi_gene_validity_check.Rd b/man/dot-multi_gene_validity_check.Rd new file mode 100644 index 0000000..851de62 --- /dev/null +++ b/man/dot-multi_gene_validity_check.Rd @@ -0,0 +1,32 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/multi_gene.R +\name{.multi_gene_validity_check} +\alias{.multi_gene_validity_check} +\title{Check the validity of arguments passed to \code{multi_gene.R} plotting functions} +\usage{ +.multi_gene_validity_check(spe, genes, sample_id, assayname, minCount, ...) +} +\arguments{ +\item{spe}{A \code{SpatialExperiment} with colData column \code{exclude_overlapping}, +passed to \code{spatialLIBD::vis_gene} or \code{spatialLIBD::vis_clus}} + +\item{genes}{character() of gene names to plot in combination, expected to be +in \code{rownames(spe)}} + +\item{sample_id}{character(1) passed to \code{sampleid} in +\code{spatialLIBD::vis_gene} or \code{spatialLIBD::vis_clus}. Assumed to be a +donor, possibly consisting of several capture areas to plot at once} + +\item{assayname}{character(1) passed to \code{spatialLIBD::vis_gene}} + +\item{minCount}{numeric(1) passed to passed to \code{spatialLIBD::vis_gene}} + +\item{...}{Parameters accepted by \code{spot_plot}, excluding +\code{is_discrete} or \code{var_name}, which are handled internally} +} +\description{ +Check the validity of arguments passed to \code{multi_gene.R} plotting functions +} +\author{ +Nicholas J. Eagles +}