goatools.go_enrichment module¶
python %prog study.file population.file gene-association.file
This program returns P-values for functional enrichment in a cluster of study genes using Fisher’s exact test, and corrected for multiple testing (including Bonferroni, Holm, Sidak, and false discovery rate)
- class goatools.go_enrichment.GOEnrichmentRecord(goid, **kwargs)[source]¶
Bases:
objectRepresents one result (from a single GOTerm) in the GOEnrichmentStudy
- namespace2NS = {'biological_process': 'BP', 'cellular_component': 'CC', 'molecular_function': 'MF'}¶
- property fold_enrichment¶
Ratio of observed to expected representation (study proportion / population proportion).
Returns the fold enrichment (>1 means enriched, <1 means purified/depleted). Returns None if the population proportion cannot be computed.
- update_remaining_fldsdefprt(min_ratio=None)[source]¶
Finish updating self (GOEnrichmentRecord) field, is_ratio_different.
- class goatools.go_enrichment.GOEnrichmentStudy(pop, assoc, obo_dag, propagate_counts=True, alpha=0.05, methods=None, **kws)[source]¶
Bases:
objectRuns Fisher’s exact test, as well as multiple corrections
- objprtres = <goatools.godag.prtfncs.GoeaPrintFunctions object>¶
- run_study_nts(study, **kws)[source]¶
Run GOEA on study ids. Return results as a list of namedtuples.
- get_pval_uncorr(study, log=sys.stdout, selected_goids=None)[source]¶
Calculate the uncorrected pvalues for study items.
- static get_study_items(results)[source]¶
Return a list of study items associated with the given results.
- print_results(results, min_ratio=None, indent=False, pval=0.05, prt=sys.stdout)[source]¶
Print GOEA results with some additional statistics calculated.
- static get_ns2nts(results, fldnames=None, **kws)[source]¶
Get namedtuples of GOEA results, split into BP, MF, CC.