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 @@

Graph plotting edge_width_by = "weight", show_label = TRUE) #> This graph was created by an old(er) igraph version. -#> Call upgrade_graph() on it to use with the current igraph version -#> For now we convert it on the fly... +#> Call `igraph::upgrade_graph()` on it to use with the current igraph version. +#> For now we convert it on the fly...

As mentioned the graph data can be provided from the metadata of the SummarizedExperiment.

@@ -506,7 +506,7 @@

Session info#> loaded via a namespace (and not attached): #> [1] splines_4.4.1 ggplotify_0.1.2 #> [3] tibble_3.2.1 polyclip_1.10-7 -#> [5] rpart_4.1.23 DirichletMultinomial_1.47.0 +#> [5] rpart_4.1.23 DirichletMultinomial_1.47.1 #> [7] lifecycle_1.0.4 lattice_0.22-6 #> [9] MASS_7.3-61 SnowballC_0.7.1 #> [11] backports_1.5.0 magrittr_2.0.3 @@ -528,13 +528,13 @@

Session info#> [43] UCSC.utils_1.1.0 farver_2.1.2 #> [45] lme4_1.1-35.5 ScaledMatrix_1.13.0 #> [47] viridis_0.6.5 base64enc_0.1-3 -#> [49] jsonlite_1.8.9 BiocNeighbors_1.99.2 +#> [49] jsonlite_1.8.9 BiocNeighbors_1.99.3 #> [51] decontam_1.25.0 tidygraph_1.3.1 #> [53] Formula_1.2-5 systemfonts_1.1.0 #> [55] tools_4.4.1 ggnewscale_0.5.0 #> [57] treeio_1.29.1 ragg_1.3.3 #> [59] Rcpp_1.0.13 glue_1.8.0 -#> [61] gridExtra_2.3 SparseArray_1.5.44 +#> [61] gridExtra_2.3 SparseArray_1.5.45 #> [63] xfun_0.48 mgcv_1.9-1 #> [65] dplyr_1.1.4 withr_3.0.1 #> [67] BiocManager_1.30.25 fastmap_1.2.0 @@ -560,7 +560,7 @@

Session info#> [107] desc_1.4.3 pillar_1.9.0 #> [109] grid_4.4.1 vctrs_0.6.5 #> [111] slam_0.1-54 BiocSingular_1.21.4 -#> [113] beachmat_2.21.6 cluster_2.1.6 +#> [113] beachmat_2.21.8 cluster_2.1.6 #> [115] beeswarm_0.4.0 htmlTable_2.4.3 #> [117] evaluate_1.0.1 mvtnorm_1.3-1 #> [119] cli_3.6.3 compiler_4.4.1 @@ -572,7 +572,7 @@

Session info#> [131] BiocParallel_1.39.0 munsell_0.5.1 #> [133] lazyeval_0.2.2 Matrix_1.7-0 #> [135] sparseMatrixStats_1.17.2 highr_0.11 -#> [137] igraph_2.0.3 memoise_2.0.1 +#> [137] igraph_2.1.1 memoise_2.0.1 #> [139] RcppParallel_5.1.9 bslib_0.8.0 #> [141] ggtree_3.13.1 ape_5.8 diff --git a/pkgdown.yml b/pkgdown.yml index e466690..b6361cf 100644 --- a/pkgdown.yml +++ b/pkgdown.yml @@ -3,4 +3,4 @@ pkgdown: 2.1.1 pkgdown_sha: ~ articles: miaViz: miaViz.html -last_built: 2024-10-17T17:22Z +last_built: 2024-10-21T10:16Z diff --git a/reference/index.html b/reference/index.html index 11c686d..9bb48b3 100644 --- a/reference/index.html +++ b/reference/index.html @@ -96,6 +96,10 @@

All functions plotPrevalence() plotPrevalentAbundance() plotRowPrevalence() plotTaxaPrevalence() plotFeaturePrevalence()

Plot prevalence information

+ +

plotScree()

+ +

Plot Scree Plot or Eigenvalues

plotSeries()

diff --git a/reference/plotGraph.html b/reference/plotGraph.html index 34d2a19..c340f61 100644 --- a/reference/plotGraph.html +++ b/reference/plotGraph.html @@ -288,8 +288,8 @@

Examples

edge.width.by = "weight", show.label = TRUE) #> This graph was created by an old(er) igraph version. -#> Call upgrade_graph() on it to use with the current igraph version -#> For now we convert it on the fly... +#> Call `igraph::upgrade_graph()` on it to use with the current igraph version. +#> For now we convert it on the fly... # plot the graph stored in the object @@ -308,8 +308,8 @@

Examples

edge.colour.by = "weight", edge.width.by = "weight") #> This graph was created by an old(er) igraph version. -#> Call upgrade_graph() on it to use with the current igraph version -#> For now we convert it on the fly... +#> Call `igraph::upgrade_graph()` on it to use with the current igraph version. +#> For now we convert it on the fly... # plot the graph stored in the object @@ -328,8 +328,8 @@

Examples

edge.colour.by = "weight", edge.width.by = "weight") #> This graph was created by an old(er) igraph version. -#> Call upgrade_graph() on it to use with the current igraph version -#> For now we convert it on the fly... +#> Call `igraph::upgrade_graph()` on it to use with the current igraph version. +#> For now we convert it on the fly... # plot the graph stored in the object and include some labels diff --git a/reference/plotScree-1.png b/reference/plotScree-1.png new file mode 100644 index 0000000..7d7eb7b Binary files /dev/null and b/reference/plotScree-1.png differ diff --git a/reference/plotScree.html b/reference/plotScree.html new file mode 100644 index 0000000..ba1d172 --- /dev/null +++ b/reference/plotScree.html @@ -0,0 +1,200 @@ + +Plot Scree Plot or Eigenvalues — plotScree • miaViz + + +
+
+ + + +
+
+ + +
+

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,
+  ...
+)
+
+ +
+

Arguments

+ + +
x
+

a +SingleCellExperiment +or a vector of eigenvalues.

+ + +
...
+

additional parameters for plotting

+ + +
dimred
+

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).

+ + +
show.barplot
+

Logical scalar. Whether to show a barplot. +(Default: TRUE).

+ + +
show.points
+

Logical scalar. Whether to show points. +(Default: TRUE).

+ + +
show.line
+

Logical scalar. Whether to show a line connecting points. +(Default: TRUE).

+ + +
show.labels
+

Logical scalar. Whether to show labels for each point. +(Default: FALSE).

+ + +
cumulative
+

Logical scalar. Whether to show cumulative explained +variance. (Default: FALSE).

+ + +
names
+

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.

+ +
+
+

Value

+

A ggplot2 object

+
+
+

Details

+

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.

+
+ +
+

Examples

+
# 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?
+
+
+
+
+
+ +
+ + +
+ +
+

Site built with pkgdown 2.1.1.

+
+ +
+ + + + + + + + diff --git a/reference/treeData.html b/reference/treeData.html index 9338381..3144fc8 100644 --- a/reference/treeData.html +++ b/reference/treeData.html @@ -189,18 +189,18 @@

Examples

#> #> # The associated data tibble abstraction: 38,431 × 4 #> # The 'node', 'label' and 'isTip' are from the phylo tree. -#> node label isTip test -#> <int> <chr> <lgl> <dbl> -#> 1 1 549322 TRUE -0.445 -#> 2 2 522457 TRUE -1.43 -#> 3 3 951 TRUE 0.784 -#> 4 4 244423 TRUE 0.508 -#> 5 5 586076 TRUE -0.864 -#> 6 6 246140 TRUE 0.416 -#> 7 7 143239 TRUE -0.0729 -#> 8 8 244960 TRUE 1.83 -#> 9 9 255340 TRUE 0.827 -#> 10 10 144887 TRUE -0.164 +#> node label isTip test +#> <int> <chr> <lgl> <dbl> +#> 1 1 549322 TRUE -0.847 +#> 2 2 522457 TRUE -0.442 +#> 3 3 951 TRUE 0.989 +#> 4 4 244423 TRUE 0.459 +#> 5 5 586076 TRUE -3.58 +#> 6 6 246140 TRUE -0.473 +#> 7 7 143239 TRUE 2.13 +#> 8 8 244960 TRUE 0.732 +#> 9 9 255340 TRUE -1.68 +#> 10 10 144887 TRUE 0.343 #> # ℹ 38,421 more rows diff --git a/sitemap.xml b/sitemap.xml index c8b9b03..a5f3a03 100644 --- a/sitemap.xml +++ b/sitemap.xml @@ -20,6 +20,7 @@ /reference/plotLoadings.html /reference/plotNMDS.html /reference/plotPrevalence.html +/reference/plotScree.html /reference/plotSeries.html /reference/plotTree.html /reference/treeData.html