Make dtype of mandatory annotation arrays dynamic #643
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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. inatom_site.comp_id
oratom_site.label_atom_id
. Hence such potentially longer strings would be truncated to the dtype of the mandatory column, e.g. the chain IDFOO_BAR
would becomeFOO_
as thechain_id
dtype
isU4
.This PR changes this behavior: When
set_annotation()
is called a compatible dtype is searched.This PR replaces #640