View source: R/reportingTools.R
vennSelect2 | R Documentation |
This function is designed to output text and/or HTML tables based on the
results of a call to decideTests
, using the
ReportingTools package.
vennSelect2(
fit,
contrast,
design,
groups = NULL,
cols = NULL,
p.value = 0.05,
lfc = 0,
method = "same",
adj.meth = "BH",
titleadd = NULL,
fileadd = NULL,
baseUrl = ".",
reportDirectory = "./venns",
affy = TRUE,
probecol = "PROBEID",
...
)
fit |
An |
contrast |
A contrasts matrix, produced either by hand, or by a call to
|
design |
A design matrix. |
groups |
This argument is used when creating a legend for the resulting HTML pages. If NULL, the groups will be generated using the column names of the design matrix. |
cols |
A numeric vector indicating which columns of the fit, contrast
and design matrix to use. If |
p.value |
A p-value to filter the results by. |
lfc |
A log fold change to filter the results by. |
method |
One of "same", "both", "up", "down", "sameup", or "samedown". See details for more information. |
adj.meth |
Method to use for adjusting p-values. Default is 'BH', which
corresponds to 'fdr'. Ideally one would set this value to be the same as was
used for |
titleadd |
Additional text to add to the title of the HTML tables. Default is NULL, in which case the title of the table will be the same as the filename. |
fileadd |
Additional text to add to the name of the HTML and CSV tables. Default is NULL. |
baseUrl |
A character string giving the location of the page in terms of HTML locations. Defaults to "." |
reportDirectory |
A character string giving the location that the results will be written. Defaults to "./venns" |
affy |
Boolean; are these Affymetrix arrays, and do you want hyperlinks for each probeset to the Affy website to be generated for the resulting HTML tables? |
probecol |
If the "affy" argument is |
... |
Used to pass arguments to lower level functions. |
The purpose of this function is to output HTML and text tables with lists of
genes that fulfill the criteria of a call to
decideTests
as well as the direction of differential
expression.
Some important things to note: First, the names of the HTML and text tables
are extracted from the colnames
of the TestResults
object,
which come from the contrasts matrix, so it is important to use something
descriptive. Second, the method argument is analogous to the include
argument from vennCounts
or
vennDiagram
. Choosing "both" will select genes
that are differentially expressed in one or more comparisons, regardless of
direction. Choosing "up" or "down" will select genes that are only
differentially expressed in one direction. Choosing "same" will select genes
that are differentially expressed in the same direction. Choosing "sameup"
or "samedown" will select genes that are differentially expressed in the
same direction as well as 'up' or 'down'.
Note that this is different than sequentially choosing "up" and then "down". For instance, a gene that is upregulated in one comparison and downregulated in another comparison will be listed in the intersection of those two comparisons if "both" is chosen, it will be listed in only one comparison for both the "up" and "down" methods, and it will be listed in the union (e.g., not selected) if "same" is chosen.
Unlike vennSelect
, this function automatically creates both HTML and
CSV output files.
A list with two items. First, a list of HTMLReport
objects
from the ReportingTools package, which can be used to create an index page
with links to the HTML pages created by this function. See the help page for
HTMLReport in ReportingTools as well as the vignettes for more information.
The second item is a vennCounts
object from limma, which can be used
to create a Venn diagram, e.g., in a report if this function is called
within a Sweave or knitR pipeline.
James W. MacDonald jmacdon@u.washington.edu
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.