PWcTalkNWpre | R Documentation |
Identify crosstalk pathway pairs from pathway-wise statistical significance values (p-values) across multiple datasets.
PWcTalkNWpre( input2PWcTalk, test = "binary", pTh.dataset = 0.01, pTh.pwPair = 0.01, pTh.pw = 0.01 )
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. |
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.
[PWcTalkNW()] for steps post this function, [PWcTalk()] for overall compacted pathway crosstalk analysis module.
Other aggregations:
PWcTalkNW()
,
PWcTalk()
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.