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#
🆕 A new tutorial on using non-stationary amino acid models 🧐
A new contribution from Peter Goodman and Andrew Wheeler demonstrates how to specify a non-stationary amino acid substitution model. Check it out their tutorial and the original paper. Thanks Peter, Andrew and their colleagues!
🆕 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.
🆕 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
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.
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.
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.
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/.