Cogent3

Latest version: v2024.12.19a2

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

Scan your dependencies

Page 2 of 4

2024.7.19a6

Mainly a bug fix release. But one important new feature is support for parallelisation
in jupyter notebooks!

Contributors

- GavinHuttley

ENH

- Use loky for parallel processing instead of multiprocessing alone. loky is more robust
and supports parallel execution in jupyter notebooks .. yay!
- Using a feature to slice a sequence or an alignment should now preserve the annotation
when possible (a feature has a single contiguous span), or removes the annotation_db
when not querying it could be misleading.

BUG

- Fixed issue where read only zipped data stores would include files
starting with a "._"
- Fixed regression affecting app.as_completed()

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

2024.7.19a5

There are some new features and minor bug fixes in this release.

Contributors

- GavinHuttley

ENH

- genbank.iter_genbank_records() is a revised genbank parser that returns
primitive python types. It defaults to returning the genbank record LOCUS
values as the name. If the convert_features argument is None, then
genbank record metadata is left as a string. This can boost performance
10x over the old MinimalGenbankParser. The default is to convert features
into a dict as before.
- genbank.minimal_parser() is a new function that provides a minimal
parser for Genbank files, replacing the MinimalGenbankParser. It uses
the genbank.iter_genbank_records() function.
- genbank.rich_parser() replaces the RichGenbankParser. It uses
genbank.minimal_parser() but has the same behaviour as the older version.
- the <app writer>.apply_to() method now accepts logger=False. This turns off
logging completely.

BUG

- Fixed a regression affecting setting tip font sizes on dendrograms. You can now
assign either an integer to `<dendrogram>.tip_font` or a dict,
e.g. `{"size": 10, "family": "Inconsolata, monospace"}`.

Deprecations

- genbank.MinimalGenbankParser is being discontinued in favor of
genbank.minimal_parser (see above).
- genbank.RichGenbankParser is being discontinued in favor of
genbank.rich_parser (see above).

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

2024.7.19a4

This is a minor bug fix release.

Contributors

- Contribution from rmcar17 on fixing an encoding error when loading small newick trees.

BUG

- Fixed an issue with `load_tree` incorrectly detecting the encoding of very small newick files.

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

2024.7.19a3

This is a minor bug fix release.

Contributors

- Contributions from GavinHuttley and rmcar17 to Cogent3 repo
maintenance, developer tooling

ENH

- The cogent3 select_translatable() app gets a `frame` argument. This allows
specifying one frame of reference for the translation for all sequences.

BUG

- Fixed a regression affecting loading sequences when the path had the ~
character in it.

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

2024.7.19a1

Contributors

- Contributions from YapengLang, KatherineCaley, rmcar17, fredjaya,
GavinHuttley to cogent3 issues, code AND code reviews!
- Contributions from GavinHuttley and khiron to Cogent3 repo
maintenance, developer tooling, issues etc.. related to the SMBE2024
workshop!

ENH

- Defined an abstract base class for Gff records and support users providing
their own class via the cogent3.parse.gff.gff_parser(make_record) argument.
This enables users to devise a custom implementation tuned to the features
of different provider gff data.
- Contributions from KatherineCaley, fredjaya and GavinHuttley on massive
refactor of core objects concerning genetic codes, molecular types,
alphabets, sequences and sequence collections ... huge efforts 💪 🚀 👷🏼‍♀️!
- Introduced alpha versions of new implementations of core objects: `Sequence`,
`SequenceCollection`, `MolType`, `GeneticCode`, and `Alphabet`. These
"new-style" objects enhance performance by supporting the access of the
underlying data in various formats (i.e. numpy arrays, bytes or strings). The
"new-style" objects can be accessed 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, however, we encourage experimentation in
cases where integration with old objects is NOT required and look forward to
any feedback!

BUG

- YapengLang identified and fixed a bug in `cogent3.app.evo.model` where
settings for upper / lower bounds where being ignored.

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

2024.5.7a1

Contributors

- KatherineCaley for reviewing PRs and code contributions
related to SeqView taking on a more prominent role in recording
history of operations on sequences.
- First-time contributions from Yutong-Shao, Zongjing-Han, yantonglu,
ShunyiYang, KyleSu12, Ruizhe-wang, Firimp 🎉
- Adopted suggested documentation example proposed by Lizhaozhe123,
with some amendments, for the trim_stop_codons app.
- Multiple contributions from GavinHuttley
- rmcar17 identified and fixed a bug 🚀!
- rmcar17 addressed deprecation of using `end` as a column name
- Implementation of plug-in support :building_construction: by khiron
- We had many contributors to project maintenance, making
the contributor experience better 🎉!!
rmcar17, GavinHuttley fredjaya reviewed PR's 🛠️🚀
khiron, KatherineCaley, YapengLang, fredjaya, rmcar17
and GavinHuttley all commented on Issues.
khiron, fredjaya and rmcar17 contributed to general
maintenance tasks, including developer docs and troubleshooting
infrastructure issues.

ENH

- Annotation databases are now preserved after renaming sequences.
This is made possible because SeqView has the seqid attribute which
is preserved and is independent of the name of the enclosing Sequence.
- Sequence.parent_coordinates() now returns information related to its
parent. For example, we have a sequence with name "1" which we then
sliced and rename the slice to "gene". Calling gene.parent_coordinates()
would return "1", slice start, slice end, strand.
- methods on likelihood function objects that work with continuous-time
Markov models no longer fail if the model also has discrete-time edges.
These include lf.get_lengths_as_ens(), lf.get_annotated_tree(),
lf.get_paralinear_metric().
- Added new lf.get_ens_tree(). This returns trees with the expected number
of substitutions as the branch length. On discrete-time edges the branch
length is set to None. Think of this tree as the true "evolutionary tree".
Thanks to Von Bing Yap for suggesting this!
- Plugin support that will allow 3rd-party developers to add their custom
functionality to the cogent3 pipeline as first class apps
- The new IndelMap class uses numpy arrays to store information about gap
locations for aligned sequences. This will greatly reduce the memory
overhead for aligned sequences. The class also provides explicit methods
for inter-converting between sequence and alignment coordinates. An important
difference to the original Map implementation is that IndelMap is memoryless,
meaning the history of slice operations is now fully delegated to the SeqView
class.
- The new FeatureMap class is a slightly modified version of the original Map
class. It is used solely for handling sequence feature mappings to sequences
and alignments. Like IndelMap, it is memoryless but it does record its
orientation with respect to the parent sequence.
- Note that both IndelMap and FeatureMap replace the spans attribute with a
generator.

BUG

- The saving of numpy arrays in annotation db's was not cross-platform
compatible due to differences in default types between OS's. Fixed by
using numpy.save and numpy.load. A warning is raised if an old style
format is detected and a function provided for updating the format.
- Alignment.quick_tree() default settings referred to a distance calculator
that has been removed. Now updated to the pdist calculator.

DOC

- added cookbook docs for io apps

Deprecations

- `end` is a SQL keyword and so should be avoided. It is now replaced
by `stop`. Annotation db's with the old column name are dynamically
updated.

Discontinued

- The cogent3.core.location.Map class is now marked for deprecation. It is
being replaced by two classes, IndelMap and FeatureMap. The latter has
largely the same functionality of Map.

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

Page 2 of 4

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.