Skip to content

gsea

Run single-omic GSEA with files at provided paths.

Parameters

  • gmt_path - String of the path to the gmt file of interest
  • rank_file_path - String of the path to the rank file of interest. Tab separated.

Returns

Returns a list containing the GSEA results for every set.

Panics

Panics if the GMT or the rank file is malformed or not at specified path.

Example

import webgestaltpy

res = webgestaltpy.gsea("kegg.gmt", "example_ranked_list.rnk")

print(res[0:2]) ## print first two results

Output

[
  {
    'set': 'has00010',
    'p': 0.353,
    'fdr': 1.276048474073356,
    'es': 0.40653028852961814,
    'nes': 1.07659486501464,
    'leading_edge': 24
  },
  {
    'set': 'has00020',
    'p': 0,
    'fdr': 0.028834551777982824,
    'es': 0.6216527702210619,
    'nes': 1.5721004858071521,
    'leading_edge': 20
  }
]