Skip to content

Commit 1071376

Browse files
committed
docs: update documentation links and examples for clarity and consistency across multiple plot functions
1 parent e5ee233 commit 1071376

13 files changed

Lines changed: 36 additions & 70 deletions

R/celldimplot.R

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
#' (`lineages`).
3939
#' \item **Velocity arrows** — Overlay RNA velocity vectors on the embedding
4040
#' (`velocity`). For dedicated velocity visualization with grid or
41-
#' stream plots, see [CellVelocityPlot()].
41+
#' stream plots, see \code{\link{CellVelocityPlot}}.
4242
#' \item **Statistical charts** — Embed small bar, ring, or line charts at
4343
#' group positions showing composition of a second variable (`stat_by`,
4444
#' `stat_plot_type`).
@@ -78,7 +78,7 @@
7878
#' reduction plot. The `velocity` parameter names a second reduction
7979
#' (e.g., `"stochastic_UMAP"`) whose first two dimensions encode the velocity
8080
#' arrows. This is a lightweight overlay — for dedicated velocity visualization
81-
#' with grid or stream plots, use [CellVelocityPlot()] which delegates to
81+
#' with grid or stream plots, use \code{\link{CellVelocityPlot}} which delegates to
8282
#' \code{\link[plotthis:VelocityPlot]{plotthis::VelocityPlot()}}.
8383
#'
8484
#' @param object A Seurat object, a Giotto object, a path to an `.h5ad` file,
@@ -100,7 +100,7 @@
100100
#' encode RNA velocity vectors to overlay on the plot. Typical values are
101101
#' `"stochastic_<reduction>"`, `"deterministic_<reduction>"`, or
102102
#' `"dynamical_<reduction>"` (e.g., `"stochastic_UMAP"`). For dedicated
103-
#' velocity visualization (grid or stream plots), use [CellVelocityPlot()]
103+
#' velocity visualization (grid or stream plots), use \code{\link{CellVelocityPlot}}
104104
#' instead. Default is `NULL` (no velocity overlay).
105105
#' @param group_by Character vector of metadata column name(s) used to color
106106
#' the cells. Can be a single column (e.g., `"CellType"`) or multiple
@@ -169,8 +169,8 @@
169169
#' \itemize{
170170
#' \item \code{\link[plotthis:DimPlot]{plotthis::DimPlot()}} — The
171171
#' underlying plotting engine
172-
#' \item [CellVelocityPlot()] — Dedicated RNA velocity visualization
173-
#' \item [CellStatPlot()] — Statistical summaries and comparisons
172+
#' \item \code{\link{CellVelocityPlot}} — Dedicated RNA velocity visualization
173+
#' \item \code{\link{CellStatPlot}} — Statistical summaries and comparisons
174174
#' }
175175
#'
176176
#' @export
@@ -573,7 +573,7 @@ CellDimPlot.H5File <- function(
573573
#' For example, `"stochastic_UMAP"` or `"dynamical_PCA"`.
574574
#'
575575
#' @section Relationship to CellDimPlot:
576-
#' While [CellDimPlot()] can overlay velocity arrows on a dimension reduction
576+
#' While \code{\link{CellDimPlot}} can overlay velocity arrows on a dimension reduction
577577
#' plot via its `velocity` parameter, `CellVelocityPlot` is the dedicated
578578
#' velocity visualization function. The key differences are:
579579
#' \itemize{
@@ -608,7 +608,7 @@ CellDimPlot.H5File <- function(
608608
#' or an opened `H5File` from the \pkg{hdf5r} package.
609609
#' @param reduction Name of the main dimension reduction that defines cell
610610
#' positions in the plot (e.g., `"umap"`, `"pca"`, `"tsne"`). This
611-
#' reduction must already exist in the object. Unlike [CellDimPlot()],
611+
#' reduction must already exist in the object. Unlike \code{\link{CellDimPlot}},
612612
#' this parameter is required — there is no default.
613613
#' @param v_reduction Name of the velocity reduction that encodes RNA velocity
614614
#' vectors (e.g., `"stochastic_UMAP"`, `"dynamical_PCA"`). Only the first
@@ -623,7 +623,7 @@ CellDimPlot.H5File <- function(
623623
#' default feature type is auto-detected via
624624
#' `GiottoClass::set_default_feat_type()`.
625625
#' @param group_by Metadata column name used to color cells by group (e.g.,
626-
#' `"CellType"`, `"Phase"`). Unlike [CellDimPlot()], this parameter is
626+
#' `"CellType"`, `"Phase"`). Unlike \code{\link{CellDimPlot}}, this parameter is
627627
#' optional — when `NULL`, all cells are plotted in a uniform color, which
628628
#' can be useful for focusing on the velocity flow patterns without visual
629629
#' distraction from cluster colors.
@@ -670,9 +670,9 @@ CellDimPlot.H5File <- function(
670670
#' \item \code{\link[plotthis:VelocityPlot]{plotthis::VelocityPlot()}} —
671671
#' The underlying plotting engine supporting arrow, grid, and stream
672672
#' plot types
673-
#' \item [CellDimPlot()] — Standard dimension reduction plot; can overlay
673+
#' \item \code{\link{CellDimPlot}} — Standard dimension reduction plot; can overlay
674674
#' velocity arrows via the `velocity` parameter
675-
#' \item [CellStatPlot()] — Statistical summaries and comparisons
675+
#' \item \code{\link{CellStatPlot}} — Statistical summaries and comparisons
676676
#' }
677677
#'
678678
#' @export

R/cellstatplot.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -272,9 +272,9 @@
272272
#'
273273
#' @seealso
274274
#' \itemize{
275-
#' \item [CellDimPlot()] — Dimension reduction visualization of
275+
#' \item \code{\link{CellDimPlot}} — Dimension reduction visualization of
276276
#' cell clusters
277-
#' \item [FeatureStatPlot()] — Feature expression statistics
277+
#' \item \code{\link{FeatureStatPlot}} — Feature expression statistics
278278
#' \item \code{\link[plotthis:BarPlot]{plotthis::BarPlot()}},
279279
#' \code{\link[plotthis:Heatmap]{plotthis::Heatmap()}},
280280
#' \code{\link[plotthis:SankeyPlot]{plotthis::SankeyPlot()}} —

R/chat.R

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@
7474
#' @importFrom rlang %||%
7575
#' @examples
7676
#' \donttest{
77+
#' if (FALSE) {
7778
#' # Setup LLM provider (requires an API key)
7879
#' provider <- tidyprompt::llm_provider_openai(
7980
#' parameters = list(model = "deepseek-v4-flash", stream = TRUE),
@@ -120,6 +121,7 @@
120121
#' # Clear history for a fresh conversation
121122
#' chat$clear_history()
122123
#' }
124+
#' }
123125
SCPlotterChat <- R6::R6Class(
124126
"SCPlotterChat",
125127
private = list(

R/clonalstatplot.R

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
#' evaluate within the context of each faceting/splitting group, enabling per-group
2323
#' selection of the most expanded clones, clones shared between conditions, or clones
2424
#' meeting custom abundance thresholds. See the \strong{Clone selection} section below
25-
#' and \code{\link{clone_selectors}} for full details.
25+
#' and \code{\link{CloneSelectors}} for full details.
2626
#'
2727
#' Clones can also be aggregated into named groups (by passing a named list to
2828
#' \code{clones}), where each group is defined by its own selection expression. In
@@ -49,7 +49,7 @@
4949
#' \item \code{gt(g1, g2)}, \code{lt(g1, g2)}, \code{eq(g1, g2)}, etc. — comparison-based selection
5050
#' }
5151
#' All selectors accept \code{group_by}, \code{top}, \code{order}, \code{within},
52-
#' and \code{output_within} arguments. See \code{\link{clone_selectors}} for
52+
#' and \code{output_within} arguments. See \code{\link{CloneSelectors}} for
5353
#' complete documentation.
5454
#' }
5555
#' \item{Named list of expressions}{Defines clone groups. Each element is a selection
@@ -231,7 +231,7 @@
231231
#' }
232232
#' @seealso
233233
#' \itemize{
234-
#' \item \code{\link{clone_selectors}} for the full clone selection expression system
234+
#' \item \code{\link{CloneSelectors}} for the full clone selection expression system
235235
#' \item \code{\link{ClonalCompositionPlot}} for visualizing clonal space composition (homeostasis)
236236
#' \item \code{\link{ClonalDiversityPlot}} for clonal diversity metrics
237237
#' \item \code{\link{ClonalGeneUsagePlot}} for V(D)J gene segment usage
@@ -421,7 +421,7 @@ ClonalStatPlot <- function(
421421
error = function(e) {
422422
stop(
423423
"Invalid clone selector expression: '", clones_expr, "'.\n",
424-
"See ?clone_selectors for available selector functions.\n",
424+
"See ?CloneSelectors for available selector functions.\n",
425425
"Parse error: ", e$message,
426426
call. = FALSE
427427
)

R/spatialplot.R

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1053,16 +1053,6 @@ SpatPlot.giotto <- function(
10531053
#' \code{\link[plotthis:SpatImagePlot]{plotthis::SpatImagePlot()}},
10541054
#' \code{\link[plotthis:SpatShapesPlot]{plotthis::SpatShapesPlot()}}
10551055
#' @export
1056-
#' @examples
1057-
#' \donttest{
1058-
#' # Feature plot on Visium data
1059-
#' data(stxBrain, package = "SeuratData")
1060-
#' SpatFeaturePlot(stxBrain, features = c("Hpca", "Ttr"))
1061-
#'
1062-
#' # Feature plot with image and shapes on FOV data
1063-
#' data(xenium_sub, package = "scplotter")
1064-
#' SpatFeaturePlot(xenium_sub, features = c("Bace2", "Gad1", "Nrg1"))
1065-
#' }
10661056
SpatFeaturePlot <- function(
10671057
object, fov = NULL, boundaries = NULL, image = NULL, masks = NULL, shapes = NULL, points = NULL,
10681058
ext = NULL, crop = TRUE, group_by = NULL, features = NULL, layer = NULL, scale_factor = NULL,
@@ -1207,14 +1197,6 @@ SpatFeaturePlot.giotto <- function(
12071197
#' \code{\link[Seurat:SpatialDimPlot]{Seurat::SpatialDimPlot()}},
12081198
#' \code{\link[Seurat:ImageDimPlot]{Seurat::ImageDimPlot()}}
12091199
#' @export
1210-
#' @examples
1211-
#' \donttest{
1212-
#' data(stxBrain, package = "SeuratData")
1213-
#' SpatDimPlot(stxBrain, group_by = "seurat_clusters")
1214-
#'
1215-
#' data(xenium_sub, package = "scplotter")
1216-
#' SpatDimPlot(xenium_sub, group_by = "cell_type")
1217-
#' }
12181200
SpatDimPlot <- function(
12191201
object, fov = NULL, boundaries = NULL, image = NULL, masks = NULL, shapes = NULL, points = NULL,
12201202
ext = NULL, crop = TRUE, group_by = NULL, features = NULL, layer = NULL, scale_factor = NULL,

man/CellDimPlot.Rd

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/CellStatPlot.Rd

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/CellVelocityPlot.Rd

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/ClonalStatPlot.Rd

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/SCPlotterChat.Rd

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)