tacco.utils.fishers_exact

fishers_exact(df, alternative=['greater', 'less'])[source]

Perform Fisher’s exact test. Tests all columns in a 1 VS rest scheme.

Parameters:
  • df – A contingency table as DataFrame, with groups in the rows and values in the columns.

  • alternative

    The alternative for the test. Can also be a list of alternatives. Available are:

    • ’greater’

    • ’less’

    • ’two-sided’

Returns:

An DataFrame containing the enrichment p-values.