Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make dtype of mandatory annotation arrays dynamic #643

Merged
merged 1 commit into from
Aug 30, 2024

Conversation

padix-key
Copy link
Member

Currently the AtomArray annotation arrays are locked to their initial dtype. Usually this is no problem. However the PDBx format does not set a limit to string lengths, e.g. in atom_site.comp_id or atom_site.label_atom_id. Hence such potentially longer strings would be truncated to the dtype of the mandatory column, e.g. the chain ID FOO_BAR would become FOO_ as the chain_id dtype is U4.

This PR changes this behavior: When set_annotation() is called a compatible dtype is searched.

This PR replaces #640

@padix-key padix-key merged commit 3be6799 into biotite-dev:main Aug 30, 2024
21 checks passed
@padix-key padix-key deleted the dynamic-dtype branch September 1, 2024 16:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant