Create table phenotypic variable results from 'K2' object.

getTestsModTable(K2res)

Arguments

K2res

An object of class K2 or K2results().

Value

A data.frame object with the following columns:

  • value: The variable being tested

  • node: The partition label

  • edge: The subgroup for the given partition

  • pval: Nominal p-value of test

  • fdr: Benjamini-Hochberg FDR corrected p-value

  • df: Degrees of freedom of test

  • stat: Test statistic

  • obsMean: Mean value across partition members

  • altMean: Mean value for all other observations

  • diffMean: Difference is mean

  • nhits: The number of second label values in subgroup

  • ncase: The total second-level label value

  • nalt: The total first-level label value

  • ndrawn: The total members in the subgroup

  • hits: Members of subgroup with second-level label value

  • test: The statistical test that produced this result

References

Reed ER, Monti S (2020). “Multi-resolution characterization of molecular taxonomies in bulk and single-cell transcriptomics data.” Bioinformatics. doi: 10.1101/2020.11.05.370197 , http://biorxiv.org/lookup/doi/10.1101/2020.11.05.370197. Benjamini Y, Hochberg Y (1995). “Controlling the False Discovery Rate: A Practical and Powerful Approach to Multiple Testing.” Journal of the Royal Statistical Society: Series B (Methodological), 57(1), 289--300. ISSN 00359246, doi: 10.1111/j.2517-6161.1995.tb02031.x , http://doi.wiley.com/10.1111/j.2517-6161.1995.tb02031.x.

Examples

## Read in ExpressionSet object library(Biobase) data(sample.ExpressionSet) ## Pre-process and create K2 object K2res <- K2preproc(sample.ExpressionSet) ## Run K2 Taxonomer algorithm K2res <- K2tax(K2res, stabThresh=0.5) infoClassVector <- c(sex='factor', score='numeric1') K2res <- runTestsMods(K2res, infoClass=infoClassVector) head(getTestsModTable(K2res))
#> value node edge pval fdr stat df obsMean altMean #> 9 sex C 1 0.1088690 0.8307692 0.2223068 NA NA NA #> 29 score H 1 0.1277138 0.8307692 60.5000000 NA 0.6700000 0.5127273 #> 17 score E 1 0.1458790 0.8307692 100.5000000 NA 0.6000000 0.4975000 #> 5 sex B 1 0.1973244 0.8307692 4.7256460 NA NA NA #> 18 sex E 1 0.2279715 0.8307692 0.3183362 NA NA NA #> 10 score C 1 0.2417236 0.8307692 96.5000000 NA 0.5745455 0.5093333 #> diffMean nhits ncase nalt ndrawn hits test #> 9 NA NA NA NA NA NA two-sided Fishers Exact Test #> 29 0.15727273 NA NA NA NA NA 1-sided Wilcox Test #> 17 0.10250000 NA NA NA NA NA 1-sided Wilcox Test #> 5 NA NA NA NA NA NA two-sided Fishers Exact Test #> 18 NA NA NA NA NA NA two-sided Fishers Exact Test #> 10 0.06521212 NA NA NA NA NA 1-sided Wilcox Test