Cogent3

Latest version: v2025.3.22a4

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

Scan your dependencies

Page 1 of 5

2025.3.22a4

Minor bug-fix and small enhancement for the ensembl-tui project.

ENH

- new type Alignment.with_masked_annotations() masking is only applied to the
sequences that have matching annotations.
- new type Alignment.with_masked_annotations(seqid) allows applying a mask to
only one sequence in an alignment.

BUG

- Masking annotations on sequences with shadow=True would mask all positions
if the feature ws missing from the sequence.

<a id='changelog-2025.3.22a3'></a>

2025.3.22a3

This is a minor bug-fix release.

BUG

- New type Alignment methods could fail when on a instance that
had sequences renamed. We were passing the incorrect values for
constructing the new AlignSeqsData instance.

<a id='changelog-2025.3.22a2'></a>

2025.3.22a2

Contributors

- First time contributions from c-jonesy, Yixuan567, Qinzi27
and je634 πŸ‘πŸš€πŸŽ‰
- GavinHuttley bug fixes and maintenance

ENH

- The cogent3.core.annotation.Feature class now gets an xattr property.
This allows developers to pack additional data into the Feature object
without compromising the core API.
- cogent3 now supports hook-style pluginsπŸŽ‰. The first hook is for computing
quick_tree() trees. This method is on our alignment class and on our distance
matrix class. It currently defaults to the cogent3 quick_tree() app, which
applies the NJ algorithm. For developers, you can see what hooks are supported
by looking in cogent3._plugin at functions named `get_<something>_hook()`. All
third-party hooks must adhere to the cogent3 app interface.

Developers, register your hook by adding a section `[project.entry-points."cogent3.hook"]`
section to your `pyproject.toml` file. Assign to the hook name (e.g. `quick_tree`) the string
reference to the app supporting the hook. For example,
`quick_tree = "my_package.my_module.my_quick_tree_app"`.

Users, specify which package you want to use by setting `<obj>.quick_tree(use_hook="<package name>")`.
For example, `use_hook="my_package"` would invoke the one defined above. Set `use_hook="cogent3"`
to force using the cogent3 default.

- IndelMap.merge_maps(other: "IndelMap", alignd_indices: bool) handles case where
`other.gap_pos` are in alignment coordinates. This is essential for the case
of progressive alignments where the alignment coordinates are sequentially
adjusted as more profiles are aligned. This is the key change that fixes the
bug in the progressive aligner.

BUG

- Dotplot on new_type Alignments now show the alignment path πŸŽ‰
- Fixed a MAJOR bug affecting the cogent3 progressive aligner. Gaps
were being incorrectly merged during the progressive steps. Users
are advised to re-run any analyses that used the progressive aligner.
This DOES NOT affect creating alignment objects from existing data,
e.g. alignments produced by other algorithms.

Discontinued

- new_alignment.Alignment.quick_tree() no longer supports doing bootstraps.
This is because bootstrapping is not quick! If you want this, post a feature
request and we will implement a separate app for this.

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

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>

Page 1 of 5

Β© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.