Title: | Co-Expression Differential Network Analysis |
---|---|
Description: | Categorize links and nodes from multiple networks in 3 categories: Common links (alpha) specific links (gamma), and different links (beta). Also categorizes the links into sub-categories and groups. The package includes a visualization tool for the networks. More information about the methodology can be found at: Gysi et. al., 2018 <arXiv:1802.00828>. |
Authors: | Deisy Morselli Gysi, Tiago de Miranda Fragoso, Eivind Almaas and Katja Nowick. |
Maintainer: | Deisy Morselli Gysi <[email protected]> |
License: | GPL-2 |
Version: | 1.1.2 |
Built: | 2024-12-13 06:37:03 UTC |
Source: | CRAN |
Converts the CoDiNA.plot into an igraph object.
as.igraph(x)
as.igraph(x)
x |
the output from the function plot. |
the CoDiNA plot as an igraph object.
Deisy Morselli Gysi <deisy at bioinf.uni-leipzig.de>
suppressWarnings(RNGversion("3.5.0")) Nodes = LETTERS[1:10] Net1 = data.frame(Node.1 = sample(Nodes) , Node.2 = sample(Nodes), wTO = runif(10,-1,1)) Net2 = data.frame(Node.1 = sample(Nodes) , Node.2 = sample(Nodes), wTO = runif(10,-1,1)) Net3 = data.frame(Node.1 = sample(Nodes) , Node.2 = sample(Nodes), wTO = runif(10,-1,1)) DiffNet = MakeDiffNet (Data = list(Net1,Net2,Net3), Code = c('Net1', 'Net2', 'Net3') ) Graph = plot(x = DiffNet, layout = NULL, smooth.edges = TRUE, path = NULL, MakeGroups = FALSE, Cluster = FALSE, legend = TRUE, manipulation = FALSE, sort.by.Phi = FALSE) x = as.igraph(Graph) plot(x)
suppressWarnings(RNGversion("3.5.0")) Nodes = LETTERS[1:10] Net1 = data.frame(Node.1 = sample(Nodes) , Node.2 = sample(Nodes), wTO = runif(10,-1,1)) Net2 = data.frame(Node.1 = sample(Nodes) , Node.2 = sample(Nodes), wTO = runif(10,-1,1)) Net3 = data.frame(Node.1 = sample(Nodes) , Node.2 = sample(Nodes), wTO = runif(10,-1,1)) DiffNet = MakeDiffNet (Data = list(Net1,Net2,Net3), Code = c('Net1', 'Net2', 'Net3') ) Graph = plot(x = DiffNet, layout = NULL, smooth.edges = TRUE, path = NULL, MakeGroups = FALSE, Cluster = FALSE, legend = TRUE, manipulation = FALSE, sort.by.Phi = FALSE) x = as.igraph(Graph) plot(x)
This data.table contains node and the weighted topological overlap (wTO) of Transcription Factors (TFs), from GSE4290 (Sun, 2006) for 50 brain samples with ASTgodendrogliomas. The wTO was calculated using the package wTO.
data("AST")
data("AST")
A data frame with 3488761 observations on the following 3 variables.
Node.1
a factor with levels. TF names
Node.2
a factor with levels. TF names
cor
a numeric vector. wTO values calculated using only the TFs
https://www.ncbi.nlm.nih.gov/geo/query/acc.cgi?acc=gse4290
Sun L, Hui AM, Su Q, Vortmeyer A et al. Neuronal and glioma-derived stem cell factor induces angiogenesis within the brain. Cancer Cell 2006 Apr;9(4):287-300. PMID: 16616334
data(AST) str(AST)
data(AST) str(AST)
Categorize the Nodes into Phi and Phi tilde.
ClusterNodes(DiffNet, cutoff.external = 0.8, cutoff.internal = 0.5)
ClusterNodes(DiffNet, cutoff.external = 0.8, cutoff.internal = 0.5)
DiffNet |
The Differential network from MakeDiffNet |
cutoff.external |
The cut-off between the clusters (delta from the center to the edge coordinates), the closer to 1, the better. |
cutoff.internal |
The cut-off inside the clusters (delta from the theoretical cluster to the edge coordinates), the closer to zero, the better. |
DiffNet = MakeDiffNet (Data = list(CTR, AST), Code = c('CTR', 'AST') ) Genes_Phi = ClusterNodes(DiffNet, cutoff.external = 0.5, cutoff.internal = 0.25) table(Genes_Phi$Phi_tilde)
DiffNet = MakeDiffNet (Data = list(CTR, AST), Code = c('CTR', 'AST') ) Genes_Phi = ClusterNodes(DiffNet, cutoff.external = 0.5, cutoff.internal = 0.25) table(Genes_Phi$Phi_tilde)
This data.table contains node and the weighted topological overlap (wTO) of Transcription Factors (TFs), from GSE4290 (Sun, 2006) for 23 brain samples with Controls. The wTO was calculated using the package wTO.
data("CTR")
data("CTR")
A data frame with 3488761 observations on the following 3 variables.
Node.1
a factor with levels. TF names
Node.2
a factor with levels. TF names
cor
a numeric vector. wTO values calculated using only the TFs
https://www.ncbi.nlm.nih.gov/geo/query/acc.cgi?acc=gse4290
Sun L, Hui AM, Su Q, Vortmeyer A et al. Neuronal and glioma-derived stem cell factor induces angiogenesis within the brain. Cancer Cell 2006 Apr;9(4):287-300. PMID: 16616334
data(CTR) str(CTR)
data(CTR) str(CTR)
This data.table contains node and the weighted topological overlap (wTO) of Transcription Factors (TFs), from GSE4290 (Sun, 2006) for 81 brain samples with glioblastomas. The wTO was calculated using the package wTO.
data("GLI")
data("GLI")
A data frame with 3488761 observations on the following 3 variables.
Node.1
a factor with levels. TF names
Node.2
a factor with levels. TF names
cor
a numeric vector. wTO values calculated using only the TFs
https://www.ncbi.nlm.nih.gov/geo/query/acc.cgi?acc=gse4290
Sun L, Hui AM, Su Q, Vortmeyer A et al. Neuronal and glioma-derived stem cell factor induces angiogenesis within the brain. Cancer Cell 2006 Apr;9(4):287-300. PMID: 16616334
data(GLI) str(GLI)
data(GLI) str(GLI)
Categorize links into Phi categories, calculate the distance to the center and also normlize the distance into some categories: Phi and Phi tilda, group and all.
MakeDiffNet(Data, Code, cutoff = 0.33, stretch = TRUE)
MakeDiffNet(Data, Code, cutoff = 0.33, stretch = TRUE)
Data |
List of data.frames containig Node.1, Node.2 and the correlation value |
Code |
Name of each one of the networks. |
cutoff |
By default, the cutoff is 0.33. If the user wants to use another value, it has to be cited on the description of the used methodology that the cutoff was changed. |
stretch |
Should the input data be normalized? Default to TRUE. |
Returns a data.table contating: Nodes names, correlation value for each network (the input values), the k means cluster that link belongs, the Phi groups (Phi and Phi tilda), the signed group that link belongs to, the unsigned group. The distance to the center, and the distance normalized by: Phi_tilda, Phi, signed group or all data.
Deisy Morselli Gysi <deisy at bioinf.uni-leipzig.de>
suppressWarnings(RNGversion("3.5.0")) Nodes = LETTERS[1:20] Net1 = data.frame(Node.1 = sample(Nodes) , Node.2 = sample(Nodes), wTO = runif(10,-1,1)) Net2 = data.frame(Node.1 = sample(Nodes) , Node.2 = sample(Nodes), wTO = runif(10,-1,1)) Net3 = data.frame(Node.1 = sample(Nodes) , Node.2 = sample(Nodes), wTO = runif(10,-1,1)) DiffNet = MakeDiffNet (Data = list(Net1,Net2,Net3), Code = c('Net1', 'Net2', 'Net3') ) print(DiffNet)
suppressWarnings(RNGversion("3.5.0")) Nodes = LETTERS[1:20] Net1 = data.frame(Node.1 = sample(Nodes) , Node.2 = sample(Nodes), wTO = runif(10,-1,1)) Net2 = data.frame(Node.1 = sample(Nodes) , Node.2 = sample(Nodes), wTO = runif(10,-1,1)) Net3 = data.frame(Node.1 = sample(Nodes) , Node.2 = sample(Nodes), wTO = runif(10,-1,1)) DiffNet = MakeDiffNet (Data = list(Net1,Net2,Net3), Code = c('Net1', 'Net2', 'Net3') ) print(DiffNet)
Normalize a given variable.
normalize(m)
normalize(m)
m |
variable to be normalized in the interval [0,1] |
Deisy Morselli Gysi <deisy at bioinf.uni-leipzig.de>
Z = runif(10,-10,10) normalize(Z)
Z = runif(10,-10,10) normalize(Z)
This data.table contains node and the weighted topological overlap (wTO) of Transcription Factors (TFs), from GSE4290 (Sun, 2006) for 50 brain samples with oligodendrogliomas. The wTO was calculated using the package wTO.
data("OLI")
data("OLI")
A data frame with 3488761 observations on the following 3 variables.
Node.1
a factor with levels. TF names
Node.2
a factor with levels. TF names
cor
a numeric vector. wTO values calculated using only the TFs
https://www.ncbi.nlm.nih.gov/geo/query/acc.cgi?acc=gse4290
Sun L, Hui AM, Su Q, Vortmeyer A et al. Neuronal and glioma-derived stem cell factor induces angiogenesis within the brain. Cancer Cell 2006 Apr;9(4):287-300. PMID: 16616334
data(OLI) str(OLI)
data(OLI) str(OLI)
Sorts each link's Nodes by the smallest value. Removes links that both nodes are the same.
OrderNames(M)
OrderNames(M)
M |
data.frame to have the names ordered. Node.1, Node.2 and correlation value. |
a data.table whith Node.1 and Node.2, sorted by the smallest value between both.
Deisy Morselli Gysi <deisy at bioinf.uni-leipzig.de>
Nodes = LETTERS[1:10] Z = data.frame(Node.1 = sample(Nodes) , Node.2 = sample(Nodes), cor = runif(10,-1,1)) OrderNames(Z)
Nodes = LETTERS[1:10] Z = data.frame(Node.1 = sample(Nodes) , Node.2 = sample(Nodes), cor = runif(10,-1,1)) OrderNames(Z)
Categorize the Nodes into Phi and groups categories. Also, creates an interactive view of the CoDiNA network.
## S3 method for class 'CoDiNA' plot( x, cutoff.external = 0, cutoff.internal = 1, cutoff.ratio = 1, layout = NULL, smooth.edges = TRUE, path = NULL, MakeGroups = FALSE, Cluster = FALSE, legend = TRUE, manipulation = FALSE, sort.by.Phi = FALSE, ... )
## S3 method for class 'CoDiNA' plot( x, cutoff.external = 0, cutoff.internal = 1, cutoff.ratio = 1, layout = NULL, smooth.edges = TRUE, path = NULL, MakeGroups = FALSE, Cluster = FALSE, legend = TRUE, manipulation = FALSE, sort.by.Phi = FALSE, ... )
x |
Output from MakeDiffNet |
cutoff.external |
The cut-off between the clusters (delta from the center to the edge coordinates), the closer to 1, the better. |
cutoff.internal |
The cut-off inside the clusters (delta from the theoretical cluster to the edge coordinates), the closer to zero, the better. |
cutoff.ratio |
The cut-off for the ratio of both scores. Default is set to 1. The greater, the better. |
layout |
a layout from the igraph package. |
smooth.edges |
If the edges should be smoothed or not. |
path |
If the graph should be saved specify the name of the file. |
MakeGroups |
algorithm to find clusters. One of the followings: walktrap, optimal, spinglass, edge.betweenness, fast_greedy, infomap, louvain, label_prop, leading_eigen. Default to FALSE. |
Cluster |
TRUE or FALSE if the nodes should be clustered (double click to uncluster). |
legend |
TRUE or FALSE if the legend should appear. |
manipulation |
TRUE or FALSE if the graph should be editable. |
sort.by.Phi |
if the graph should be plotted in the Phi order |
... |
Additional plotting parameters. |
Returns a list contatining: The nodes description, the Edges description and the network graph.
Deisy Morselli Gysi <deisy at bioinf.uni-leipzig.de>
suppressWarnings(RNGversion("3.5.0")) Nodes = LETTERS[1:10] Net1 = data.frame(Node.1 = sample(Nodes) , Node.2 = sample(Nodes), wTO = runif(10,-1,1)) Net2 = data.frame(Node.1 = sample(Nodes) , Node.2 = sample(Nodes), wTO = runif(10,-1,1)) Net3 = data.frame(Node.1 = sample(Nodes) , Node.2 = sample(Nodes), wTO = runif(10,-1,1)) DiffNet = MakeDiffNet (Data = list(Net1,Net2,Net3), Code = c('Net1', 'Net2', 'Net3') ) Graph = plot(x = DiffNet, layout = NULL, smooth.edges = TRUE, path = NULL, MakeGroups = FALSE, Cluster = FALSE, legend = TRUE, manipulation = FALSE, sort.by.Phi = FALSE) Graph
suppressWarnings(RNGversion("3.5.0")) Nodes = LETTERS[1:10] Net1 = data.frame(Node.1 = sample(Nodes) , Node.2 = sample(Nodes), wTO = runif(10,-1,1)) Net2 = data.frame(Node.1 = sample(Nodes) , Node.2 = sample(Nodes), wTO = runif(10,-1,1)) Net3 = data.frame(Node.1 = sample(Nodes) , Node.2 = sample(Nodes), wTO = runif(10,-1,1)) DiffNet = MakeDiffNet (Data = list(Net1,Net2,Net3), Code = c('Net1', 'Net2', 'Net3') ) Graph = plot(x = DiffNet, layout = NULL, smooth.edges = TRUE, path = NULL, MakeGroups = FALSE, Cluster = FALSE, legend = TRUE, manipulation = FALSE, sort.by.Phi = FALSE) Graph
Print on the screen the number of nodes and edges. To see the data.frame, call: data.frame().
## S3 method for class 'CoDiNA' print(x, ...)
## S3 method for class 'CoDiNA' print(x, ...)
x |
Output from MakeDiffNet |
... |
Additional plotting parameters. |
Print on the screen the number of nodes and edges.
Deisy Morselli Gysi <deisy at bioinf.uni-leipzig.de>
Nodes = LETTERS[1:10] Net1 = data.frame(Node.1 = sample(Nodes) , Node.2 = sample(Nodes), wTO = runif(10,-1,1)) Net2 = data.frame(Node.1 = sample(Nodes) , Node.2 = sample(Nodes), wTO = runif(10,-1,1)) Net3 = data.frame(Node.1 = sample(Nodes) , Node.2 = sample(Nodes), wTO = runif(10,-1,1)) DiffNet = MakeDiffNet (Data = list(Net1,Net2,Net3), Code = c('Net1', 'Net2', 'Net3') ) print(DiffNet)
Nodes = LETTERS[1:10] Net1 = data.frame(Node.1 = sample(Nodes) , Node.2 = sample(Nodes), wTO = runif(10,-1,1)) Net2 = data.frame(Node.1 = sample(Nodes) , Node.2 = sample(Nodes), wTO = runif(10,-1,1)) Net3 = data.frame(Node.1 = sample(Nodes) , Node.2 = sample(Nodes), wTO = runif(10,-1,1)) DiffNet = MakeDiffNet (Data = list(Net1,Net2,Net3), Code = c('Net1', 'Net2', 'Net3') ) print(DiffNet)
summary of the CoDiNA network.
## S3 method for class 'CoDiNA' summary(object, ...)
## S3 method for class 'CoDiNA' summary(object, ...)
object |
Output from MakeDiffNet |
... |
Additional plotting parameters. |
Returns a summary describing the network.
Deisy Morselli Gysi <deisy at bioinf.uni-leipzig.de>
Nodes = LETTERS[1:10] Net1 = data.frame(Node.1 = sample(Nodes) , Node.2 = sample(Nodes), wTO = runif(10,-1,1)) Net2 = data.frame(Node.1 = sample(Nodes) , Node.2 = sample(Nodes), wTO = runif(10,-1,1)) Net3 = data.frame(Node.1 = sample(Nodes) , Node.2 = sample(Nodes), wTO = runif(10,-1,1)) DiffNet = MakeDiffNet (Data = list(Net1,Net2,Net3), Code = c('Net1', 'Net2', 'Net3') ) summary(DiffNet)
Nodes = LETTERS[1:10] Net1 = data.frame(Node.1 = sample(Nodes) , Node.2 = sample(Nodes), wTO = runif(10,-1,1)) Net2 = data.frame(Node.1 = sample(Nodes) , Node.2 = sample(Nodes), wTO = runif(10,-1,1)) Net3 = data.frame(Node.1 = sample(Nodes) , Node.2 = sample(Nodes), wTO = runif(10,-1,1)) DiffNet = MakeDiffNet (Data = list(Net1,Net2,Net3), Code = c('Net1', 'Net2', 'Net3') ) summary(DiffNet)