vennDA: Plot Venn diagram from 'allDA' object

View source: R/vennDA.R

vennDAR Documentation

Plot Venn diagram from allDA object

Description

Plot a Venn (Euler) diagram of features found by different methods.

Usage

vennDA(
  x,
  tests = NULL,
  alpha = 0.1,
  split = FALSE,
  output = FALSE,
  pkg = "eulerr",
  ...
)

Arguments

x

(Required) Output from the allDA function

tests

(Required) Character vector with tests to plot (E.g. c("ttt","adx.t","wil"), see names(x$results)). Default none

alpha

Numeric. q-value threshold for significant features. Default 0.1

split

If TRUE will split diagrams in positive and negative estimates if possible

output

If TRUE will return a data.frame instead of a plot

pkg

Use either "eulerr" package (default) or "venneuler" for drawing diagrams.

...

Additional arguments for plotting

Details

Require the eulerr package unless output is TRUE.

Value

If output TRUE then a data.frame with Features detected by the different methods

Examples

# Creating random count_table and predictor
set.seed(5)
mat <- matrix(rnbinom(500, size = 0.1, mu = 500), nrow = 50, ncol = 10)
pred <- c(rep("Control", 5), rep("Treatment", 5))

# Running allDA to compare methods
# This example uses 1 core (cores = 1). 
# Remove the cores argument to get it as high (and thereby fast) as possible.
res <- allDA(data = mat, predictor = pred, cores = 1)

# Plot venn diagram comparing significant features from znb and zpo
# znb and zpo only have significant features due to high false positive rates in this example
# split = TRUE splits the significant features in positive and negative estimates
vennDA(res, tests = c("znb","zpo"), split = TRUE)

Russel88/DAtest documentation built on March 24, 2022, 3:50 p.m.