Description Usage Arguments Value Author(s) References See Also Examples
View source: R/functions.public.R
Plots the coexpression and/or mutual information network for the given genes.
1 2 3 4 5 6 | plotNetwork(genesNetwork, classificationGenes=NULL, genesRanking=NULL,
genesInfo=NULL, geneLabels=NULL, returniGraphs=FALSE,
plotType="dynamic", fileName=NULL,
plotAllNodesNetwork=TRUE, plotOnlyConnectedNodesNetwork=FALSE,
plotClassifcationGenesNetwork=FALSE,
labelSize=0.5, vertexSize=NULL, width=NULL, height=NULL, verbose=TRUE)
|
genesNetwork |
List of GenesNetwork returned by |
classificationGenes |
Matrix or classificationGenes returned by |
genesRanking |
Matrix or genesRanking returned by |
genesInfo |
List or data.frame with the properties of the genes to plot: |
geneLabels |
Vector or Matrix. Gene name, ID or label which should be shown in the returned results and plots. |
returniGraphs |
deprecated. A list with the plotted networks as igraph objects is always returned (see |
plotType |
Character. "dynamic": Interactive plot. "static": One canvas split for the different networks. "pdf": All the networks are saved into a pdf file. |
fileName |
Character. File name to save the plot with. If not provided, the plots will be shown through the standard output device. |
plotAllNodesNetwork |
Logical. If TRUE, plots a network only with all the available genes |
plotOnlyConnectedNodesNetwork |
Logical. If TRUE, plots a network only with the connected nodes/genes |
plotClassifcationGenesNetwork |
Logical. If TRUE, plots a network only with the classification genes |
labelSize |
Integer. Gene/node label size for static and pdf plots. |
vertexSize |
Integer. Vertex minimum size. |
width |
Numeric. Dinamic or pdf plot width. |
height |
Numeric. Dinamic or pdf plot height. |
verbose |
Logical. If TRUE, messages indicating the execution progress will be shown. |
Graph list |
List with the plotted |
Network plots |
Shown throught the standard output devide or saved in the working directory as 'fileName.pdf' if |
Bioinformatics and Functional Genomics Group. Centro de Investigacion del Cancer (CIC-IBMCC, USAL-CSIC). Salamanca. Spain
Main package function and classifier training:
geNetClassifier
Package igraph
plot.GenesNetwork()
is an alias to this function. It can allso be called as i.e. plotNetwork(clGenesSubNet$ALL)
Note: The slot @genesNetwork returned by geNetClassifier is a List of GenesNetworks!
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 | data(leukemiasClassifier)
# Step 1: Select a network or sub network
# Sub-network containing only the classification genes:
clGenesSubNet <- getSubNetwork(leukemiasClassifier@genesNetwork,
leukemiasClassifier@classificationGenes)
# Step 2: Select the details/info about the genes to plot
# Classification genes' info:
clGenesInfo <- genesDetails(leukemiasClassifier@classificationGenes)
# Step 3: Plot the network
# Network plots can be interactive or plotted as PDF file.
# - - Use plotType="pdf" to save the network as a static pdf file.
# This option is recommended for getting an overview of several networks.
# - - To get an interactive network, just skip this argument.
# Plot ALL network:
plotNetwork(clGenesSubNet$ALL, genesInfo=clGenesInfo)
# Plot AML network containing only the conected nodes:
plotNetwork(clGenesSubNet$ALL, genesInfo=clGenesInfo,
plotAllNodesNetwork=FALSE, plotOnlyConnectedNodesNetwork=TRUE)
# The equivalent code to the plot geNetClassifier creates by default is:
topRanking <- getTopRanking(leukemiasClassifier@genesRanking, numGenesClass=100)
netTopGenes <- getSubNetwork(leukemiasClassifier@genesNetwork,
getRanking(topRanking, showGeneID=TRUE)$geneID)
plotNetwork(netTopGenes, classificationGenes=leukemiasClassifier@classificationGenes,
genesRanking=topRanking, plotAllNodesNetwork=TRUE,
plotOnlyConnectedNodesNetwork=TRUE, plotType="pdf",
labelSize=0.3, fileName="leukemiasClassifier")
# In order to save the network as text file, you can use:
network2txt(leukemiasClassifier@genesNetwork, filePrefix="leukemiasNetwork")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.