Learn R Programming

HTSanalyzeR (version 2.24.0)

plotSubNet: Plot and save a figure of the enriched subnetwork

Description

This is an generic function.

When implemented as the S4 method for class NWA, this function invokes the function networkPlot to plot and save the subnetwork identified by the 'BioNet' package.

To use this function for objects of class NWA:

plotSubNet(object, filepath, filename, output, ...)

Usage

plotSubNet(object, ...)

Arguments

object
an object. When implemented as S4 methods of class NWA, this argument is an object of class NWA.
...
other arguments. (see below for the arguments supported by the method of class NWA)

Details

After the analyses step for an object of class 'NWA', users can generate the enriched subnetwork identified by the 'BioNet' package. If the slot 'phenotype' was inputted when initializing the object, this function will send it to the function networkPlot as the argument phenotypeVector to highlight nodes in different colors. If the argument species of the function analyze has been assigned, labels of nodes of this subnetwork will be mapped to gene symbols corresponding to the species; otherwise, Entrez identifiers will be used as the labels.

See Also

networkPlot, viewSubNet, analyze

Examples

Run this code
## Not run: 
# library(BioNet)
# ##load p-values and phenotypes
# data("KcViab_Data4Enrich","KcViab_PVals")
# ##load Biogrid interactome for Drosophila Melanogaster
# data("Biogrid_DM_Interactome")
# ##create a NWA (NetWork Analysis) object
# nwa <- new("NWA", pvalues=KcViab_PVals, phenotypes=KcViab_Data4Enrich, 
# interactome=Biogrid_DM_Interactome)
# ##preprocessing
# nwa <- preprocess(nwa, species="Dm", initialIDs="Entrez.gene", 
# keepMultipleMappings=TRUE, duplicateRemoverMethod="max")
# ##To create an interactome:
# ##nwa<-interactome(nwa, species="Dm", reportDir="HTSanalyzerReport",
# ##genetic=FALSE)
# ##do network analysis
# nwa <- analyze(nwa, fdr=0.001, species="Dm")
# graphics.off()
# ##plot and save the identified subnetwork
# plotSubNet(nwa, filepath=".", filename="subnetwork.pdf", 
# output="pdf", width=8, height=8)
# ## End(Not run)

Run the code above in your browser using DataLab