Cogent3

Latest version: v2024.12.19a2

Safety actively analyzes 701868 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 4

2024.12.19a2

This is a minor bug-fix release with a minor new feature.

ENH

- Slicing a new type sequence with a feature defaults to applying
the feature.name attribute to the resulting seq.name. This can be
controlled by the new apply_name argument to the
Feature.get_slice() method.

BUG

- new_alphabet.KmerAlphabet.to_indices() consistently applies alphabet
dtype to the resulting array.

<a id='changelog-2024.12.19a1'></a>

2024.12.19a1

Contributors

- GavinHuttley

ENH

- Improved load balancing in parallel execution of `new_alignment.Alignment.distance_matrix()`
calculations. This can deliver pretty substantial speedups for large numbers of sequences.

- Major effort in improving compatibility of `new_type` core objects with the
rest of the codebase. There remain some missing capabilities, and some edge-case
test failures. However, the core functionality is now working.

Deprecations

- The nominated release for setting `new_type=True` as the default for new
core objects has been pushed back to 2025.1. This will allow time for
the remaining issues to be resolved.

- All `annotate_from_gff()` methods are deprecated, they will be removed in 2025.6.
Users should assign the result of `cogent3.load_annotations()` to an object's
`annotation_db` attribute, or provide the `annotation_path` argument to the standard
`load_(un)aligned_seqs()` functions.

<a id='changelog-2024.11.29a1'></a>

2024.11.29a1

Contributors

- Many thousand lines of code --- KatherineCaley 🚀
- YapengLang contributed bug reports and bug fixes 👏

ENH

- `cogent3.open_()` now automatically handles .xz and .lzma compressed files.
- sequence / alignment loading functions recognise .phy as phylip format.
- Formatting of fasta records is now much quicker.
- The grand rewrite of alignment classes is ready for use! This is a major effort,
unifying the capabilities of the `Alignment` and `AlignmentArray` classes into a
single class. The logic is cleaner, the performance is better, and the API is
largely (but not entirely) backwards compatible. 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`.
Please post any bugs or issues to the issue tracker.
- Refactored a subset of the pairwise distance calculation demonstrating the performance
benefits of the new alignment classes. These are accessible via the Alignment.distance_matrix()
method, and also include support for parallel execution. They are wicked fast 🚀🚀🚀!

Discontinued

- We no longer support python 3.9.


<a id='changelog-2024.7.19a9'></a>

2024.7.19a9

ENH

- `cogent3.open_()` now automatically handles `.xz` and `.lzma` compressed files.
- Formatting of fasta records is now much quicker.
- Standardise arrow head sizes on annotation feature displays.

<a id='changelog-2024.7.19a8'></a>

2024.7.19a8

A single bugfix release.

Contributors

- Bug identified and fixed by YapengLang 🚀🤩

BUG

- Fixed a regression in Trees arising from new name / support split functionality.

<a id='changelog-2024.7.19a7'></a>

2024.7.19a7

Contributors

- GavinHuttley multiple commits and maintenance
- A first time contribution from petergoodman 🚀🎉!
- YapengLang added the key function for parsing support from newick format
to tree object 💪

ENH

- Provide convenience class methods on both DictArray and DistanceMatrix to simplify
creation when you have a numpy array and the names corresponding to the dimension
element labels. These methods are mainly of use for developers.
- Major rewrite of the mutual information based coevolution statistics. These are
most easily accessed from the `Alignment.coevolution()` method. The rewrite delivers
several orders of magnitude performance improvement by using `numba.jit` compiled
functions based on numpy arrays, plus caching of intermediate calculations.
The speed of the resampled Mutual Information calculation is now near identical to
that for the simpler MI and NMI statistics.
- The coevolution statistics can now be run in parallel on a single machine.
This is most easily accessed by setting `<alignment>.coevolution(parallel=True)`.
The parallelisation is at the level of chunks of position pairs.
- cogent3 now supports parsing from newick format with node support
statistics. The support measure is stored in `<node>.params["support"]`.

BUG

- Dotplots of sequences that had gaps in common is now correctly handled. Previously,
the displayed aligned path was very funky because aligned segments could be
interrupted.

DOC

- A new tutorial on using a nonstationary amino-acid model from petergoodman.
This will appear in the examples documentation in the next release. Nice
showcase of cogent3's ability to disentangle clade specific substitution
processes. Plus a first time contribution!

Deprecations

- All the old coevolution functions and statistics are marked for removal
by the last major release of 2024. Their implementations were pre-2010!,
and so not well suited to current data sizes. The mutual information based
statistics are retained, but rewritten to be much faster (see the Enhancement
section).
- The old coevolution example document is removed as its out-of-date.

<a id='changelog-2024.7.19a6'></a>

Page 1 of 4

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.