plotCorr | R Documentation |
This function generates -log10 transformed p-values for each pair of cell types and calculate corresponding Pearson correlation and odds ratio - a modification of function 'ggpairs' in package 'GGally'.
plotCorr(pval, de.state=NULL, pval.thres=NULL, fdr.thres=NULL, p.size = 0.2, p.color = grDevices::adjustcolor( "black", alpha.f = 0.2), fig.margin = c(1,1,1,1), fig.margin.unit = 'in', line.type = 'dashed', line.color = 'blue')
pval |
matrix of p-values, with rows representing features and columns representing cell types. |
de.state |
(optional) matrix of DE/DM states (1: DE/DM, 0:non-DE/DM), with rows representing features and columns representing cell types. |
pval.thres |
threshold of p-value to define DE/DM, required if de.state not provided. |
fdr.thres |
threshold of FDR to define DE/DM, required if de.state not provided and FDR is prefered than p-value. |
p.size |
point size for scatter plot |
p.color |
point color for scatter plot |
fig.margin |
figure margin |
fig.margin.unit |
unit of figure margin |
line.type |
line type in scatter plot |
line.color |
line color in scater plot |
A figure contains scatter plots, Pearson correlaiton and odds ration of -log10 transformed p-values for each pair of cell types.
Luxiao Chen <luxiao.chen@emory.edu>
pval.1 <- runif(1000,0,1) pval.2 <- pval.1 + rnorm(1000,0,0.01) pval.2[pval.2 < 0] =0 pval.3 <- runif(1000,0,1) pval.input <- data.frame('cell.1'=pval.1, 'cell.2'=pval.2, 'cell.3'=pval.3) plotCorr(pval = pval.input, pval.thres = 0.05)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.