volkamerlab / plipify

MIT License
14 stars 6 forks source link

Visuals #13

Closed glass-w closed 2 years ago

glass-w commented 3 years ago

Description

This PR adds a new function to write PDB files per interaction type obtained by plipify as well as writing a "total interactions" PDB. This also adds a new class to make PyMol images.

Todos

Questions

Status

AndreaVolkamer commented 3 years ago

@jaimergp:

glass-w commented 3 years ago

I've now added a new VisPymol class that handles rendering images of PDB files returned from fingerprint_writepdb. This is cleaner than having example PyMol scripts floating around.

AndreaVolkamer commented 3 years ago

@glass-w the missing residue 163 is now present, added the protonation fix as described in this plip issue.

glass-w commented 3 years ago

I've adapted plipify.visualization.fingerprint_tableto take an optional plipify.core.Structure object to add one letter residue names. This produces a table that looks like this:

Screenshot 2021-07-22 at 17 10 50

I've also added colour blind friendly colours and to only plot necessary legend names / colours.

glass-w commented 3 years ago

@jaimergp I'm unsure why this isn't passing the CI lint checks, when I run Black locally I don't see any errors in plipify.visualization

jaimergp commented 3 years ago

Are you using the same version as CI? This is what is being installed now:

Collecting black
  Downloading black-21.7b0-py3-none-any.whl (141 kB)

The table looks awesome btw :) Thanks!

glass-w commented 3 years ago

Yes, this is what I'm using in my environment:

# Name                    Version                   Build  Channel
black                     21.7b0             pyhd8ed1ab_0    conda-forge
jaimergp commented 3 years ago

Mm, are you using the same options? e.g. black -l 99 plipify --exclude plipify/_version.py?

AndreaVolkamer commented 3 years ago

@glass-w the new fingerprint table is AWESOME!

AndreaVolkamer commented 3 years ago

@glass-w could you check one tiny thing for me. In this cell:

Using the methoxy ligand as an example

TODO need to adapt view to use the wH structure

from plipify.core import Structure

methoxy = Structure.from_pdbfile(path="./data/Mpro/aligned/Mpro-P0157_0A/Mpro-P0157_0A_bound_chainA.pdb") # methoxy = selected_structure

We are still using the unprotonated structure, could you run it with the preprocessed structure (you can simply uncomment the methoxy= selected_structure comment), but the pymol view needs to be updated then and I'm not fully aware how you selected the coordinates.

review-notebook-app[bot] commented 2 years ago

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

jaimergp commented 2 years ago

Superseded by #14