plotSubNet: Plot and save a figure of the enriched subnetwork

Description Usage Arguments Details Author(s) See Also Examples

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

1
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)

filepath:

a single character value specifying the directory where the figure will be stored

filename:

a single character value specifying the name of the figure to save

output:

a single character value specifying the format of output image: "pdf" or "png"

...:

all other arguments for the function pdf or png such as the argument 'width' and 'height'

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.

Author(s)

Xin Wang xw264@cam.ac.uk

See Also

networkPlot, viewSubNet, analyze

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
## 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)

HTSanalyzeR documentation built on Oct. 31, 2019, 7:10 a.m.