Learn R Programming

predictionet (version 1.18.0)

netinf2gml: Function to create an igraph object and export a network to a GML readable by Cytoscape

Description

This function creates, from a network inferred from netinf or netinf.cv, an igraph object and export this network to a GML readable by Cytoscape.

Usage

netinf2gml(object, edge.info, node.info, file = "predictionet")

Arguments

object
object returns by netinf or netinf.cv
edge.info
matrix of values representing the statistics for each edge; parents in rows, children in columns. A list of matrices could be provided, names of the list will then be used to describe the statistics in Cytoscape
node.info
vector of values representing the statistics for each node; parents in rows, children in columns. A list of vectors could be provided, names of the list will then be used to describe the statistics in Cytoscape
file
name of the GML file to be saved.

Value

an igraph object

Details

The GML file created by this function has been tested on Cytoscape 2.8.1; a Vizmap property file of the same name is also created and could be imported into Cytoscape ("preditionet_vizmap2") so the information for each node and edge are displayed correctly.

See Also

\codeRCytoscape

Examples

Run this code
## load gene expression data for colon cancer data, list of genes related to RAS signaling pathway and the corresponding priors
data(expO.colon.ras)
## number of genes to select for the analysis
genen <- 10
## select only the top genes
goi <- dimnames(annot.ras)[[1]][order(abs(log2(annot.ras[ ,"fold.change"])), decreasing=TRUE)[1:genen]]
mydata <- data.ras[ , goi, drop=FALSE]
myannot <- annot.ras[goi, , drop=FALSE]
mypriors <- priors.ras[goi, goi, drop=FALSE]
mydemo <- demo.ras
## infer global network from data and priors
mynet <- netinf.cv(data=mydata, categories=3, priors=mypriors, priors.count=TRUE, priors.weight=0.5, maxparents=3, method="regrnet", nfold=3, seed=54321)

## create an igraph obkect and export it into a GML file
## Not run: netinf2gml(object=mynet, file = "predictionet")

Run the code above in your browser using DataLab