Skip to contents

Pulls the genes with the highest wald statistic from an association test result, with a p value cutoff.

Usage

get_top_n_genes(
  association_test_results,
  n_genes = 40,
  lineage = NA,
  p_cutoff = 0.05
)

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.

Value

A vector of the names of the genes that best describe a lineage's trajectory.

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"