Skip to content

meta_ora

Run a meta-analysis ORA with analyte lists and reference lists given as python objects.

Parameters

  • gmt_path - String of the path to the gmt file of interest
  • analyte_lists - Lists of list[str] which are the analyte lists of interests
  • reference_lists - Lists of list[str] which are the reference list for each corresponding analyte list

Returns

Returns a list of a list of dictionaries with the results containing the ORA results for every set.

The first list contains the results of the meta-analysis. The following lists are the results for each list individually.

Panics

Panics if the any list or file is malformed or not at specified path.

Example

import webgestaltpy

def file_to_list(file_path: str) -> list[str]:
    """Convert file to list[str]"""
    with open(file_path, "r") as r:
        return list(r.readlines())

res = webgestaltpy.meta_ora(
    "kegg.gmt",
    [file_to_list("genelist.txt"), file_to_list("second_genelist.txt")],
    [file_to_list("reference.txt"), file_to_list("reference.txt")],
)

res would be a list containing the results of the meta-analysis and each list run individually. In this example, res[0] would look be the results of the meta-analysis. res[1] would be the results from genelist.txt, res[2] would be the results from second_genelist.txt, and so on.

See the documentation for webgestaltpy.ora for specifics about the format of the results.