ezvenn: Venn diagrams

View source: R/ezvenn.R

ezvennR Documentation

Venn diagrams

Description

Venn diagrams using output from ezlimma package.

Usage

ezvenn(
  tab,
  prefix.v = NULL,
  p.cutoff = NULL,
  fdr.cutoff = NULL,
  logfc.cutoff = NULL,
  include = c("up", "down"),
  circle.names = prefix.v,
  main = "",
  name = NA,
  cex = c(1, 1, 1),
  plot = TRUE
)

Arguments

tab

Table of output from ezlimma.

prefix.v

A vector of prefixes that prefix .p, .FDR, or .logFC in colnames(tab). These will be the columns that are used in the Venn diagram. If NULL these are inferred from colnames(tab) that end with .p.

p.cutoff

p-value cutoff to threshold features in tab. p-values < p.cutoff are significant.

fdr.cutoff

FDR cutoff to threshold features in tab. FDRs < fdr.cutoff are significant.

logfc.cutoff

log fold-change cutoff to threshold features in tab, when tab came from limma_contrasts.

include

Character vector. If logFC columns are found, this specifies whether all differentially expressed genes should be counted, or whether the counts should be restricted to genes changing in a certain direction. Choices are "both" for all differentially expressed genes, "up" for up-regulated genes only or "down" for down-regulated genes only. If include=c("up","down") then both the up and down counts will be shown. If logFC columns are not found, include = "both".

circle.names

Vector of circle names corresponding to prefix.v.

main

Main title of plot.

name

Name of file to create. Set to NA to plot to screen instead of to file.

cex

A numerical value giving the amount by which plotting text and symbols should be magnified relative to the default. See par.

plot

Logical; should plot be generated?

Details

One of fdr.cutoff or p.cutoff must be given. If both are given, only fdr.cutoff is used. logfc.cutoff if given is used in addition to these.

"_venn.pdf" is appended to name.

Value

Invisibly, a matrix with elements -1, 0, 1 indicating which features (rows) of tab were significant with specified cutoffs. 0 indicates no significant change; -1 indicates down; and 1 indicates up if corresponding logFC columns are found, otherwise 1 indicates significance.


jdreyf/ezlimmaplot documentation built on Feb. 8, 2025, 2:25 a.m.