relations.comparison: Produce an igraph network with different colors to compare...

Description Usage Arguments Value Examples

View source: R/Visualization.R

Description

For two graphs, red edges will be the common ones. It is used to compare two methods with one another, or two experimental conditions of a same set of genes for example.

Usage

1
relations.comparison(g1, g2, g1.name, g2.name, display, color.g1, color.g2)

Arguments

g1

igraph class object.

g2

igraph class object.

g1.name

Character string to be displayed on the legend of the graph for the first graph.

g2.name

Character string to be displayed on the legend of the graph for the second graph.

display

Logical value.

color.g1

Character string for a color to be displayed onto the g1 edges. By default the color is "blue".

color.g2

Character string for a color to be displayed onto the g2 edges. By default the color is "darkgreen".

TRUE if you want to to display the graph, otherwise it will be stocked as an object.

Value

igraph class object with colored edges.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
# Creating two datasets
# Import the dataset
Data = matrix(runif(5000, 10, 100), ncol=20)
group = paste0(rep(c("control", "case"), each = 10),rep(c(1:10),each = 1))
genes <- paste0(rep(LETTERS[1:25], each=10), rep(c(1:10),each = 1))
colnames(Data) = group
row.names(Data) = genes 
# Computing relation network
#G.spearman = Make.df.graph(Data, cor.threshold = 0.25, Pvalue.threshold = F, 
#                                                      method = "spearman")
#G.kendall = Make.df.graph(Data, cor.threshold = 0.25, Pvalue.threshold = F, 
#                                                  method = "kendall")
# Comparing both relation network
#G.comp = relations.comparison(g1 = G.spearman, g2 = G.kendall,  
#                              g1.name = "Spearman", 
#                              g2.name = "kendall", 
#                              display = T)

jtcasemajor/GENEXPRESSO documentation built on Dec. 21, 2021, 4:11 a.m.