This function takes a list of test genes and a common background set to calculate enrichment and depletion for a list of pathways. The method allows for fast and efficient testing of multiple gene sets of interest.

runFedup(genes, pathways)

Arguments

genes

(list) named list of vectors with background genes and n test genes.

pathways

(list) named list of vectors with pathway annotations.

Value

List of length n with table(s) of pathway enrichment and depletion results. Rows represent tested pathways. Columns represent:

  • pathway -- name of the pathway, corresponds to names(pathways);

  • size -- size of the pathway;

  • real_frac -- fraction of test gene members in pathway;

  • expected_frac -- fraction of background gene members in pathway;

  • fold_enrichment -- fold enrichment measure, evaluates as real_frac / expected_frac;

  • status -- indicator that pathway is enriched or depleted for test gene members;

  • real_gene -- vector of test gene members annotated to pathways;

  • pvalue -- enrichment p-value calculated via Fisher's exact test;

  • qvalue -- BH-adjusted p-value

Examples

# Load pathway annotations data(pathwaysGMT) # Run fedup with a single test set data(geneSingle) fedupRes <- runFedup(geneSingle, pathwaysGMT)
#> Running fedup with: #> => 1 test set(s) #> + FASN_negative: 379 genes #> => 17804 background genes #> => 1437 pathway annotations
#> All done!
# Run fedup with two test sets data(geneDouble) fedupRes <- runFedup(geneDouble, pathwaysGMT)
#> Running fedup with: #> => 2 test set(s) #> + FASN_negative: 379 genes #> + FASN_positive: 298 genes #> => 17804 background genes #> => 1437 pathway annotations
#> All done!
# Run fedup with multiple test sets data(geneMulti) fedupRes <- runFedup(geneMulti, pathwaysGMT)
#> Warning: 28.081% of genes overlap across your test gene sets (enrichment #> results may be similar across tests).
#> Running fedup with: #> => 12 test set(s) #> + FASN_negative: 379 genes #> + FASN_positive: 298 genes #> + ACACA_negative: 276 genes #> + ACACA_positive: 313 genes #> + LDLR_negative: 394 genes #> + LDLR_positive: 386 genes #> + SREBF1_negative: 262 genes #> + SREBF1_positive: 218 genes #> + SREBF2_negative: 299 genes #> + SREBF2_positive: 315 genes #> + C12orf49_negative: 376 genes #> + C12orf49_positive: 215 genes #> => 17804 background genes #> => 1437 pathway annotations
#> All done!