keggtools.analysis#
KEGG Enrichment analysis core.
Classes#
KEGG pathway enrichment analysis. |
|
Results of KEGG pathway enrichment analysis. |
Functions#
|
Plot enrichment results. |
Module Contents#
- class keggtools.analysis.Enrichment(pathways)#
KEGG pathway enrichment analysis.
- Parameters:
pathways (list[keggtools.models.Pathway])
- all_pathways: list[keggtools.models.Pathway]#
- get_subset(subset, inplace=False)#
Create subset of analysis result by list of pathway ids.
- Parameters:
- Returns:
Subset of enrichment results.
- Return type:
- result: list[EnrichmentResult] = []#
- run_analysis(gene_list)#
List of gene ids. Return list of EnrichmentResult instances.
- Parameters:
- Returns:
List of enrichment result instances.
- Return type:
- to_csv(file_obj, delimiter='\t', overwrite=False)#
Save result summary as file.
- to_dataframe()#
Return analysis result as pandas DataFrame. Required pandas dependency.
- Returns:
Export enrichment results as pandas dataframe.
- Return type:
- class keggtools.analysis.EnrichmentResult(org, pathway_id, pathway_name, found_genes, pathway_genes, pathway_title=None)#
Results of KEGG pathway enrichment analysis.
- Parameters:
- __str__()#
Build string summary of KEGG path analysis result instance.
- Return type:
- Returns:
Returns string that describes the enrichment result instance.
- static get_header()#
Build default header for enrichment analysis.
- json_summary(gene_delimiter=',')#
Build json summary for enrichment analysis.
- keggtools.analysis.plot_enrichment_result(enrichment, ax=None, figsize=(7, 7), cmap='coolwarm', min_study_count=1, max_pval=None, use_percent_study_count=True)#
Plot enrichment results.