glyco.plot {glycanr}R Documentation

Plot data representing Glycans in boxplot or violin mode using ggplot2

Description

This function constructs standard plots in exploratory analysis of N-Glycans.

Usage

glyco.plot(
  data,
  collapse = TRUE,
  violin = FALSE,
  group = NULL,
  all = TRUE,
  p.adjust.method = "holm",
  print.p.values = TRUE,
  log.transform = FALSE,
  glyco.names = NULL
)

Arguments

data

data frame which holds columns representing Glycans. These column names must start with 'GP'.

collapse

should Glycans be presented in one facet (default) or with more facets (one per Glycan).

violin

should Glycans be presented in a boxplot (default) or violin format.

group

this a possible grouping parameter on which stratification of data should be conducted. It should be a name of one of the columns in dataframe data and of type factor.

all

should all of the variables (default) be presented in the plot or only those that have significant p-values. This variable is meaningful only when group is not NULL since the testing of differences is conducted between different groups represented by group variable. If group has only 2 levels then Mann-Whitney-Wilcoxon (wilcox.test) test is conducted. Otherwise, Kruskal-Wallis test is conducted (kruskal.test). Obtained p-values are adjusted to multiple testing with p.adjust.

p.adjust.method

method used for adjustment of p-values to multiple testing. Variable p.adjust.method must be an element of p.adjust.methods.

print.p.values

should p-values be printed on plots

log.transform

should Glycans be log transform prior to plotting.

glyco.names

names of columns that represent glycan data. If NULL all columns starting with 'GP' in their names will be used

Value

Returns a list consisting of p-values, adjusted p-vales and the plot.

Author(s)

Ivo Ugrina

Examples

devAskNewPage(TRUE)
exampleData <- data.frame(ID=1:100, GP1=runif(100),
  GP2=rexp(100,0.2), GP3=rgamma(100, 3),
  Plate=factor(sample(1:2,100,replace=TRUE)))
glyco.plot(exampleData)
glyco.plot(exampleData, group='Plate', collapse=FALSE, log=TRUE)

[Package glycanr version 0.4.0 Index]