diff --git a/articles/miaViz.html b/articles/miaViz.html index 4124008..c1dc72c 100644 --- a/articles/miaViz.html +++ b/articles/miaViz.html @@ -293,8 +293,8 @@
As mentioned the graph data can be provided from the
metadata
of the SummarizedExperiment
.
plotPrevalence()
plotPrevalentAbundance()
plotRowPrevalence()
plotTaxaPrevalence()
plotFeaturePrevalence()
Plot prevalence information
Plot Scree Plot or Eigenvalues
plotScree.Rd
plotScree
creates a scree plot or eigenvalues plot starting from a
+SingleCellExperiment object or a vector of eigenvalues. This visualization
+shows how the eigenvalues decrease across components.
plotScree(x, ...)
+
+# S4 method for class 'SingleCellExperiment'
+plotScree(
+ x,
+ dimred,
+ show.barplot = TRUE,
+ show.points = TRUE,
+ show.line = TRUE,
+ show.labels = FALSE,
+ cumulative = FALSE,
+ ...
+)
+
+# S4 method for class 'vector'
+plotScree(
+ x,
+ names = NULL,
+ show.barplot = TRUE,
+ show.points = TRUE,
+ show.line = TRUE,
+ show.labels = FALSE,
+ cumulative = FALSE,
+ ...
+)
a
+SingleCellExperiment
+or a vector of eigenvalues.
additional parameters for plotting
Character scalar
or integer scalar
. Determines
+the reduced dimension to plot. This is used when x is a SingleCellExperiment
+to extract the eigenvalues from reducedDim(x, dimred)
.
Logical scalar
. Whether to show a barplot.
+(Default: TRUE
).
Logical scalar
. Whether to show points.
+(Default: TRUE
).
Logical scalar
. Whether to show a line connecting points.
+(Default: TRUE
).
Logical scalar
. Whether to show labels for each point.
+(Default: FALSE
).
Logical scalar
. Whether to show cumulative explained
+variance. (Default: FALSE
).
Character vector
. Optional names for the components
+that will be displayed on the x-axis. If not provided, the components
+are labeled sequentially as 1, 2, 3, etc.
A ggplot2
object
plotScree
creates a scree plot or eigenvalues plot, which is useful
+for visualizing the relative importance of components in dimensionality
+reduction techniques like PCA, RDA, or CCA. When the input is a
+SingleCellExperiment, the function extracts eigenvalues from the specified
+reduced dimension slot. When the input is a vector, it directly uses these
+values as eigenvalues.
The plot can include a combination of barplot, points, connecting lines,
+and labels, which can be controlled using the show.*
parameters.
An option to show cumulative explained variance is also available by setting
+cumulative = TRUE
.
# Load necessary libraries
+library(ggplot2)
+
+# Load dataset
+library(miaViz)
+data("enterotype", package = "mia")
+tse <- enterotype
+
+# Run RDA and store results into TreeSE
+tse <- addRDA(
+ tse,
+ formula = assay ~ ClinicalStatus + Gender + Age,
+ FUN = getDissimilarity,
+ distance = "bray",
+ na.action = na.exclude
+ )
+
+# Plot scree plot
+plotScree(tse, "RDA")
+#> `geom_line()`: Each group consists of only one observation.
+#> ℹ Do you need to adjust the group aesthetic?
+
+
+