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

T018: deprecation warnings and images not showing (#334) #350

Conversation

AAriam
Copy link
Collaborator

@AAriam AAriam commented May 7, 2023

Description

This PR solves the problems in T018.

AAriam added 5 commits May 6, 2023 21:16
Currently, the code snippet `import pypdb; from biopandas.pdb import PandasPdb` raises DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead. pd_version = LooseVersion(pd.__version__). This is raised by `biopandas`, but only after importing `pypdb`. importing any of the two separately doesn't raise a warning. This is probably due to `pypdb` setting some global variables (for Pandas?) that then raise a warning from `biopandas`. Before applying the ultimate solution updating dependencies, for now, changing the order suppresses the warning.
This was an inconsequential bug that caused the PDB file to be downloaded twice. With this fix, it is only downloaded once.
This requires a newer version of RDKit, thus the pinned version was removed from `test_env.yml`; this still doesn't update RDKit to the latest version, due to pinning in other dependencies. Note that for this fix to work, you have to recreate your environment with the new `test_env.yml`, or update RDKit manually.
The warning "MDAnalysis/coordinates/PDB.py:1129: UserWarning: Found no information for attr: 'formalcharges' Using default value of '0'" is caused by MDAnalysis, which is used by OpenCADD, which is used in the `extract_molecule_from_pdb_file` function in `utils/helpers/pdb.py`. Cause of the warning is that formal charges are not present in the PDB file. This is a common situation since many PDB files don't have formal charges assigned. However, this pinned version of MDAnalysis raises a warning in these situations, which is now suppressed by a context manager in this commit
@mbackenkoehler mbackenkoehler self-requested a review May 8, 2023 09:46
@dominiquesydow dominiquesydow changed the title 334 t018 deprecation warnings and images not showing T018: deprecation warnings and images not showing (#334) May 11, 2023
@mbackenkoehler mbackenkoehler merged commit 380d55a into volkamerlab:334-t018-deprecation-warnings-and-images-not-showing May 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
work in progress Work still ongoing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants