glyco.plot: Plot data representing Glycans in boxplot or violin mode...

Description Usage Arguments Value Author(s) Examples

View source: R/glyco.plot.R

Description

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

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
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

1
2
3
4
5
6
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)

Example output

From version 0.3 functions tanorm and glyco.outliers expect data frames
in long format.
$p.val.unadj
      GP1       GP2       GP3 
0.7562033 0.6890373 0.8038433 

$p.val
GP1 GP2 GP3 
  1   1   1 

$plot

glycanr documentation built on March 29, 2021, 5:07 p.m.