PlotDendrogram: Plot a dendrogram and display node groups in colored modules

View source: R/PlotDendrogram.R

PlotDendrogramR Documentation

Plot a dendrogram and display node groups in colored modules

Description

Generate a dendrogram of nodes with dissimilarity based on topological overlap, and group nodes into modules indicated by colors.

Usage

PlotDendrogram(Adj_directed, minModuleSize, groupLabels = " ", 
               dendroLabels = FALSE, hclustHang = 0.03, 
               dendroAddGuide = FALSE, dendroGuideHang = 0.05, 
               dendroMain = "Dendrogram with modules of nodes in colors", ...)

Arguments

Adj_directed

Adjacency matrix from directed graph

minModuleSize

Minimum module size.

groupLabels

Argument for plotDendroAndColors. Labels for the colorings given in colors. The labels will be printed to the left of the color rows in the plot.

dendroLabels

Argument for plotDendroAndColors. Dendrogram labels.

hclustHang

Argument hang for plot.hclust. The fraction of the plot height by which labels should hang below the rest of the plot.

dendroAddGuide

Argument addGuide for plotDendroAndColors. Logical: should vertical "guide lines" be added to the dendrogram plot? The lines make it easier to identify color codes with individual samples.

dendroGuideHang

Argument guideHang for plotDendroAndColors. The fraction of the dendrogram height to leave between the top end of the guide line and the dendrogram merge height.

dendroMain

Argument main for plot.hclust. Title of the plot.

...

Additional plotting arguments for plotDendroAndColors and plot.hclust.

Value

A list containing the graph objects as follows:

  • PlotDendrogramObj: An object of class "graph" of the estimated graph.

  • dynamicColors: A list of colors with corresponding nodes.

  • GroupMods: Dynamic tree cut to identify modules whose phenotype profiles are very similar.

  • GroupModsColors: A table for number of nodes with corresponding colors.

  • Adj_symmetric_matrix: A symmetric matrix from ddjacency matrix of directed graph.

Author(s)

Md Bahadur Badsha (mbbadshar@gmail.com)

References

1. Badsha MB, Martin EA and Fu AQ (2021). MRPC: An R package for inference of causal graphs. Frontiers in Genetics, 10:651812.

See Also

MRPC.

Examples

## Not run: 
# Adjacency matrix from directed example graph
Adj_directed <- as(data_examples$complex$cont$withGV$graph,
                   "matrix")

# Plot of dendrogram with modules colors of nodes
PlotDendrogramObj <- PlotDendrogram(Adj_directed,
                                    minModuleSize = 5)
                                    

## End(Not run)

MRPC documentation built on April 11, 2022, 5:10 p.m.