Browse code

Advance GraphPlot family

Giulio Benedetti authored on 10/03/2025 08:48:13
Showing 1 changed files
... ...
@@ -11,11 +11,11 @@ ColumnGraphPlot class, where any slot and its value can be passed to
11 11
 \code{...} as a named argument.
12 12
 }
13 13
 \description{
14
-Hierarchical tree for the rows of a
15
-\code{\link[TreeSummarizedExperiment:TreeSummarizedExperiment-constructor]{TreeSummarizedExperiment}}
16
-object. The tree can be produced with \code{\link[mia:taxonomy-methods]{addTaxonomyTree}}
17
-and gets stored in the \code{\link[TreeSummarizedExperiment:rowLinks]{rowTree}}
18
-slot of the experiment object. The panel implements \code{\link[miaViz:plotTree]{plotRowTree}}
14
+Network organisation for the samples of a
15
+\code{\link[SummarizedExperiment:SummarizedExperiment-class]{SummarizedExperiment}}
16
+object. The igraph should be stored in the \code{metadata} slot by a name
17
+containing \code{"graph"}. This panel uses
18
+\code{\link[miaViz:plotColGraph]{plotColGraph}}
19 19
 to generate the plot.
20 20
 }
21 21
 \section{Slot overview}{
... ...
@@ -25,10 +25,17 @@ This class inherits all slots from its parent class \linkS4class{GraphPlot}.
25 25
 }
26 26
 
27 27
 \examples{
28
-# Import TreeSE
29 28
 library(mia)
30
-data("Tengeler2020", package = "mia")
31
-tse <- Tengeler2020
29
+library(miaViz)
30
+data("GlobalPatterns", library = "mia")
31
+data("col_graph", library = "miaViz")
32
+
33
+tse <- GlobalPatterns
34
+tse <- agglomerateByRank(tse,
35
+                         rank = "Genus",
36
+                         na.rm = TRUE)
37
+                         
38
+metadata(tse)$graph <- col_graph
32 39
 
33 40
 # Store panel into object
34 41
 panel <- ColumnGraphPlot()
... ...
@@ -40,6 +47,10 @@ if (interactive()) {
40 47
   iSEE(tse, initial = c(panel))
41 48
 }
42 49
 
50
+}
51
+\seealso{
52
+\linkS4class{GraphPlot}
53
+\linkS4class{RowGraphPlot}
43 54
 }
44 55
 \author{
45 56
 Giulio Benedetti
Browse code

Add GraphPlot panel and extend catalogue

Giulio Benedetti authored on 09/03/2025 10:47:52
Showing 1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,46 @@
1
+% Generated by roxygen2: do not edit by hand
2
+% Please edit documentation in R/AllClasses.R, R/class-ColumnGraphPlot.R
3
+\docType{class}
4
+\name{ColumnGraphPlot-class}
5
+\alias{ColumnGraphPlot-class}
6
+\alias{ColumnGraphPlot}
7
+\title{Column graph plot}
8
+\value{
9
+The \code{ColumnGraphPlot(...)} constructor creates an instance of a
10
+ColumnGraphPlot class, where any slot and its value can be passed to
11
+\code{...} as a named argument.
12
+}
13
+\description{
14
+Hierarchical tree for the rows of a
15
+\code{\link[TreeSummarizedExperiment:TreeSummarizedExperiment-constructor]{TreeSummarizedExperiment}}
16
+object. The tree can be produced with \code{\link[mia:taxonomy-methods]{addTaxonomyTree}}
17
+and gets stored in the \code{\link[TreeSummarizedExperiment:rowLinks]{rowTree}}
18
+slot of the experiment object. The panel implements \code{\link[miaViz:plotTree]{plotRowTree}}
19
+to generate the plot.
20
+}
21
+\section{Slot overview}{
22
+
23
+
24
+This class inherits all slots from its parent class \linkS4class{GraphPlot}.
25
+}
26
+
27
+\examples{
28
+# Import TreeSE
29
+library(mia)
30
+data("Tengeler2020", package = "mia")
31
+tse <- Tengeler2020
32
+
33
+# Store panel into object
34
+panel <- ColumnGraphPlot()
35
+# View some adjustable parameters
36
+head(slotNames(panel))
37
+
38
+# Launch iSEE with custom initial panel
39
+if (interactive()) {
40
+  iSEE(tse, initial = c(panel))
41
+}
42
+
43
+}
44
+\author{
45
+Giulio Benedetti
46
+}