You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've found myself in a bit of a rabbit hole. When looking into bumping biotite (#732, #733), I noticed that the only blocker for upgrading was due to the use of a few functions in 'OldCIF.py'. In fact, there doesn't seem to be ANY current use in the codebase so I think it should probably be removed (WIP: #733). However, I am running issues in to the tests which DO use oldCIF in a few places within a single file: test_assemblies.py
To address that issue, I optimistically updated the code using OldCIF to use the modern pdbx code. However, the new CIFAssemblyParser had a different API from the previos version as I will show below
importmolecularnodes.entities.molecule.pdbaspdbimportmolecularnodes.entities.molecule.pdbxaspdbximportbiotite.structure.io.pdbasbiotite_pdbimportbiotite.structure.io.pdbxasbiotite_ciffile_pdb="tests/data/1f2n.pdb"file_cif="tests/data/1f2n.cif"## PDBpdb_file=biotite_pdb.PDBFile.read(file_pdb)
atoms=biotite_pdb.get_structure(pdb_file, model=1)
ref_assembly=biotite_pdb.get_assembly(pdb_file, model=1)
test_parser=pdb.PDBAssemblyParser(pdb_file)
assembly_id=test_parser.list_assemblies()[0]
test_transformations_pdb=test_parser.get_transformations(assembly_id)
## PDBXcif_file=biotite_cif.CIFFile().read(file_cif)
atoms=biotite_cif.get_structure(
# Make sure `label_asym_id` is used instead of `auth_asym_id`cif_file,
model=1,
use_author_fields=False,
)
ref_assembly=biotite_cif.get_assembly(cif_file, model=1)
test_parser=pdbx.CIFAssemblyParser(cif_file)
assembly_id=test_parser.list_assemblies()[0]
test_transformations_pdbx=test_parser.get_transformations(assembly_id)
So: I am not an expert in these assemblies but I notice that:
PDB
3 chains.
CIF
3 chains plus chains that are all HETATM / WATER
What to do?
Considering:
oldcif.py is not used/imported in the codebase
pdbx via biotite seems to be the way of the future
the only place old cif is used is in the tests (e.g. but NOT in the actual code )
I think we should:
nuke oldcif.py
update the tests.
However:
we would need to define the correct behavior derived from the discrepancy above.
after writing this all, however, I think I know the right temporary solution which is just to shim the test to convert the dict-based solution to an iterated list
The text was updated successfully, but these errors were encountered:
I've found myself in a bit of a rabbit hole. When looking into bumping biotite (#732, #733), I noticed that the only blocker for upgrading was due to the use of a few functions in 'OldCIF.py'. In fact, there doesn't seem to be ANY current use in the codebase so I think it should probably be removed (WIP: #733). However, I am running issues in to the tests which DO use oldCIF in a few places within a single file:
test_assemblies.py
To address that issue, I optimistically updated the code using OldCIF to use the modern
pdbx
code. However, the newCIFAssemblyParser
had a different API from the previos version as I will show belowSo: I am not an expert in these assemblies but I notice that:
PDB
3 chains.
CIF
3 chains plus chains that are all HETATM / WATER

What to do?
Considering:
I think we should:
However:
The text was updated successfully, but these errors were encountered: