affy (version 1.50.0)

vennCounts2: Compute Counts for Venn Diagram

Description

This function is designed to compute counts for a Venn diagram. It is slightly different from vennCounts in the additional ability to compute counts for genes that are differentially expressed in the same direction.

Usage

vennCounts2(x, method = "same", fit = NULL, foldFilt = NULL)

Arguments

x
A TestResults object, produced by a call to decideTests or foldFilt.
method
One of "same", "both", "up", "down". See details for more information.
fit
An MArrayLM object, produced by a call

to lmFit and eBayes. Only necessary if 'foldFilt' = TRUE.

foldFilt
A fold change to filter samples. This is primarily here for consistency with the corresponding argument in vennSelect.

Value

Details

The function vennCounts will return identical results except for the "same" method. This will only select those genes that both pass the criteria of decideTests as well as being differentially expressed in the same direction. Note that this is different from the "both" method, which simply requires that a given gene be differentially expressed in e.g., two different comparisons without any requirement that the direction be the same.

Examples

Run this code
library("limma")
tstat <- matrix(rt(300,df=10),100,3)
tstat[1:33,] <- tstat[1:33,]+2
clas <- classifyTestsF(tstat,df=10,p.value=0.05)
a <- vennCounts2(clas)
print(a)
vennDiagram(a)

Run the code above in your browser using DataCamp Workspace