Klopfenstein DV, … Tang H (2018) GOATOOLS: A Python library for Gene
Ontology analyses Scientific reports
GO Grouping:
Visualize the major findings in a gene ontology enrichment analysis (GOEA) more easily with grouping.
A detailed description of GOATOOLS GO grouping is found in the
manuscript.
Compare GO lists:
Compare two or more lists
of GO IDs using goatools compare_gos, which can be used with or without
grouping.
Stochastic GOEA simulations:
One of the findings resulting from our simulations is:
Larger study sizes result in higher GOEA sensitivity,
meaning fewer truly significant observations go unreported.
The code for the stochastic GOEA simulations
described in the paper is found here
Contents
This package contains a Python library to
Process over- and under-representation of certain GO terms, based on
Fisher’s exact test. With numerous multiple correction routines
including locally implemented routines for Bonferroni, Sidak, Holm,
and false discovery rate. Also included are multiple test
corrections from
statsmodels: FDR
Benjamini/Hochberg, FDR Benjamini/Yekutieli, Holm-Sidak,
Simes-Hochberg, Hommel, FDR 2-stage Benjamini-Hochberg, FDR 2-stage
Benjamini-Krieger-Yekutieli, FDR adaptive Gavrilov-Benjamini-Sarkar,
Bonferroni, Sidak, and Holm.
Process the ontology from the Gene Ontology
website, as an .obo file or as
OBO Graphs JSON (go-basic.json).
The data structure is a directed acyclic graph (DAG) that allows easy
traversal from leaf to root.
Map GO terms (or protein products with multiple associations to
GO terms) to GOslim terms (analog to the map2slim.pl script supplied
by geneontology.org)
Installation
Make sure your Python version >= 3.7, and download an
.obo file of the most current
GO:
and can filter on the significance of (e)nrichment or (p)urification. it
can report various multiple testing corrected p-values as well as the
false discovery rate.
The e in the “Enrichment” column means “enriched” - the concentration
of GO term in the study group is significantly higher than those in
the population. The “p” stands for “purified” - significantly lower
concentration of the GO term in the study group than in the population.
Important note: by default, goatools find_enrichment propagates counts
to all the parents of a GO term. As a result, users may find terms in
the output that are not present in their association file. Use
--no_propagate_counts to disable this behavior.
Because of that propagation, broad parent terms inherit the genes of their more
specific children and tend to look enriched whenever a child is. Pass
--algorithm=elim to score terms with the decorrelating elim algorithm
(Alexa 2006, ported from
topGO), which removes a significant
term’s genes from all of its ancestors before scoring them. See
find_enrichment.
Write GO hierarchy
goatools wr_hier: Given a GO ID, write the hierarchy below (default)
or above (--up) the given GO.
Optionally plot children of user-specfied GO terms
goatools plot_go_term can plot the lineage
of a certain GO term, by:
goatools plot_go_term --term=GO:0008135
This command will plot the following image.
Sometimes people like to stylize the graph themselves, use option
--gml to generate a GML output which can then be used in an external
graph editing software like Cytoscape. The
following image is produced by importing the GML file into Cytoscape
using yFile orthogonal layout and solid VizMapping. Note that the GML
reader plugin may need to be
downloaded and installed in the plugins folder of Cytoscape:
goatools plot_go_term --term=GO:0008135 --gml
Map GO terms to GOslim terms
See goatools map_to_slim for usage. As arguments it takes the gene ontology
files:
the current gene ontology file go-basic.obo
the GOslim file to be used (e.g. goslim_generic.obo or any other GOslim file)
The script either maps one GO term to its GOslim terms, or protein
products with multiple associations to all its GOslim terms.
To determine the GOslim terms for a single GO term, you can use the
following command:
hommel, hommel closed method based on Simes tests (non-negative)
fdr_bh, fdr correction with Benjamini/Hochberg (non-negative)
fdr_by, fdr correction with Benjamini/Yekutieli (negative)
fdr_tsbh, two stage fdr correction (non-negative)
fdr_tsbky, two stage fdr correction (non-negative)
fdr_gbs, fdr adaptive Gavrilov-Benjamini-Sarkar
In total 15 tests are available, which can be selected using option
--method. Please note that the default FDR (fdr) uses a resampling
strategy which may lead to slightly different q-values between runs.
评论