<p align="left">
<img src="https://raw.githubusercontent.com/cogent3/cogent3.github.io/e72df8c155c100f502b6a7009347d1821ab3adef/doc/_static/c3-logo.svg" width="300">
</p>
[![PyPI version](https://badge.fury.io/py/cogent3.svg)](https://badge.fury.io/py/cogent3)
[![Downloads](https://pepy.tech/badge/cogent3/month)](https://pepy.tech/project/cogent3)
[![Build Status](https://github.com/cogent3/cogent3/workflows/CI/badge.svg?branch=develop)](https://github.com/cogent3/cogent3/actions?workflow=CI)
[![coverall](https://coveralls.io/repos/github/cogent3/cogent3/badge.svg?branch=develop)](https://coveralls.io/github/cogent3/cogent3?branch=develop)
![PyPI - Python Version](https://img.shields.io/pypi/pyversions/cogent3)
[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)
[![CodeQL](https://github.com/cogent3/cogent3/actions/workflows/codeql.yml/badge.svg)](https://github.com/cogent3/cogent3/actions/workflows/codeql.yml)
[![Codacy Badge](https://app.codacy.com/project/badge/Grade/e80e3441de59449bb1a4d8ad1fdea4fa)](https://app.codacy.com/gh/cogent3/cogent3/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade)
`cogent3` is a mature python library for analysis of genomic sequence data. We endeavour to provide a first-class experience within Jupyter notebooks, but the algorithms also support parallel execution on compute systems with 1000's of processors.
## 📣 Feature Announcements 📣
<details>
<summary> New core data types improve efficiency and flexibility </summary>
The cogent3 development team 👾 have been hard at work modernising the core internals 💪🛠.
The grand rewrite of alignment classes is ready for use! The new approach gives us the foundation for major performance improvements in the future. As with the moltype, alphabet, genetic code and `SequenceCollection`, you can select the new class via `make_aligned_seqs()` or `load_aligned_seqs()` by specifying `new_type=True`.
These are not yet the default and are not fully integrated into the existing code. They can also differ in their API relative to the classes they replace.
We encourage experimentation in cases where integration with old objects is NOT required and [look forward to any feedback](https://github.com/cogent3/cogent3/discussions)!
</details>
<details>
<summary> Faster pairwise genetic distance calculations 🚀 </summary>
We have completely rewritten a subset of the genetic distance calculators. These are now only available using the new type `Alignment.distance_matrix()` method. Single CPU performance is faster and we now also support parallel execution.
</details>
<details>
<summary> Faster sequence coevolution measures 🚀 </summary>
We have completely rewritten all the Mutual Information based coevolution statistic calculators. Single CPU performance is orders of magnitude faster than the old implementation and we now also support parallel execution. The existing `Alignment.coevolution()` method uses these so you don't need to do anything different to use the new algorithms.
</details>
<details>
<summary> Faster sequence format parsers 💨 </summary>
We have faster implementations of the parsers for Fasta and GenBank sequence formats. These are used by our standard loading mechanisms. If you just want to get the contents of files in those formats as standard Python types, use `cogent3.parser.fasta.iter_fasta_records()` or `cogent3.parser.genbank.iter_genbank_records()`.
</details>
<details>
<summary> Supporting third-party apps as plugins 🔌 </summary>
Cogent3 now provides support for plugins! Third-party developers can deploy their code as cogent3 apps with just a few lines. See the [demo project](https://github.com/cogent3/app_template).
Post any questions you have in [cogent3 discussions](https://github.com/cogent3/cogent3/discussions).
</details>
<details>
<summary> The developers of Cogent3 and IQ-TREE2 announce piqtree2 🎉 </summary>
Speaking of plugins, our first major third-party plugin is [piqtree2](https://pypi.org/project/piqtree2). Try it out and [give us feedback](https://github.com/iqtree/piqtree2/discussions).
</details>
## Who is it for?
### Anyone who wants to analyse sequence divergence using robust statistical models
`cogent3` is unique in providing numerous [non-stationary Markov models](http://www.ncbi.nlm.nih.gov/pubmed/25503772) for modelling sequence evolution, [including codon models](https://www.ncbi.nlm.nih.gov/pubmed/28175284). `cogent3` also includes an extensive collection of time-reversible models (again including [novel codon models](https://www.ncbi.nlm.nih.gov/pubmed/19815689)). We have done more than just invent these new methods, we have [established the most robust algorithms](https://www.ncbi.nlm.nih.gov/pubmed/19099591) for their implementation and their [suitability for real data](https://www.ncbi.nlm.nih.gov/pubmed/23935949). Additionally, there are novel signal processing methods focussed on statistical estimation of [integer period signals](https://www.ncbi.nlm.nih.gov/pubmed/21527008).
<details>
<summary> 🎬 Demo non-reversible substitution model </summary>
<video src="https://user-images.githubusercontent.com/3102996/253845402-f511af2c-c2e2-48bc-8f6e-f9b0f05697e9.mp4" controls="controls" style="max-height:640px">
</video>
</details>
### Anyone who wants to undertake exploratory genomic data analysis
Beyond our novel methods, `cogent3` provides an extensive suite of capabilities for manipulating and analysing sequence data. You can manipulate sequences by their annotations, e.g.
<details>
<summary> 🎬 Demo sequences with annotations </summary>
<video src="https://user-images.githubusercontent.com/3102996/253847297-2611cda8-e078-4b86-a269-43fbf6ced14c.mp4" controls="controls" style="max-height:640px">
</video>
</details>
Plus, you can read standard tabular and biological data formats, perform multiple sequence alignment using any `cogent3` substitution models, phylogenetic reconstruction and tree manipulation, manipulation of tabular data, visualisation of phylogenies and much more.
### Beginner friendly approach to genomic data analysis
Our `cogent3.app` module provides a very different approach to using the library capabilities. Expertise in structural programming concepts is not essential!
<details>
<summary> 🎬 Demo friendly coding </summary>
<video src="https://user-images.githubusercontent.com/3102996/253849168-a821de1a-1aad-4761-970f-e365f6b3b1cd.mp4" controls="controls" style="max-height:640px">
</video>
</details>
## Installation?
```bash
$ pip install cogent3
```
### Install `extra` -- adds visualisation support
The `extra` group includes python libraries required for visualisation, i.e. [plotly](https://pypi.org/project/plotly/), [kaleido](https://pypi.org/project/kaleido/), [psutil](https://pypi.org/project/psutil/) and [pandas](https://pypi.org/project/pandas/).
```bash
$ pip install "cogent3[extra]"
```
### Install `dev` -- adds `cogent3` development related libraries
The `dev` group includes python libraries required for development of `cogent3`.
```bash
$ pip install "cogent3[dev]"
```
### Install the development version
```bash
$ pip install git+https://github.com/cogent3/cogent3.git@develop#egg=cogent3
```
## Project Information
`cogent3` is released under the BSD-3 license, documentation is at [cogent3.org](https://cogent3.org), while [`cogent3` code is on GitHub](https://github.com/cogent3/cogent3). If you would like to contribute (and we hope you do!), we have created a companion [`c3dev` GitHub](https://github.com/cogent3/c3dev) repo which provides details on how to contribute and some useful tools for doing so.
## Project History
`cogent3` is a descendant of [PyCogent](https://github.com/pycogent/pycogent.github.com). While there is much in common with PyCogent, the amount of change has been substantial, motivating the name change to `cogent3`. This name has been chosen because `cogent` was always the import name (dating back to [PyEvolve in 2004](https://www.ncbi.nlm.nih.gov/pubmed/14706121)) and it's Python 3 only.
Given this history, we are grateful to the multitude of individuals who have made contributions over the years. Many of these contributors were also co-authors on the original [PyEvolve](https://www.ncbi.nlm.nih.gov/pubmed/14706121) and [PyCogent](https://www.ncbi.nlm.nih.gov/pubmed/17708774) publications. Individual contributions can be seen by using "view git blame" on individual lines of code on GitHub , through git log in the terminal, and more recently the changelog.
Compared to PyCogent version 1.9, there has been a massive amount of changes. These include integration of many of the new developments on algorithms and modelling published by the [Huttley lab](https://biology.anu.edu.au/research/groups/huttley-group-bioinformatics-molecular-evolution-genomes) over the last decade. We have also modernised our dependencies. For example, we now use `plotly` for visualisation, `tqdm` for progress bar display, `concurrent.futures` and `mpi4py.futures` for parallel process execution, `nox` and `pytest` for unit testing.
## Funding
Cogent3 has received funding support from the Australian National University and an [Essential Open Source Software for Science Grant](https://chanzuckerberg.com/eoss/proposals/cogent3-python-apis-for-iq-tree-and-graphbin-via-a-plug-in-architecture/) from the Chan Zuckerberg Initiative.
<p align="center">
<img src="https://webstyle.anu.edu.au/_anu/4/images/logos/2x_anu_logo_small.svg" height="100">
<img src="https://chanzuckerberg.com/wp-content/themes/czi/img/logo.svg" height="110">
</p>
Raw data
{
"_id": null,
"home_page": null,
"name": "cogent3",
"maintainer": null,
"docs_url": null,
"requires_python": "<3.14,>=3.10",
"maintainer_email": null,
"keywords": "biology, genomics, statistics, phylogeny, evolution, bioinformatics",
"author": null,
"author_email": "Gavin Huttley <Gavin.Huttley@anu.edu.au>",
"download_url": "https://files.pythonhosted.org/packages/2e/f8/d6e076e1a3c03e1a93e2350a698eb13718eb8b62b1d3da48e17e71afd45c/cogent3-2024.12.19a1.tar.gz",
"platform": null,
"description": "\n<p align=\"left\">\n <img src=\"https://raw.githubusercontent.com/cogent3/cogent3.github.io/e72df8c155c100f502b6a7009347d1821ab3adef/doc/_static/c3-logo.svg\" width=\"300\">\n</p>\n\n[![PyPI version](https://badge.fury.io/py/cogent3.svg)](https://badge.fury.io/py/cogent3)\n[![Downloads](https://pepy.tech/badge/cogent3/month)](https://pepy.tech/project/cogent3)\n\n[![Build Status](https://github.com/cogent3/cogent3/workflows/CI/badge.svg?branch=develop)](https://github.com/cogent3/cogent3/actions?workflow=CI)\n[![coverall](https://coveralls.io/repos/github/cogent3/cogent3/badge.svg?branch=develop)](https://coveralls.io/github/cogent3/cogent3?branch=develop)\n\n![PyPI - Python Version](https://img.shields.io/pypi/pyversions/cogent3)\n[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)\n\n[![CodeQL](https://github.com/cogent3/cogent3/actions/workflows/codeql.yml/badge.svg)](https://github.com/cogent3/cogent3/actions/workflows/codeql.yml)\n[![Codacy Badge](https://app.codacy.com/project/badge/Grade/e80e3441de59449bb1a4d8ad1fdea4fa)](https://app.codacy.com/gh/cogent3/cogent3/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade)\n\n`cogent3` is a mature python library for analysis of genomic sequence data. We endeavour to provide a first-class experience within Jupyter notebooks, but the algorithms also support parallel execution on compute systems with 1000's of processors.\n\n## \ud83d\udce3 Feature Announcements \ud83d\udce3\n\n<details>\n <summary> New core data types improve efficiency and flexibility </summary>\n\nThe cogent3 development team \ud83d\udc7e have been hard at work modernising the core internals \ud83d\udcaa\ud83d\udee0.\n\nThe grand rewrite of alignment classes is ready for use! The new approach gives us the foundation for major performance improvements in the future. As with the moltype, alphabet, genetic code and `SequenceCollection`, you can select the new class via `make_aligned_seqs()` or `load_aligned_seqs()` by specifying `new_type=True`.\nThese are not yet the default and are not fully integrated into the existing code. They can also differ in their API relative to the classes they replace. \n\nWe encourage experimentation in cases where integration with old objects is NOT required and [look forward to any feedback](https://github.com/cogent3/cogent3/discussions)!\n\n</details>\n\n<details>\n <summary> Faster pairwise genetic distance calculations \ud83d\ude80 </summary>\n\nWe have completely rewritten a subset of the genetic distance calculators. These are now only available using the new type `Alignment.distance_matrix()` method. Single CPU performance is faster and we now also support parallel execution.\n\n</details>\n<details>\n <summary> Faster sequence coevolution measures \ud83d\ude80 </summary>\n\nWe have completely rewritten all the Mutual Information based coevolution statistic calculators. Single CPU performance is orders of magnitude faster than the old implementation and we now also support parallel execution. The existing `Alignment.coevolution()` method uses these so you don't need to do anything different to use the new algorithms.\n\n</details>\n\n<details>\n <summary> Faster sequence format parsers \ud83d\udca8 </summary>\n\nWe have faster implementations of the parsers for Fasta and GenBank sequence formats. These are used by our standard loading mechanisms. If you just want to get the contents of files in those formats as standard Python types, use `cogent3.parser.fasta.iter_fasta_records()` or `cogent3.parser.genbank.iter_genbank_records()`.\n\n</details>\n\n<details>\n <summary> Supporting third-party apps as plugins \ud83d\udd0c </summary>\n\nCogent3 now provides support for plugins! Third-party developers can deploy their code as cogent3 apps with just a few lines. See the [demo project](https://github.com/cogent3/app_template).\n\nPost any questions you have in [cogent3 discussions](https://github.com/cogent3/cogent3/discussions).\n\n</details>\n\n<details>\n <summary> The developers of Cogent3 and IQ-TREE2 announce piqtree2 \ud83c\udf89 </summary>\n\nSpeaking of plugins, our first major third-party plugin is [piqtree2](https://pypi.org/project/piqtree2). Try it out and [give us feedback](https://github.com/iqtree/piqtree2/discussions).\n\n</details>\n\n\n\n## Who is it for?\n\n### Anyone who wants to analyse sequence divergence using robust statistical models\n\n`cogent3` is unique in providing numerous [non-stationary Markov models](http://www.ncbi.nlm.nih.gov/pubmed/25503772) for modelling sequence evolution, [including codon models](https://www.ncbi.nlm.nih.gov/pubmed/28175284). `cogent3` also includes an extensive collection of time-reversible models (again including [novel codon models](https://www.ncbi.nlm.nih.gov/pubmed/19815689)). We have done more than just invent these new methods, we have [established the most robust algorithms](https://www.ncbi.nlm.nih.gov/pubmed/19099591) for their implementation and their [suitability for real data](https://www.ncbi.nlm.nih.gov/pubmed/23935949). Additionally, there are novel signal processing methods focussed on statistical estimation of [integer period signals](https://www.ncbi.nlm.nih.gov/pubmed/21527008).\n\n<details>\n <summary> \ud83c\udfac Demo non-reversible substitution model </summary>\n <video src=\"https://user-images.githubusercontent.com/3102996/253845402-f511af2c-c2e2-48bc-8f6e-f9b0f05697e9.mp4\" controls=\"controls\" style=\"max-height:640px\">\n </video>\n</details>\n\n### Anyone who wants to undertake exploratory genomic data analysis\n\nBeyond our novel methods, `cogent3` provides an extensive suite of capabilities for manipulating and analysing sequence data. You can manipulate sequences by their annotations, e.g.\n\n<details>\n <summary> \ud83c\udfac Demo sequences with annotations </summary>\n <video src=\"https://user-images.githubusercontent.com/3102996/253847297-2611cda8-e078-4b86-a269-43fbf6ced14c.mp4\" controls=\"controls\" style=\"max-height:640px\">\n </video>\n</details>\n\nPlus, you can read standard tabular and biological data formats, perform multiple sequence alignment using any `cogent3` substitution models, phylogenetic reconstruction and tree manipulation, manipulation of tabular data, visualisation of phylogenies and much more.\n\n### Beginner friendly approach to genomic data analysis\n\nOur `cogent3.app` module provides a very different approach to using the library capabilities. Expertise in structural programming concepts is not essential!\n\n<details>\n <summary> \ud83c\udfac Demo friendly coding </summary>\n <video src=\"https://user-images.githubusercontent.com/3102996/253849168-a821de1a-1aad-4761-970f-e365f6b3b1cd.mp4\" controls=\"controls\" style=\"max-height:640px\">\n </video>\n</details>\n\n## Installation?\n\n```bash\n$ pip install cogent3\n```\n\n### Install `extra` -- adds visualisation support\n\nThe `extra` group includes python libraries required for visualisation, i.e. [plotly](https://pypi.org/project/plotly/), [kaleido](https://pypi.org/project/kaleido/), [psutil](https://pypi.org/project/psutil/) and [pandas](https://pypi.org/project/pandas/).\n\n```bash\n$ pip install \"cogent3[extra]\"\n```\n\n### Install `dev` -- adds `cogent3` development related libraries\n\nThe `dev` group includes python libraries required for development of `cogent3`.\n\n```bash\n$ pip install \"cogent3[dev]\"\n```\n\n### Install the development version\n\n```bash\n$ pip install git+https://github.com/cogent3/cogent3.git@develop#egg=cogent3\n```\n\n## Project Information\n\n`cogent3` is released under the BSD-3 license, documentation is at [cogent3.org](https://cogent3.org), while [`cogent3` code is on GitHub](https://github.com/cogent3/cogent3). If you would like to contribute (and we hope you do!), we have created a companion [`c3dev` GitHub](https://github.com/cogent3/c3dev) repo which provides details on how to contribute and some useful tools for doing so.\n\n## Project History\n\n`cogent3` is a descendant of [PyCogent](https://github.com/pycogent/pycogent.github.com). While there is much in common with PyCogent, the amount of change has been substantial, motivating the name change to `cogent3`. This name has been chosen because `cogent` was always the import name (dating back to [PyEvolve in 2004](https://www.ncbi.nlm.nih.gov/pubmed/14706121)) and it's Python 3 only.\n\nGiven this history, we are grateful to the multitude of individuals who have made contributions over the years. Many of these contributors were also co-authors on the original [PyEvolve](https://www.ncbi.nlm.nih.gov/pubmed/14706121) and [PyCogent](https://www.ncbi.nlm.nih.gov/pubmed/17708774) publications. Individual contributions can be seen by using \"view git blame\" on individual lines of code on GitHub , through git log in the terminal, and more recently the changelog.\n\nCompared to PyCogent version 1.9, there has been a massive amount of changes. These include integration of many of the new developments on algorithms and modelling published by the [Huttley lab](https://biology.anu.edu.au/research/groups/huttley-group-bioinformatics-molecular-evolution-genomes) over the last decade. We have also modernised our dependencies. For example, we now use `plotly` for visualisation, `tqdm` for progress bar display, `concurrent.futures` and `mpi4py.futures` for parallel process execution, `nox` and `pytest` for unit testing.\n\n## Funding\n\nCogent3 has received funding support from the Australian National University and an [Essential Open Source Software for Science Grant](https://chanzuckerberg.com/eoss/proposals/cogent3-python-apis-for-iq-tree-and-graphbin-via-a-plug-in-architecture/) from the Chan Zuckerberg Initiative.\n\n\n<p align=\"center\">\n \n <img src=\"https://webstyle.anu.edu.au/_anu/4/images/logos/2x_anu_logo_small.svg\" height=\"100\">\n \n <img src=\"https://chanzuckerberg.com/wp-content/themes/czi/img/logo.svg\" height=\"110\">\n</p>\n\n",
"bugtrack_url": null,
"license": null,
"summary": "COmparative GENomics Toolkit 3: genomic sequence analysis within notebooks or on compute systems with 1000s of CPUs.",
"version": "2024.12.19a1",
"project_urls": {
"Bug Tracker": "https://github.com/cogent3/cogent3/issues",
"Changelog": "https://github.com/cogent3/cogent3/blob/develop/changelog.md",
"Documentation": "https://www.cogent3.org/",
"Source Code": "https://github.com/cogent3/cogent3"
},
"split_keywords": [
"biology",
" genomics",
" statistics",
" phylogeny",
" evolution",
" bioinformatics"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "6ccc5c71dca25ad661a7d362a1d18e5a34b19a2d0373dabe13876562878907a9",
"md5": "5cff8dc243c3dbeaf129fc3070aa5981",
"sha256": "e3cd717077f69d5938be386ea5bd902feb06b3ac14df4bd65a69239789898a3f"
},
"downloads": -1,
"filename": "cogent3-2024.12.19a1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "5cff8dc243c3dbeaf129fc3070aa5981",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<3.14,>=3.10",
"size": 771884,
"upload_time": "2024-12-19T03:33:31",
"upload_time_iso_8601": "2024-12-19T03:33:31.948457Z",
"url": "https://files.pythonhosted.org/packages/6c/cc/5c71dca25ad661a7d362a1d18e5a34b19a2d0373dabe13876562878907a9/cogent3-2024.12.19a1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "2ef8d6e076e1a3c03e1a93e2350a698eb13718eb8b62b1d3da48e17e71afd45c",
"md5": "ea4523a017a1787b4dd66f3ae39de63b",
"sha256": "54cfa4dcbc9bbbae3aa8f3ba68aaa92cb774963f46328c0f42216925e68574cc"
},
"downloads": -1,
"filename": "cogent3-2024.12.19a1.tar.gz",
"has_sig": false,
"md5_digest": "ea4523a017a1787b4dd66f3ae39de63b",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<3.14,>=3.10",
"size": 17954493,
"upload_time": "2024-12-19T03:33:36",
"upload_time_iso_8601": "2024-12-19T03:33:36.072553Z",
"url": "https://files.pythonhosted.org/packages/2e/f8/d6e076e1a3c03e1a93e2350a698eb13718eb8b62b1d3da48e17e71afd45c/cogent3-2024.12.19a1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-12-19 03:33:36",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "cogent3",
"github_project": "cogent3",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [
{
"name": "chardet",
"specs": [
[
"==",
"5.2.0"
]
]
},
{
"name": "pillow",
"specs": [
[
"==",
"11.0.0"
]
]
},
{
"name": "psutil",
"specs": [
[
"==",
"6.1.0"
]
]
},
{
"name": "numpy",
"specs": [
[
"==",
"2.0.1"
]
]
},
{
"name": "numba",
"specs": [
[
">",
"0.48.0"
]
]
},
{
"name": "numba",
"specs": [
[
">",
"0.53"
]
]
},
{
"name": "numba",
"specs": [
[
">",
"0.54"
]
]
},
{
"name": "numba",
"specs": [
[
">=",
"0.57.0"
]
]
},
{
"name": "scipy",
"specs": [
[
"==",
"1.14.1"
]
]
},
{
"name": "nox",
"specs": [
[
"==",
"2024.10.9"
]
]
},
{
"name": "plotly",
"specs": [
[
"==",
"5.24.1"
]
]
},
{
"name": "typing_extensions",
"specs": [
[
">=",
"3.7"
]
]
},
{
"name": "stevedore",
"specs": [
[
"==",
"5.4.0"
]
]
}
],
"lcname": "cogent3"
}