Skip to main content

COmparative GENomics Toolkit 3: genomic sequence analysis within notebooks or on compute systems with 1000s of CPUs.

Project description

PyPI version Downloads

Build Status coverall

PyPI - Python Version Ruff

CodeQL Codacy Badge

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 📣

Faster sequence coevolution measures 🚀

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.

Faster sequence format parsers 💨

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

Supporting third-party apps as plugins 🔌

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.

Post any questions you have in cogent3 discussions.

The developers of Cogent3 and IQ-TREE2 announce piqtree2 🎉

Speaking of plugins, our first major third-party plugin is piqtree2. Try it out and give us feedback.

New core data types improve efficiency and flexibility

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!

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 for modelling sequence evolution, including codon models. cogent3 also includes an extensive collection of time-reversible models (again including novel codon models). We have done more than just invent these new methods, we have established the most robust algorithms for their implementation and their suitability for real data. Additionally, there are novel signal processing methods focussed on statistical estimation of integer period signals.

🎬 Demo non-reversible substitution model

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.

🎬 Demo sequences with annotations

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!

🎬 Demo friendly coding

Installation?

$ pip install cogent3

Install extra -- adds visualisation support

The extra group includes python libraries required for visualisation, i.e. plotly, kaleido, psutil and pandas.

$ pip install "cogent3[extra]"

Install dev -- adds cogent3 development related libraries

The dev group includes python libraries required for development of cogent3.

$ pip install "cogent3[dev]"

Install the development version

$ 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, while cogent3 code is on GitHub. If you would like to contribute (and we hope you do!), we have created a companion c3dev GitHub repo which provides details on how to contribute and some useful tools for doing so.

Project History

cogent3 is a descendant of PyCogent. 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) 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 and PyCogent 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 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 from the Chan Zuckerberg Initiative.

         

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cogent3-2024.7.19a9.tar.gz (17.9 MB view details)

Uploaded Source

Built Distribution

cogent3-2024.7.19a9-py3-none-any.whl (755.0 kB view details)

Uploaded Python 3

File details

Details for the file cogent3-2024.7.19a9.tar.gz.

File metadata

  • Download URL: cogent3-2024.7.19a9.tar.gz
  • Upload date:
  • Size: 17.9 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for cogent3-2024.7.19a9.tar.gz
Algorithm Hash digest
SHA256 5f1ab042294f718a77e0d8fa8adf3b20fefe9ef5a47b1c2092e50e8560883afa
MD5 3b44bdaeda2970884301a5aabbc0f818
BLAKE2b-256 f59dd638aefbc686e62390de667c7f8d045cf27cb9eab04196ae0f325d580af3

See more details on using hashes here.

Provenance

The following attestation bundles were made for cogent3-2024.7.19a9.tar.gz:

Publisher: release.yml on cogent3/cogent3

Attestations:

File details

Details for the file cogent3-2024.7.19a9-py3-none-any.whl.

File metadata

File hashes

Hashes for cogent3-2024.7.19a9-py3-none-any.whl
Algorithm Hash digest
SHA256 3a52e17f47ad8bf0b3d396ddfa4f5878061afb86e766b49a0eedb7e510985511
MD5 4308ef0cf92cd77b6aad6888c84e15ab
BLAKE2b-256 96a0eb889b207f8ad8ed3d1d87ffdbeadb1b9a27c91163e44035cb1d51930a87

See more details on using hashes here.

Provenance

The following attestation bundles were made for cogent3-2024.7.19a9-py3-none-any.whl:

Publisher: release.yml on cogent3/cogent3

Attestations:

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page