cogent3


Namecogent3 JSON
Version 2024.7.19a9 PyPI version JSON
download
home_pageNone
SummaryCOmparative GENomics Toolkit 3: genomic sequence analysis within notebooks or on compute systems with 1000s of CPUs.
upload_time2024-10-31 21:02:33
maintainerNone
docs_urlNone
authorNone
requires_python<3.13,>=3.9
licenseNone
keywords biology genomics statistics phylogeny evolution bioinformatics
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            
<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> 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>

<details>
  <summary> New core data types improve efficiency and flexibility </summary>

The cogent3 development team 👾 are hard at work modernising the core internals 💪🛠.

In this release the `Sequence`, `SequenceCollection`, `MolType`, `GeneticCode`, and alphabet classes have all been rewritten from scratch with an eye to simplifying the code while improving its flexibility and performance. (We're working on alignments for the next release.)

The "new-style" objects enhance performance by supporting the access of the underlying data in various formats (i.e. numpy arrays, bytes or strings). You can create "new-style" objects by setting the `new_type=True` argument in top-level functions (`make_seq`, `load_seq`, `make_unaligned_seqs`, `get_moltype`, `get_code`). 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>

## 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">
  &nbsp;&nbsp;&nbsp;&nbsp;
  <img src="https://webstyle.anu.edu.au/_anu/4/images/logos/2x_anu_logo_small.svg" height="100">
  &nbsp;&nbsp;&nbsp;&nbsp;
  <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.13,>=3.9",
    "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/f5/9d/d638aefbc686e62390de667c7f8d045cf27cb9eab04196ae0f325d580af3/cogent3-2024.7.19a9.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> 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<details>\n  <summary> New core data types improve efficiency and flexibility </summary>\n\nThe cogent3 development team \ud83d\udc7e are hard at work modernising the core internals \ud83d\udcaa\ud83d\udee0.\n\nIn this release the `Sequence`, `SequenceCollection`, `MolType`, `GeneticCode`, and alphabet classes have all been rewritten from scratch with an eye to simplifying the code while improving its flexibility and performance. (We're working on alignments for the next release.)\n\nThe \"new-style\" objects enhance performance by supporting the access of the underlying data in various formats (i.e. numpy arrays, bytes or strings). You can create \"new-style\" objects by setting the `new_type=True` argument in top-level functions (`make_seq`, `load_seq`, `make_unaligned_seqs`, `get_moltype`, `get_code`). 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. \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## 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  &nbsp;&nbsp;&nbsp;&nbsp;\n  <img src=\"https://webstyle.anu.edu.au/_anu/4/images/logos/2x_anu_logo_small.svg\" height=\"100\">\n  &nbsp;&nbsp;&nbsp;&nbsp;\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.7.19a9",
    "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": "96a0eb889b207f8ad8ed3d1d87ffdbeadb1b9a27c91163e44035cb1d51930a87",
                "md5": "4308ef0cf92cd77b6aad6888c84e15ab",
                "sha256": "3a52e17f47ad8bf0b3d396ddfa4f5878061afb86e766b49a0eedb7e510985511"
            },
            "downloads": -1,
            "filename": "cogent3-2024.7.19a9-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "4308ef0cf92cd77b6aad6888c84e15ab",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<3.13,>=3.9",
            "size": 754995,
            "upload_time": "2024-10-31T21:02:30",
            "upload_time_iso_8601": "2024-10-31T21:02:30.764645Z",
            "url": "https://files.pythonhosted.org/packages/96/a0/eb889b207f8ad8ed3d1d87ffdbeadb1b9a27c91163e44035cb1d51930a87/cogent3-2024.7.19a9-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "f59dd638aefbc686e62390de667c7f8d045cf27cb9eab04196ae0f325d580af3",
                "md5": "3b44bdaeda2970884301a5aabbc0f818",
                "sha256": "5f1ab042294f718a77e0d8fa8adf3b20fefe9ef5a47b1c2092e50e8560883afa"
            },
            "downloads": -1,
            "filename": "cogent3-2024.7.19a9.tar.gz",
            "has_sig": false,
            "md5_digest": "3b44bdaeda2970884301a5aabbc0f818",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<3.13,>=3.9",
            "size": 17937701,
            "upload_time": "2024-10-31T21:02:33",
            "upload_time_iso_8601": "2024-10-31T21:02:33.316388Z",
            "url": "https://files.pythonhosted.org/packages/f5/9d/d638aefbc686e62390de667c7f8d045cf27cb9eab04196ae0f325d580af3/cogent3-2024.7.19a9.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-10-31 21:02:33",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "cogent3",
    "github_project": "cogent3",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "lcname": "cogent3"
}
        
Elapsed time: 0.38433s