goatools


Namegoatools JSON
Version 1.4.5 PyPI version JSON
download
home_pagehttp://github.com/tanghaibao/goatools
SummaryPython scripts to find enrichment of GO terms
upload_time2024-05-05 14:18:59
maintainerNone
docs_urlNone
authorHaibao Tang, DV Klopfenstein
requires_pythonNone
licenseBSD
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Tools for Gene Ontology

[![DOI](/doc/images/DOI.svg)](https://www.nature.com/articles/s41598-018-28948-z)
[![Latest PyPI version](https://img.shields.io/pypi/v/goatools.svg)](https://pypi.python.org/pypi/goatools)
[![bioconda](https://img.shields.io/badge/install%20with-bioconda-brightgreen.svg?style=flat)](http://bioconda.github.io/recipes/goatools/README.html?highlight=goatools)
[![Github Actions](https://github.com/tanghaibao/goatools/workflows/build/badge.svg)](https://github.com/tanghaibao/goatools/actions)
[![Downloads](https://pepy.tech/badge/goatools)](https://pepy.tech/project/goatools)

|         |                                                                       |
| ------- | --------------------------------------------------------------------- |
| Authors | Haibao Tang ([tanghaibao](http://github.com/tanghaibao))              |
|         | DV Klopfenstein ([dvklopfenstein](https://github.com/dvklopfenstein)) |
|         | Brent Pedersen ([brentp](http://github.com/brentp))                   |
|         | Fidel Ramirez ([fidelram](https://github.com/fidelram))               |
|         | Aurelien Naldi ([aurelien-naldi](http://github.com/aurelien-naldi))   |
|         | Patrick Flick ([patflick](http://github.com/patflick))                |
|         | Jeff Yunes ([yunesj](http://github.com/yunesj))                       |
|         | Kenta Sato ([bicycle1885](http://github.com/bicycle1885))             |
|         | Chris Mungall ([cmungall](https://github.com/cmungall))               |
|         | Greg Stupp ([stuppie](https://github.com/stuppie))                    |
|         | David DeTomaso ([deto](https://github.com/deto))                      |
|         | Olga Botvinnik ([olgabot](https://github.com/olgabot))                |
| Email   | <tanghaibao@gmail.com>                                                |
| License | BSD                                                                   |

## Description

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](http://www.statsmodels.org/stable/index.html): 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 obo-formatted file from [Gene Ontology
  website](http://geneontology.org). The data structure is a directed
  acyclic graph (DAG) that allows easy traversal from leaf to root.

- Read [GO Association files](http://geneontology.org/page/go-annotation-file-formats):

  - GAF ([GO Annotation
    File](http://geneontology.org/page/go-annotation-file-gaf-format-21))
  - GPAD ([Gene Product Association Data](https://geneontology.github.io/docs/gene-product-association-data-gpad-format/))
  - NCBI's gene2go file
  - id2gos format. See [example](https://raw.githubusercontent.com/tanghaibao/goatools/main/data/association)

- [Print **_decendants count_** and/or **_information content_**](/notebooks/dcnt_and_tinfo.ipynb)
  for a list of GO terms

- [Get parents or ancestors for a GO term with or without optional
  relationships](notebooks/parents_and_ancestors.ipynb), including [Print details about a
  GO ID's parents](notebooks/parent_go_terms.ipynb)

- Compare two or more lists of GO IDs
- [Plot GO hierarchies](https://github.com/tanghaibao/goatools#plot-go-lineage)
- [Write GO hierarchies to an ASCII text file](https://github.com/tanghaibao/goatools#write-go-hierarchy)
- Group GO terms for easier viewing

- 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)

## To Cite

Klopfenstein DV, Zhang L, Pedersen BS, ... Tang H [GOATOOLS: A Python library for Gene Ontology analyses](https://www.nature.com/articles/s41598-018-28948-z)
_Scientific reports_ | (2018) 8:10872 | DOI:10.1038/s41598-018-28948-z

- **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](https://www.nature.com/articles/s41598-018-28948-z).
- **Compare GO lists**:
  Compare [two](https://github.com/tanghaibao/goatools/issues/162) or more lists
  of GO IDs using `compare_gos.py`, 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](https://github.com/dvklopfenstein/goatools_simulation#manuscript-figures),
  meaning fewer truly significant observations go unreported.
  The code for the stochastic GOEA simulations
  described in the paper is found [here](https://github.com/dvklopfenstein/goatools_simulation)

## Installation

Make sure your Python version >= 3.7, and download an
`.obo` file of the most current
[GO](http://geneontology.org/docs/download-ontology):

```bash
wget http://current.geneontology.org/ontology/go-basic.obo
```

or `.obo` file for the most current [GO
Slim](http://geneontology.org/docs/go-subset-guide/) terms (e.g.
generic GOslim) :

```bash
wget http://current.geneontology.org/ontology/subsets/goslim_generic.obo
```



### [PyPI](https://pypi.org/project/goatools/)

```bash
pip install goatools
```

To install the development version:

```bash
pip install git+git://github.com/tanghaibao/goatools.git
```

### [Bioconda](http://bioconda.github.io/recipes/goatools/README.html?highlight=goatools)
```bash
conda install -c bioconda goatools
```

## Dependencies

When installing via PyPI or Bioconda as described above, all dependencies are automatically downloaded.
Alternatively, you can manually install:

- For statistical testing of GO enrichment:
  - [`scipy.stats.fisher_exact`](https://docs.scipy.org/doc/scipy/reference/generated/scipy.stats.fisher_exact.html)
  - `statsmodels` (optional) for access to a variety of statistical tests for GOEA


- To plot the ontology lineage, install one of these two options:
  - [Graphviz](http://www.graphviz.org/), for graph visualization.
  - [pygraphviz](http://networkx.lanl.gov/pygraphviz/), Python binding for communicating with Graphviz:
  - [pydot](https://code.google.com/p/pydot/), a Python interface to Graphviz's Dot language.

## Cookbook

`run.sh` contains example cases, which calls the utility scripts in the
`scripts` folder.

### Find GO enrichment of genes under study

See examples in [find_enrichment](/doc/md/README_find_enrichment.md)

The `find_enrichment.py` takes as arguments files
containing:

- gene names in a study
- gene names in population (or other study if `--compare` is specified)
- an association file that maps a gene name to a GO category.

Please look at `tests/data` folder to see examples on how to make these
files. when ready, the command looks like:

```bash
python scripts/find_enrichment.py --pval=0.05 --indent data/study \
                                  data/population data/association
```

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, `find_enrichment.py` 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.

### Write GO hierarchy

- [`wr_hier.py`](doc/md/README_wr_hier.md): Given a GO ID, write the hierarchy below (default)
  or above (`--up`) the given GO.

### Plot GO lineage

- [`go_plot.py`](doc/md/README_go_plot.md):
  - Plots user-specified GO term(s) up to root
  - Multiple user-specified GOs
  - User-defined colors
  - Plot relationships (`-r`)
  - Optionally plot children of user-specfied GO terms
- `plot_go_term.py` can plot the lineage
of a certain GO term, by:

```bash
python scripts/plot_go_term.py --term=GO:0008135
```

This command will plot the following image.

![GO term lineage](https://www.dropbox.com/s/4zbqx8sqcls3mge/gograph.png?raw=1)

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](http://www.cytoscape.org/). 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](https://code.google.com/p/graphmlreader/) may need to be
downloaded and installed in the `plugins` folder of Cytoscape:

```bash
python scripts/plot_go_term.py --term=GO:0008135 --gml
```

![GO term lineage (Cytoscape)](https://www.dropbox.com/s/ueov2ioxl063q8h/gograph-gml.png?raw=1)

### Map GO terms to GOslim terms

See `map_to_slim.py` 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:

```bash
python scripts/map_to_slim.py --term=GO:0008135 go-basic.obo goslim_generic.obo
```

To determine the GOslim terms for protein products with multiple
associations:

```bash
python scripts/map_to_slim.py --association_file=data/association go-basic.obo goslim_generic.obo
```

Where the `association` file has the same format as used for
`find_enrichment.py`.

The implementation is similar to
[map2slim](http://search.cpan.org/~cmungall/go-perl/scripts/map2slim).

## Technical notes

### Available statistical tests for calculating uncorrected p-values

For calculating uncorrected p-values, we use SciPy:

- [`scipy.stats.fisher_exact`](https://docs.scipy.org/doc/scipy/reference/generated/scipy.stats.fisher_exact.html)

### Available multiple test corrections

We have implemented several significance tests:

- `bonferroni`, bonferroni correction
- `sidak`, sidak correction
- `holm`, hold correction
- `fdr`, false discovery rate (fdr) implementation using resampling

Additional methods are available if `statsmodels` is installed:

- `sm_bonferroni`, bonferroni one-step correction
- `sm_sidak`, sidak one-step correction
- `sm_holm-sidak`, holm-sidak step-down method using Sidak adjustments
- `sm_holm`, holm step-down method using Bonferroni adjustments
- `simes-hochberg`, simes-hochberg step-up method (independent)
- `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.

## iPython [Notebooks](notebooks)

### Optional attributes

[definition](notebooks/Optional_attribute_definition.ipynb)

### Run a Ontology Enrichment Analysis (GOEA)

[goea_nbt3102](notebooks/goea_nbt3102.ipynb)
[human phenotype ontologies](notebooks/Enrichment_analyses_human_phenotype_ontology.ipynb)

### Show many study genes are associated with RNA, translation, mitochondria, and ribosomal

[goea_nbt3102_group_results](notebooks/goea_nbt3102_group_results.ipynb)

### Report level and depth counts of a set of GO terms

[report_depth_level](notebooks/report_depth_level.ipynb)

### Find all human protein-coding genes associated with cell cycle

[cell_cycle](notebooks/cell_cycle.ipynb)

### Calculate annotation coverage of GO terms on various species

[annotation_coverage](notebooks/annotation_coverage.ipynb)

### Determine the semantic similarities between GO terms

[semantic_similarity](notebooks/semantic_similarity.ipynb) [semantic_similarity_wang](notebooks/semantic_similarity_wang.ipynb)

### Obsolete GO terms are loaded upon request

[godag_obsolete_terms](notebooks/godag_obsolete_terms.ipynb)

## Want to Help?

Prior to submitting your pull request, please add a test which verifies your code, and run:

```console
make test
```

Items that we know we need include:

- Add code coverage runs
- Edit tests in the `makefile` under the comment
- Help setting up [documentation](http://goatools.readthedocs.io/en/latest/). We
  are using Sphinx and Python docstrings to create documentation.
  For documentation practice, use make targets:

  ```bash
  make mkdocs_practice
  ```

  To remove practice documentation:

  ```bash
  make rmdocs_practice
  ```

  Once you are happy with the documentation do:

  ```bash
  make gh-pages
  ```

## Star History

[![Star History Chart](https://api.star-history.com/svg?repos=tanghaibao/goatools&type=Date)](https://star-history.com/#tanghaibao/goatools&Date)

Copyright (C) 2010-2021, Haibao Tang et al. All rights reserved.



            

Raw data

            {
    "_id": null,
    "home_page": "http://github.com/tanghaibao/goatools",
    "name": "goatools",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": null,
    "author": "Haibao Tang, DV Klopfenstein",
    "author_email": "tanghaibao@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/5f/5b/d8c58daa81be087d3cc1b1f72253b004c27acd91eac043ac004a69cba4ec/goatools-1.4.5.tar.gz",
    "platform": null,
    "description": "# Tools for Gene Ontology\n\n[![DOI](/doc/images/DOI.svg)](https://www.nature.com/articles/s41598-018-28948-z)\n[![Latest PyPI version](https://img.shields.io/pypi/v/goatools.svg)](https://pypi.python.org/pypi/goatools)\n[![bioconda](https://img.shields.io/badge/install%20with-bioconda-brightgreen.svg?style=flat)](http://bioconda.github.io/recipes/goatools/README.html?highlight=goatools)\n[![Github Actions](https://github.com/tanghaibao/goatools/workflows/build/badge.svg)](https://github.com/tanghaibao/goatools/actions)\n[![Downloads](https://pepy.tech/badge/goatools)](https://pepy.tech/project/goatools)\n\n|         |                                                                       |\n| ------- | --------------------------------------------------------------------- |\n| Authors | Haibao Tang ([tanghaibao](http://github.com/tanghaibao))              |\n|         | DV Klopfenstein ([dvklopfenstein](https://github.com/dvklopfenstein)) |\n|         | Brent Pedersen ([brentp](http://github.com/brentp))                   |\n|         | Fidel Ramirez ([fidelram](https://github.com/fidelram))               |\n|         | Aurelien Naldi ([aurelien-naldi](http://github.com/aurelien-naldi))   |\n|         | Patrick Flick ([patflick](http://github.com/patflick))                |\n|         | Jeff Yunes ([yunesj](http://github.com/yunesj))                       |\n|         | Kenta Sato ([bicycle1885](http://github.com/bicycle1885))             |\n|         | Chris Mungall ([cmungall](https://github.com/cmungall))               |\n|         | Greg Stupp ([stuppie](https://github.com/stuppie))                    |\n|         | David DeTomaso ([deto](https://github.com/deto))                      |\n|         | Olga Botvinnik ([olgabot](https://github.com/olgabot))                |\n| Email   | <tanghaibao@gmail.com>                                                |\n| License | BSD                                                                   |\n\n## Description\n\nThis package contains a Python library to\n\n- Process over- and under-representation of certain GO terms, based on\n  Fisher's exact test. With numerous multiple correction routines\n  including locally implemented routines for Bonferroni, Sidak, Holm,\n  and false discovery rate. Also included are multiple test\n  corrections from\n  [statsmodels](http://www.statsmodels.org/stable/index.html): FDR\n  Benjamini/Hochberg, FDR Benjamini/Yekutieli, Holm-Sidak,\n  Simes-Hochberg, Hommel, FDR 2-stage Benjamini-Hochberg, FDR 2-stage\n  Benjamini-Krieger-Yekutieli, FDR adaptive Gavrilov-Benjamini-Sarkar,\n  Bonferroni, Sidak, and Holm.\n\n- Process the obo-formatted file from [Gene Ontology\n  website](http://geneontology.org). The data structure is a directed\n  acyclic graph (DAG) that allows easy traversal from leaf to root.\n\n- Read [GO Association files](http://geneontology.org/page/go-annotation-file-formats):\n\n  - GAF ([GO Annotation\n    File](http://geneontology.org/page/go-annotation-file-gaf-format-21))\n  - GPAD ([Gene Product Association Data](https://geneontology.github.io/docs/gene-product-association-data-gpad-format/))\n  - NCBI's gene2go file\n  - id2gos format. See [example](https://raw.githubusercontent.com/tanghaibao/goatools/main/data/association)\n\n- [Print **_decendants count_** and/or **_information content_**](/notebooks/dcnt_and_tinfo.ipynb)\n  for a list of GO terms\n\n- [Get parents or ancestors for a GO term with or without optional\n  relationships](notebooks/parents_and_ancestors.ipynb), including [Print details about a\n  GO ID's parents](notebooks/parent_go_terms.ipynb)\n\n- Compare two or more lists of GO IDs\n- [Plot GO hierarchies](https://github.com/tanghaibao/goatools#plot-go-lineage)\n- [Write GO hierarchies to an ASCII text file](https://github.com/tanghaibao/goatools#write-go-hierarchy)\n- Group GO terms for easier viewing\n\n- Map GO terms (or protein products with multiple associations to\n  GO terms) to GOslim terms (analog to the map2slim.pl script supplied\n  by geneontology.org)\n\n## To Cite\n\nKlopfenstein DV, Zhang L, Pedersen BS, ... Tang H [GOATOOLS: A Python library for Gene Ontology analyses](https://www.nature.com/articles/s41598-018-28948-z)\n_Scientific reports_ | (2018) 8:10872 | DOI:10.1038/s41598-018-28948-z\n\n- **GO Grouping**:\n  Visualize the major findings in a gene ontology enrichment analysis (GOEA) more easily with grouping.\n  A detailed description of GOATOOLS GO grouping is found in the\n  [manuscript](https://www.nature.com/articles/s41598-018-28948-z).\n- **Compare GO lists**:\n  Compare [two](https://github.com/tanghaibao/goatools/issues/162) or more lists\n  of GO IDs using `compare_gos.py`, which can be used with or without\n  grouping.\n- **Stochastic GOEA simulations**:\n  One of the findings resulting from our simulations is:\n  [Larger study sizes result in higher GOEA sensitivity](https://github.com/dvklopfenstein/goatools_simulation#manuscript-figures),\n  meaning fewer truly significant observations go unreported.\n  The code for the stochastic GOEA simulations\n  described in the paper is found [here](https://github.com/dvklopfenstein/goatools_simulation)\n\n## Installation\n\nMake sure your Python version >= 3.7, and download an\n`.obo` file of the most current\n[GO](http://geneontology.org/docs/download-ontology):\n\n```bash\nwget http://current.geneontology.org/ontology/go-basic.obo\n```\n\nor `.obo` file for the most current [GO\nSlim](http://geneontology.org/docs/go-subset-guide/) terms (e.g.\ngeneric GOslim) :\n\n```bash\nwget http://current.geneontology.org/ontology/subsets/goslim_generic.obo\n```\n\n\n\n### [PyPI](https://pypi.org/project/goatools/)\n\n```bash\npip install goatools\n```\n\nTo install the development version:\n\n```bash\npip install git+git://github.com/tanghaibao/goatools.git\n```\n\n### [Bioconda](http://bioconda.github.io/recipes/goatools/README.html?highlight=goatools)\n```bash\nconda install -c bioconda goatools\n```\n\n## Dependencies\n\nWhen installing via PyPI or Bioconda as described above, all dependencies are automatically downloaded.\nAlternatively, you can manually install:\n\n- For statistical testing of GO enrichment:\n  - [`scipy.stats.fisher_exact`](https://docs.scipy.org/doc/scipy/reference/generated/scipy.stats.fisher_exact.html)\n  - `statsmodels` (optional) for access to a variety of statistical tests for GOEA\n\n\n- To plot the ontology lineage, install one of these two options:\n  - [Graphviz](http://www.graphviz.org/), for graph visualization.\n  - [pygraphviz](http://networkx.lanl.gov/pygraphviz/), Python binding for communicating with Graphviz:\n  - [pydot](https://code.google.com/p/pydot/), a Python interface to Graphviz's Dot language.\n\n## Cookbook\n\n`run.sh` contains example cases, which calls the utility scripts in the\n`scripts` folder.\n\n### Find GO enrichment of genes under study\n\nSee examples in [find_enrichment](/doc/md/README_find_enrichment.md)\n\nThe `find_enrichment.py` takes as arguments files\ncontaining:\n\n- gene names in a study\n- gene names in population (or other study if `--compare` is specified)\n- an association file that maps a gene name to a GO category.\n\nPlease look at `tests/data` folder to see examples on how to make these\nfiles. when ready, the command looks like:\n\n```bash\npython scripts/find_enrichment.py --pval=0.05 --indent data/study \\\n                                  data/population data/association\n```\n\nand can filter on the significance of (e)nrichment or (p)urification. it\ncan report various multiple testing corrected p-values as well as the\nfalse discovery rate.\n\nThe `e` in the \"Enrichment\" column means \"enriched\" - the concentration\nof GO term in the study group is significantly _higher_ than those in\nthe population. The \"p\" stands for \"purified\" - significantly _lower_\nconcentration of the GO term in the study group than in the population.\n\n**Important note**: by default, `find_enrichment.py` propagates counts\nto all the parents of a GO term. As a result, users may find terms in\nthe output that are not present in their `association` file. Use\n`--no_propagate_counts` to disable this behavior.\n\n### Write GO hierarchy\n\n- [`wr_hier.py`](doc/md/README_wr_hier.md): Given a GO ID, write the hierarchy below (default)\n  or above (`--up`) the given GO.\n\n### Plot GO lineage\n\n- [`go_plot.py`](doc/md/README_go_plot.md):\n  - Plots user-specified GO term(s) up to root\n  - Multiple user-specified GOs\n  - User-defined colors\n  - Plot relationships (`-r`)\n  - Optionally plot children of user-specfied GO terms\n- `plot_go_term.py` can plot the lineage\nof a certain GO term, by:\n\n```bash\npython scripts/plot_go_term.py --term=GO:0008135\n```\n\nThis command will plot the following image.\n\n![GO term lineage](https://www.dropbox.com/s/4zbqx8sqcls3mge/gograph.png?raw=1)\n\nSometimes people like to stylize the graph themselves, use option\n`--gml` to generate a GML output which can then be used in an external\ngraph editing software like [Cytoscape](http://www.cytoscape.org/). The\nfollowing image is produced by importing the GML file into Cytoscape\nusing yFile orthogonal layout and solid VizMapping. Note that the [GML\nreader plugin](https://code.google.com/p/graphmlreader/) may need to be\ndownloaded and installed in the `plugins` folder of Cytoscape:\n\n```bash\npython scripts/plot_go_term.py --term=GO:0008135 --gml\n```\n\n![GO term lineage (Cytoscape)](https://www.dropbox.com/s/ueov2ioxl063q8h/gograph-gml.png?raw=1)\n\n### Map GO terms to GOslim terms\n\nSee `map_to_slim.py` for usage. As arguments it takes the gene ontology\nfiles:\n\n- the current gene ontology file `go-basic.obo`\n- the GOslim file to be used (e.g. `goslim_generic.obo` or any other GOslim file)\n\nThe script either maps one GO term to its GOslim terms, or protein\nproducts with multiple associations to all its GOslim terms.\n\nTo determine the GOslim terms for a single GO term, you can use the\nfollowing command:\n\n```bash\npython scripts/map_to_slim.py --term=GO:0008135 go-basic.obo goslim_generic.obo\n```\n\nTo determine the GOslim terms for protein products with multiple\nassociations:\n\n```bash\npython scripts/map_to_slim.py --association_file=data/association go-basic.obo goslim_generic.obo\n```\n\nWhere the `association` file has the same format as used for\n`find_enrichment.py`.\n\nThe implementation is similar to\n[map2slim](http://search.cpan.org/~cmungall/go-perl/scripts/map2slim).\n\n## Technical notes\n\n### Available statistical tests for calculating uncorrected p-values\n\nFor calculating uncorrected p-values, we use SciPy:\n\n- [`scipy.stats.fisher_exact`](https://docs.scipy.org/doc/scipy/reference/generated/scipy.stats.fisher_exact.html)\n\n### Available multiple test corrections\n\nWe have implemented several significance tests:\n\n- `bonferroni`, bonferroni correction\n- `sidak`, sidak correction\n- `holm`, hold correction\n- `fdr`, false discovery rate (fdr) implementation using resampling\n\nAdditional methods are available if `statsmodels` is installed:\n\n- `sm_bonferroni`, bonferroni one-step correction\n- `sm_sidak`, sidak one-step correction\n- `sm_holm-sidak`, holm-sidak step-down method using Sidak adjustments\n- `sm_holm`, holm step-down method using Bonferroni adjustments\n- `simes-hochberg`, simes-hochberg step-up method (independent)\n- `hommel`, hommel closed method based on Simes tests (non-negative)\n- `fdr_bh`, fdr correction with Benjamini/Hochberg (non-negative)\n- `fdr_by`, fdr correction with Benjamini/Yekutieli (negative)\n- `fdr_tsbh`, two stage fdr correction (non-negative)\n- `fdr_tsbky`, two stage fdr correction (non-negative)\n- `fdr_gbs`, fdr adaptive Gavrilov-Benjamini-Sarkar\n\nIn total 15 tests are available, which can be selected using option\n`--method`. Please note that the default FDR (`fdr`) uses a resampling\nstrategy which may lead to slightly different q-values between runs.\n\n## iPython [Notebooks](notebooks)\n\n### Optional attributes\n\n[definition](notebooks/Optional_attribute_definition.ipynb)\n\n### Run a Ontology Enrichment Analysis (GOEA)\n\n[goea_nbt3102](notebooks/goea_nbt3102.ipynb)\n[human phenotype ontologies](notebooks/Enrichment_analyses_human_phenotype_ontology.ipynb)\n\n### Show many study genes are associated with RNA, translation, mitochondria, and ribosomal\n\n[goea_nbt3102_group_results](notebooks/goea_nbt3102_group_results.ipynb)\n\n### Report level and depth counts of a set of GO terms\n\n[report_depth_level](notebooks/report_depth_level.ipynb)\n\n### Find all human protein-coding genes associated with cell cycle\n\n[cell_cycle](notebooks/cell_cycle.ipynb)\n\n### Calculate annotation coverage of GO terms on various species\n\n[annotation_coverage](notebooks/annotation_coverage.ipynb)\n\n### Determine the semantic similarities between GO terms\n\n[semantic_similarity](notebooks/semantic_similarity.ipynb) [semantic_similarity_wang](notebooks/semantic_similarity_wang.ipynb)\n\n### Obsolete GO terms are loaded upon request\n\n[godag_obsolete_terms](notebooks/godag_obsolete_terms.ipynb)\n\n## Want to Help?\n\nPrior to submitting your pull request, please add a test which verifies your code, and run:\n\n```console\nmake test\n```\n\nItems that we know we need include:\n\n- Add code coverage runs\n- Edit tests in the `makefile` under the comment\n- Help setting up [documentation](http://goatools.readthedocs.io/en/latest/). We\n  are using Sphinx and Python docstrings to create documentation.\n  For documentation practice, use make targets:\n\n  ```bash\n  make mkdocs_practice\n  ```\n\n  To remove practice documentation:\n\n  ```bash\n  make rmdocs_practice\n  ```\n\n  Once you are happy with the documentation do:\n\n  ```bash\n  make gh-pages\n  ```\n\n## Star History\n\n[![Star History Chart](https://api.star-history.com/svg?repos=tanghaibao/goatools&type=Date)](https://star-history.com/#tanghaibao/goatools&Date)\n\nCopyright (C) 2010-2021, Haibao Tang et al. All rights reserved.\n\n\n",
    "bugtrack_url": null,
    "license": "BSD",
    "summary": "Python scripts to find enrichment of GO terms",
    "version": "1.4.5",
    "project_urls": {
        "Homepage": "http://github.com/tanghaibao/goatools"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "33fdfcc6653c3153061b76ca4de3e5ea9f3a5da2eeb8fee0708625cfb260a468",
                "md5": "3b183f1d8a165bbccc5b7e5f1add3f4d",
                "sha256": "ee68ed55145858493eb5f23cfc4bcb1b3a8325c29242f68a395f865ffe653ebb"
            },
            "downloads": -1,
            "filename": "goatools-1.4.5-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "3b183f1d8a165bbccc5b7e5f1add3f4d",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 15764683,
            "upload_time": "2024-05-05T14:18:53",
            "upload_time_iso_8601": "2024-05-05T14:18:53.438016Z",
            "url": "https://files.pythonhosted.org/packages/33/fd/fcc6653c3153061b76ca4de3e5ea9f3a5da2eeb8fee0708625cfb260a468/goatools-1.4.5-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "5f5bd8c58daa81be087d3cc1b1f72253b004c27acd91eac043ac004a69cba4ec",
                "md5": "b11a327b766ccdd61e83e15205805890",
                "sha256": "a2417e1869669172086530cd70f43af5087b6c1b44e7f6831a25df158f02e21e"
            },
            "downloads": -1,
            "filename": "goatools-1.4.5.tar.gz",
            "has_sig": false,
            "md5_digest": "b11a327b766ccdd61e83e15205805890",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 15092044,
            "upload_time": "2024-05-05T14:18:59",
            "upload_time_iso_8601": "2024-05-05T14:18:59.866355Z",
            "url": "https://files.pythonhosted.org/packages/5f/5b/d8c58daa81be087d3cc1b1f72253b004c27acd91eac043ac004a69cba4ec/goatools-1.4.5.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-05-05 14:18:59",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "tanghaibao",
    "github_project": "goatools",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "goatools"
}
        
Elapsed time: 0.30073s