PWcTalkNWpre: Cascaded steps in pathway crosstalk analyis prior to network...

View source: R/PWcTalkNWpre.R

PWcTalkNWpreR Documentation

Cascaded steps in pathway crosstalk analyis prior to network drawing

Description

Identify crosstalk pathway pairs from pathway-wise statistical significance values (p-values) across multiple datasets.

Usage

PWcTalkNWpre(
  input2PWcTalk,
  test = "binary",
  pTh.dataset = 0.01,
  pTh.pwPair = 0.01,
  pTh.pw = 0.01
)

Arguments

input2PWcTalk

Input CSV file name or a data frame object. The matrix within the file or the data frame must contain gene set analysis results (p-values) across multiple datasets, as well as a bootstrap.p column which represents the meta-analysis result.

test

The test method used to quantify pathway similarity between two binary vectors. Default is binary.

pTh.dataset

P-values in the pathway-by-dataset matrix less than pTh.dataset are converted to 1 and those greater than the threshold are converted to 0.

pTh.pwPair

Pathway pairs with similarity value (p-value or an analogy) less than pTh.pwPair are retained as edges of the graph of pathway crosstalk.

pTh.pw

Pathways with meta-analysis p-value less than pTh.pw are retained as vertices of the graph of pathway crosstalk.

Details

PWcTalkNWpre first infers pathway pairwise similarity from a dichotomized pathway-by-dataset p-value matrix, then apply an edge filter and a node filter to obtain a network of discrete pathway connections. Firstly, the algorithm converts the pathway-dataset p-value matrix to a binary matrix on account of pTh.dataset. Then, it quantifies similarity between all possible pathway pairs using either the asymmetric binary similarity (the binary method of R function dist) or Pearson's phi (enabled through R function crosstable_statistics from R package sjstats). If test is set as phi, the pairwise distance value is inverted to a similarity metric through 1-dist operation and converted to percentages in a high-to-low sorted list. Finally, a graph (network) is defined by retaining pathway connections with similarity measure lower than pTh.pwPair, provided that the involved pathways have their meta-analysis p-value less than pTh.pw. If pTh.pw is set to 1, the vertex filter is waived.

See Also

[PWcTalkNW()] for steps post this function, [PWcTalk()] for overall compacted pathway crosstalk analysis module.

Other aggregations: PWcTalkNW(), PWcTalk()

Examples

data(input2PWcTalk)
# One code block to execute pathway crosstalk analysis, enabling interactive layout tuning.
preNW <- PWcTalkNWpre(input2PWcTalk,test='binary',
 pTh.dataset=0.01,pTh.pwPair=0.01,pTh.pw=0.01)
#Code requires XMing support (x11 server), thus being turned off.
#g_tkid <- PWcTalkNW(preNW$PW.pair,preNW$PW.p)
## PAUSE here: adjust the network layout on the pop-out window to reach a satisfaction ##
#coords <- tk_coords(g_tkid$tkid)
#g_tkid <- PWcTalkNW(preNW$PW.pair,preNW$PW.p,layout=coords,
#pdfW=14,pdfH=10,figname='PWcTalk',asp=0.5) 


hui-sheen/MetaGSCA documentation built on April 9, 2022, 7:24 p.m.