coexvis: Visualize dependence patterns

Description Usage Arguments Details Value Author(s) References Examples

View source: R/coexvis.R

Description

This function visulaize dependence structure within a group using pairwise scatterplot of original scale and copula-transformed scale.

Usage

1
2
3
4
5
6
7
8
coexvis(
  obj = NULL,
  tbl = NULL,
  exprs = NULL,
  grp = NULL,
  p = 0.05,
  title = NULL
)

Arguments

obj

data.frame. Direct result object of 'coptest.p'.

tbl

data.frame. Alternative with 'obj' when you manually prepare the table. This table must include variables three variables;'varname'(pairs of variable which is separated by '|'), 'stat'(test statistic), 'p'(p-value), and 'p.adj'(adjusted p-value).

exprs

data.frame. Matrix with variables in the rows and samples in columns.

grp

character vector. The vector should be the same length with the number of rows of the 'exprs' object.

p

Single numeric. Significance level for two sample test. The default is 0.05.

title

character. Main title of the plot. if 'ref' is provided, 'title' is set to 'desc'.

Details

This plot can be used for investigating differential dependence structure in the copula-transformed space compared with the original scale. Pairwise co-expression patterns are visualzed as scatter plot based on ggpairs from GGally pacakge. There are two types of scatter plots in the upper and lower diagonal, respectively; lower one represents scatter plots with original scale, which indicates standard correaltion structure; second one represents the scatter plots copula-transformed scale, i.e., rank-based correlation structure. Smoothing is conducted with cubic spline.

Value

See ggpairs{GGally} function.

Author(s)

Yusuke MATSUI

References

Yusuke MATSUI et al.(2020) RoDiCE: Robust differential protein co-expression analysis for cancer complexome (submitted).

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
data(ccrcc.pbaf) # example data from clear renal cell carcinoma(clerk et al.2019)
data(corum.hsp.pbaf)
tumor = ccrcc.pbaf$tumor # 110 samples and 10 proteins from PBAF complex
normal = ccrcc.pbaf$normal # 84 samples and 10 proteins from PBAF complex

#perform copula test for pairwise variables.
result = coptest.p(tumor,normal,nperm=100,approx=TRUE)
result$tbl

exprs = rbind(tumor,normal)
grp = c(rep(1,nrow(tumor)),rep(2,nrow(normal)))
coexvis(obj = result,exprs = exprs,grp = grp,p = 0.05, title = "PBAF complex")

ymatts/RoDiCE documentation built on Jan. 1, 2021, 1:45 p.m.