diagplotVenn | R Documentation |
This function uses the R package VennDiagram and plots an up to 5-way Venn diagram depicting the common and specific to each statistical algorithm genes, for each contrast. Mostly for internal use because of its main argument which is difficult to construct, but can be used independently if the user grasps the logic.
diagplotVenn(pmat, fcmat = NULL, pcut = 0.05,
fcut = 0.5, direction = c("dereg", "up", "down"),
nam = as.character(round(1000 * runif(1))),
output = "x11", path = NULL, altNames = NULL, ...)
pmat |
a matrix with p-values corresponding to the application of each statistical algorithm. See also Details. |
fcmat |
an optional matrix with fold changes corresponding to the application of each statistical algorithm. See also Details. |
pcut |
if |
fcut |
a p-value cutoff for statistical
significance. Defaults to |
direction |
if |
nam |
a name to be appended to the output graphics
file (if |
output |
one or more R plotting device to direct the
plot result to. Supported mechanisms: |
path |
the path to create output files. If
|
altNames |
an optional named vector of names, e.g.
HUGO gene symbols, alternative or complementary to the
unique gene names which are the rownames of |
... |
further arguments to be passed to plot
devices, such as parameter from |
Regarding pmat
, the p-value matrix must have the
colnames attribute and the colnames should correspond to
the name of the algorithm used to fill the specific
column (e.g. if "statistics"=c("deseq","edger",
"nbpseq")
then colnames(pmat) <-
c("deseq","edger","nbpseq")
.
Regarding fcmat
, the fold change matrix must have
the colnames attribute and the colnames should correspond
to the name of the algorithm used to fill the specific
column (see the parameter pmat
).
Regarding direction
, it can be one of "dereg"
for the total of regulated genes, where
abs(fcmat[,n])>=fcut
(default), "up"
for
the up-regulated genes where fcmat[,n]>=fcut
or
"down"
for the up-regulated genes where
fcmat[,n]<=-fcut
.
The filenames of the plots produced in a named list with
names the which.plot
argument. If
output="x11"
, no output filenames are produced.
Panagiotis Moulos
require(VennDiagram)
p1 <- 0.01*matrix(runif(300),100,3)
p2 <- matrix(runif(300),100,3)
p <- rbind(p1,p2)
rownames(p) <- paste("gene",1:200,sep="_")
colnames(p) <- paste("method",1:3,sep="_")
vennContents <- diagplotVenn(p)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.