WGCNA_cytoscape: Export WGCNA resullt for cytoscape input edges and nodes.

Description Usage Arguments Value Examples

View source: R/WGCNA.R

Description

Export WGCNA resullt for cytoscape input edges and nodes.

Usage

1
2
3
4
5
6
7
8
WGCNA_cytoscape(
  net,
  power,
  datExpr,
  TOM_plot = NULL,
  prefix = "ehbio",
  fulledge = F
)

Arguments

net

WGCNA_coexprNetwork or blockwiseModules returned WGCNA object.

power

soft-thresholding power for network construction.

datExpr

Expression data. A matrix (preferred) or data frame in which columns are genes and rows ar samples. NAs are allowed, but not too many. See checkMissingData below and details.

TOM_plot

Get TOM plot and save to file given here like 'tomplot.pdf'.

prefix

prefix for output files.

fulledge

Output all edges (very large). Default FALSE. Only output edges whithin modules.

Value

A list with edgeData and nodeData as two elements.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
df = generateAbundanceDF(nSample=30, nGrp=3, sd=5)
datExpr <- WGCNA_dataFilter(df)
datExpr <- WGCNA_sampleClusterDetectOutlier(datExpr)
power <- WGCNA_softpower(datExpr)
net <- WGCNA_coexprNetwork(datExpr, power)
WGCNA_saveModuleAndMe(net, datExpr)
cyt <- WGCNA_cytoscape(net, power, datExpr)

#2
exprMat <- "test.file"
wgcnaL <- WGCNA_readindata(exprMat)

traitData <- 'trait.file'
wgcnaL <- WGCNA_readindata(exprMat, traitData)
datExpr <- wgcnaL$datExpr
WGCNA_dataCheck(datExpr)
datExpr <- WGCNA_dataFilter(datExpr)
datExpr <- WGCNA_sampleClusterDetectOutlier(datExpr)
# datExpr <- WGCNA_sampleClusterDetectOutlier(datExpr, traitColors=wgcnaL$traitColors)
power <- WGCNA_softpower(datExpr)
net <- WGCNA_coexprNetwork(datExpr, power)
MEs_col <- WGCNA_saveModuleAndMe(net, datExpr)
WGCNA_MEs_traitCorrelationHeatmap(MEs_col, traitData=wgcnaL$traitData)
cyt <- WGCNA_cytoscape(net, power, datExpr)

Tong-Chen/YSX documentation built on Jan. 25, 2021, 2:49 a.m.