Learn R Programming

canprot (version 1.0.0)

groupplots: Plot Potential Diagrams for Groups of Datasets

Description

Plot rank difference of chemical affinities for proteins in various datasets and merge the diagrams.

Usage

groupplots(group = "hypoxia_ZC_down", each100 = FALSE, res = 50, plot.it = TRUE)
  mergedplot(gpresult, each100 = FALSE, res = 50)

Arguments

group

character, description of datasets to include

each100

logical, rescale rank difference of each dataset individually?

res

numeric, grid resolution for plots

plot.it

logical, make plots?

gpresult

list, value returned by groupplots

Details

groupplots makes weighted rank-difference of affinity (potential) diagrams (see rankplot) for each dataset found in the specified group. group consists of three parts joined by an underscore: the type of experiment (colorectal, pancreatic, hypoxia, or osmotic; see pdat_), the distinguishing compositional variable (ZC or H2O), and the direction of change of that variable (up or down).

To identify the datasets in any group, compositional summaries for each dataset are read from pre-calculated tables in extdata/summary. Datasets are included for which the absolute mean difference of either ZC or H2O between up- and down-expressed proteins is greater than 0.01 and the other of ZC or H2O has p-value >= 0.05 and abs(CLES - 50) < 10.

groupplots makes calculations over a large range of and in order to encompass the equipotential lines for most datasets. This way, the positions of the median and interquartiles of the equipotential lines can be calculated accurately for the mergedplot, which covers a smaller range of and .

See Also

This function is used in the historical vignette inst/oldvignettes/potential_diagrams.Rmd. rankplot and rankdiff are supporting functions.

Examples

Run this code
# NOT RUN {
gpresult <- groupplots("osmotic_H2O_down", res = 25)
mergedplot(gpresult, res = 25)

# reproduce Figure 3 of Dick, 2017
ZCgroups <- c("colorectal_ZC_up", "pancreatic_ZC_up", "hypoxia_ZC_down")
H2Ogroups <- c("colorectal_H2O_up", "pancreatic_H2O_up", "osmotic_H2O_down")
allgroups <- c(ZCgroups, H2Ogroups)
par(mfrow=c(2, 3))
for(group in allgroups) {
  gpresult <- groupplots(group, plot.it = FALSE)
  mergedplot(gpresult)
  title(main = group)
}
# }

Run the code above in your browser using DataLab