goatools.cli.find_enrichment module

goatools find_enrichment 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).

About significance cutoff:
--alpha: test-wise alpha; for each GO term, what significance level to apply
        (most often you don't need to change this other than 0.05 or 0.01)
--pval: experiment-wise alpha; for the entire experiment, what significance
        level to apply after Bonferroni correction
class goatools.cli.find_enrichment.GoeaCliArgs(args=None)[source]

Bases: object

Extracts arguments from the command-line.

class goatools.cli.find_enrichment.GoeaCliFnc(args)[source]

Bases: object

For running a GOEA on the command-line.

prt_results(goea_results)[source]

Print GOEA results to the screen or to a file.

prt_outfiles_flat(goea_results, outfiles)[source]

Write to outfiles.

get_results()[source]

Return the significant GOEA results (< pval), unless user wants all.

chk_genes(study, pop, ntsassoc=None)[source]

Compare population and study gene product sets

get_results_sig()[source]

Get significant results.

static get_overlap(study, pop)[source]

Get he ratio of study genes which are in the population.

get_pval_field()[source]

Get ‘p_uncorrected’ or the user-specified field for determining significant results.

rd_files(study_fn, pop_fn)[source]

Read files and return study and population.

class goatools.cli.find_enrichment.GroupItems(objcli, godag_version)[source]

Bases: object

Prepare for grouping, if specified by the user.

get_objgrpwr(goea_results)[source]

Get a GrpWr object to write grouped GOEA results.

get_sortobj(goea_results, **kws)[source]

Return a Grouper object, given a list of GOEnrichmentRecord.

class goatools.cli.find_enrichment.GrpWr(sortobj, pval_fld, ver_list)[source]

Bases: object

Write GO term GOEA information, grouped.

objprtfmt = <goatools.rpt.prtfmt.PrtFmt object>
prt_outfiles_grouped(outfiles)[source]

Write to outfiles.

wr_xlsx(fout_xlsx)[source]

Print grouped GOEA results into an xlsx file.

wr_tsv(fout_tsv)[source]

Print grouped GOEA results into a tab-separated file.

wr_txt(fout_txt)[source]

Write to a file GOEA results in an ASCII text format.

prt_tsv(prt=sys.stdout)[source]

Print an ASCII text format.

prt_txt(prt=sys.stdout)[source]

Print an ASCII text format.

goatools.cli.find_enrichment.main(args=None)[source]

Run gene enrichment analysis from the command line.