Making Sense from Sequence#

cogent3 is a mature python library for analysis of biological 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. It be used for…

cogent3 provides an extensive suite of capabilities for manipulating and analysing sequence data. For instance, the ability to read standard biological data formats, manipulate sequences by their annotations, to perform multiple sequence alignment (app docs) using any of our substitution models, phylogenetic reconstruction and tree manipulation, manipulation of tabular data, visualisation of phylogenies (image gallery) and much more.

🎬 Data wrangling with sequence annotations

Differences in the frequency of nucleotides between species are common. In such cases, non-reversible models of sequence evolution are required for robust estimation of important quantities such as branch lengths, or measuring natural selection [1, 2] (see using non-stationary models.). We have done more than just invent these new methods, we have established the most robust algorithms [3] for their implementation and their suitability for real data [4].

🎬 Testing a hypothesis involving a non-stationary nucleotide process

You don’t have to be an expert in structural programming languages (like Python) to use cogent3! Interactive usage in Jupyter notebooks and a functional programming style interface lowers the barrier to entry. Individuals comfortable with R should find this interface less complex. (See the cogent3.app documentation.)

🎬 Using cogent3 apps

📣 New Features & Announcements#

🆕 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 app demo project for an example of how easy it is to share your cogent3 apps.

Please post any questions you have about writing apps or sharing them on 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 cogent3 core objects 💪🛠.

In this release, the Sequence, SequenceCollection, MolType, GeneticCode, and alphabet classes have all been rewritten from scratch to simplify 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!


Citations

[1]

Benjamin D Kaehler, Von Bing Yap, Rongli Zhang, and Gavin A Huttley. Genetic distance for a general non-stationary Markov substitution process. Systematic Biology, 64:281–93, 2015. URL: https://www.ncbi.nlm.nih.gov/pubmed/25503772.

[2]

Benjamin D Kaehler, Von Bing Yap, and Gavin A Huttley. Standard codon substitution models overestimate purifying selection for non-stationary data. Genome Biology and Evolution, 9:134–149, 2017. URL: https://www.ncbi.nlm.nih.gov/pubmed/28175284.

[3]

Harold W Schranz, Von Bing Yap, Simon Easteal, Rob Knight, and Gavin A Huttley. Pathological rate matrices: from primates to pathogens. BMC Bioinformatics, 9:550, 2008. URL: https://www.ncbi.nlm.nih.gov/pubmed/19099591.

[4]

Klara L Verbyla, Von Bing Yap, Anuj Pahwa, Yunli Shao, and Gavin A Huttley. The embedding problem for Markov models of nucleotide substitution. PLoS ONE, 8:e69187, 2013. URL: https://pubmed.ncbi.nlm.nih.gov/23935949/.