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: warning fixes / molecule images not showing #347

Merged

Conversation

mbackenkoehler
Copy link
Collaborator

@mbackenkoehler mbackenkoehler commented May 2, 2023

@mbackenkoehler mbackenkoehler added bug Something isn't working work in progress Work still ongoing labels May 2, 2023
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
@dominiquesydow
Copy link
Collaborator

@AndreaVolkamer, @mbackenkoehler, is my update to this PR description correct?

@dominiquesydow dominiquesydow changed the title T018 warning fixes / molecule images not showing T018: warning fixes / molecule images not showing May 11, 2023
…ings-and-images-not-showing

T018: deprecation warnings and images not showing (#334)
@mbackenkoehler
Copy link
Collaborator Author

Corresponding changes in other notebooks will follow in a separate PR

@mbackenkoehler mbackenkoehler merged commit 24576f9 into dev May 15, 2023
@mbackenkoehler mbackenkoehler deleted the 334-t018-deprecation-warnings-and-images-not-showing branch May 16, 2023 12:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working work in progress Work still ongoing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants