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")
Run the code above in your browser using DataLab