
Get Top Genes From An AssociationTestResult
get_top_n_genes.Rd
Pulls the genes with the highest wald statistic from an association test result, with a p value cutoff.
Arguments
- association_test_results
The association test results data frame to take the genes from.
- n_genes
The number of genes to return. Defaults to 40.
- lineage
The Lineage to use. The Defaults to NA, which assumes the test was run with Lineages=False.
- p_cutoff
The P value cutoff to use. Defaults to less than 0.05.
Examples
assoRes <- data.frame(
row.names = c("A", "B", "C", "D"),
waldStat = c(25, 50, 100, 10),
pvalue = c(0.01, 0.5, 0.005, 0.13)
)
get_top_n_genes(assoRes, n_genes = 2)
#> [1] "C" "A"