AOV2way | R Documentation |
A two-way ANOVA for the samples in the supplied data matrix based on annotations stored in the params list object.
AOV2way(data.to.aov, category1, category2, pthreshold = 0.05, additional.report = "NONE")
data.to.aov |
numeric data matrix with samples/observations in the columns and genes/variables in the rows |
category1 |
Character string pointing to a column of the annotations data frame stores in params$annotations |
category2 |
Character string pointing to a column of the annotations data frame stores in params$annotations |
pthreshold |
pvalue threshold for which genes will be considered significant |
additional.report |
Option to include full output of aov or TukeyHSD, options are "NONE", "AOV","TUKEY", or "ALL" |
Runs a standard two-way ANOVA and subsequent TukeyHSD on the data provided using stored annotations as the categories for ANOVA groupings
List object
AOV.Results |
dataframe giving the F statistic and pvalue of each gene in the original input matrix for each category indepenently and the interaction values |
Category1_Sig.Genes |
character vector of the genes with pvalues below the specified pthreshold for the levels in Category1 |
Category2_Sig.Genes |
character vector of the genes with pvalues below the specified pthreshold for the levels in Category2 |
Interaction_Sig.Genes |
character vector of the genes with pvalues below the specified pthreshold for the interaction between Category1 and Category2 |
All.Sig.Genes |
character vector of the all genes with pvalues below the specified pthreshold for any contrast |
NonSig.Genes |
character vector of the genes with pvalues that did not pass the specified pthreshold for any contrast |
Category1_Tukey.pVals |
dataframe containing the adjusted pvalues from TukeyHSD for each contrast in Category2 for each gene in the original input matrix |
Category2_Tukey.pVals |
dataframe containing the adjusted pvalues from TukeyHSD for each contrast in Category2 for each gene in the original input matrix |
Interaction_Tukey.pVals |
dataframe containing the adjusted pvalues from TukeyHSD for each contrast of the interaction between Category1 and Category2 for each gene in the original input matrix |
Category1_Tukey.diffs |
dataframe containing the difference values from TukeyHSD for each contrast in Category1 for each gene in the original input matrix |
Category2_Tukey.diffs |
dataframe containing the difference values from TukeyHSD for each contrast in Category2 for each gene in the original input matrix |
Interaction_Tukey.diffs |
dataframe containing the difference values from TukeyHSD for each contrast of the interaction between Category1 and Category2 for each gene in the original input matrix |
optional items
AOV.output |
list object containing the aov output for all genes in the original input matrix |
Tukey.output |
list object containing the TUkeyHSD output for all genes in the original input matrix |
The function itself determines significant and non-significant genes based on the pthreshold provided. However, the AOV.Results provdied in the output supply the F value and p value, additional information can also be retrieved by setting additional report = TRUE, user can use any of this information for custom filtering of results.
If the the two categories provided overlap in some way (usually in cases where one of the groups from each category are the same), the effects may not be estimable. In these scenarios, an error will occuring suggesting the use of AOV1way with only one of the categories originally provided.
For cases where there are no non-missing arguments for one or more of the groups in the supplied categories, a warning will be generated indicating which genes or observations this is true for. If there is only one group with no non-missing arguments, that gene or observation will be removed from the analysis (and will be indicated with a warning). Please pay attention to these warnings as they may affect how the results should be interpretted.
~~Alison Moss~~
##initiate parameteres and set up annotations
initiate_params()
data(RAGP_norm)
data(RAGP_annots)
set_annotations(RAGP_annots)
##AOV for Connectivity and State
aov2 <- AOV2way(RAGP_norm, "Connectivity","State", pthreshold = 0.01)
summary(aov2)
head(aov2$AOV.Results) ##shows F vals and pVals for both categories and the interaction
head(aov2$Category1_Sig.Genes)
head(aov2$Category2_Sig.Genes)
head(aov2$Interaction_Sig.Genes)
##visualize significant genes in heatmap
int.genes <- aov2$Interaction_Sig.Genes
myHeatmapByAnnotation(RAGP_norm, int.genes, groupings = c("Connectivity","State"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.