How to use the gseapy.__version__.split function in gseapy

To help you get started, we’ve selected a few gseapy examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github iseekwonderful / PyPathway / pypathway / analysis / gsea / __init__.py View on Github external
def run(data, gmt, cls, permutation_type='phenotype', method='signal_to_noise', permution_num=1000):
        prefix = gp.__name__ + "."
        for importer, modname, ispkg in pkgutil.iter_modules(gp.__path__, prefix):
            if modname == "gseapy.gsea":
                module = __import__(modname, fromlist="dummy")
        vs = gp.__version__.split(".")
        if int(vs[0]) == 0 and int(vs[1]) < 9:
            module.ranking_metric = GSEA._ranking_metric
        else:
            module.ranking_metric = GSEA._ranking_metric2
        gp.algorithm.ranking_metric = GSEA._ranking_metric
        res = gp.gsea(data, gmt, cls, permutation_type=permutation_type, permutation_num=permution_num,
                      outdir=os.path.join(os.path.dirname(os.path.realpath(__file__)), 'images'), method=method)
        return GSEA(res.res2d, data, gmt, cls)