barplot: barplot for fet enrichment test

Description Usage Arguments Value Author(s) See Also Examples

Description

This function makes bar plot for top most positively and negatively enriched levels.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
barplot(x, ...)

## S3 method for class 'EnrichmentFET'
barplot(
  x,
  num = 6,
  greater = 3,
  less = 3,
  text.size = 10,
  fill = "gray20",
  panel.ratio = 1.2,
  title,
  ...
)

Arguments

x

EnrichmentFET. Returned by enrichment_test with test equals to fet.

...

other params not supported

num

integer. Number of categories to display. Use it when alternative equals to greater, less, or two.sided.

greater

integer. Number of categories which are greater. Use it when alternative equals to both.

less

integer. Number of categories which are less. Use it when alternative equals to both.

text.size

integer

fill

character. Bar fill color

panel.ratio

numeric. The ratio of left and right panels.

title

character. The title of the plot.

Value

a ggplot object

Author(s)

Chenghao Zhu

See Also

enrichment_test

Examples

1
2
3
4
5
6
7
lpd = transform_by_sample(lipidome, function(x) log(x/sum(x)))
design = model.matrix(~Treatment * Timepoint + Subject, data = lpd$pdata)
fit = model_fit(lpd, design, "TreatmentMed:TimepointPre", "limma")
en = enrichment_test(lpd, fit, "class", "fet")
barplot(en)
en = enrichment_test(lpd, fit, "class", "fet", alternative = "greater")
barplot(en)

zhuchcn/HTSet documentation built on April 10, 2020, 4:51 p.m.