GithubHelp home page GithubHelp logo

prolint / prolintpy Goto Github PK

View Code? Open in Web Editor NEW
5.0 2.0 0.0 1.46 MB

A python package for the automated analysis and visualization of lipid-protein interactions.

Home Page: https://prolint.github.io/prolintpy

License: MIT License

Python 100.00%
lipid-protein-interactions molecular-dynamics molecular-dynamics-simulation interactive-visualizations automated-analysis

prolintpy's Introduction

logo

A python package for the automated analysis and visualization of lipid-protein interactions.

prolintpy is a lightweight python library that is used by the ProLint webserver on the backend to analyze Protein-Lipid interactions.. Use this tool if you want to customize analysis and visualization of lipid-protein interactions and want to scale-up your workflow beyond the capabilities of the ProLint webserver.

To get familiar with prolintpy please read the Documentation. You can also launch the binders: Binder and test prolintpy without having to install it. We provide several tutorials in the form of these binders that you can complete in your browser. Please note, however, that these tutorials are still work in progres and we will improve them during the coming days. If you would like to download the tutorials they are located here: https://github.com/ProLint/tutorials

Installation

To install prolintpy simply execute:

# Python v3.6 or v3.7 supported. Python v3.8 may not work.
python -m pip install prolintpy

This should work on most systems. If you encounter problems during installation, use one of the more verbose methods below:

# Method 1
git clone https://github.com/ProLint/prolintpy.git
cd prolintpy
conda env create -f environment.yml
conda activate prolint

# Method 2
git clone https://github.com/ProLint/prolintpy.git
cd prolintpy
python setup.py install
  
# Method 3 (if MDTraj causes problems)
conda create --name prolint python=3.7
conda activate prolint
conda install -c conda-forge mdtraj
python -m pip install prolintpy

Getting Started

To import prolintpy in your code:

# To improve performance of visualization apps, we load everything at once 
# so initial import may take a few seconds to finish. 
import prolintpy as pl

Please follow the instructions provided in the documentation to get started. Note that, to use the visualization interface of prolintpy, you should use JupyterLab. At the top of your notebook file, make sure to call the output_notebook function:

from bokeh.io import output_notebook
output_notebook()

Additionally, if you want to use the show_contact_projection function, make sure that your installation of nglview is working properly. Follow the instruction provided there to ensure your installation is running correclty.

Input file requirements

Before you load the data to prolintpy make sure to first remove water & ions beads. Leave only membrane and protein beads in the system.

Citation

prolintpy is research software. If you make use of it in work which you publish, please cite it. The BibTeX reference is

@article{10.1093/nar/gkab409,
    author = {Sejdiu, Besian I and Tieleman, D Peter},
    title = "{ProLint: a web-based framework for the automated data analysis and visualization of lipid–protein interactions}",
    journal = {Nucleic Acids Research},
    year = {2021},
    month = {05},
    issn = {0305-1048},
    doi = {10.1093/nar/gkab409},
    url = {https://doi.org/10.1093/nar/gkab409},
    note = {gkab409},
    eprint = {https://academic.oup.com/nar/advance-article-pdf/doi/10.1093/nar/gkab409/38270894/gkab409.pdf},
}

prolintpy's People

Contributors

bisejdiu avatar danielpastor97 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

prolintpy's Issues

Using Prolint for Lipid Analysis

I was wondering how to apply Prolint to an atomistic trajectory of a protein with a ligand.
The Tutorial indicates this is possible: https://prolint.github.io/prolintpy/#/ligands

I've tried loading my ligand (named 'LIG' in the topology) as a lipid with:

lipids = pl.Lipids(t.topology, resolution='atomistic', lipid_names=['LIG'])

This seems to work:

lipids.lipid_count()
{'LIG': 1}

However, running contacts.compute_neighbors gives: KeyError: 'LIG'

contacts = pl.ComputeContacts(t, proteins, lipids)
result = contacts.compute_neighbors(t, cutoff=0.5)

The full error message is attached.

What is the correct/intented way to load a ligand with Prolint?
lig_error.txt

Saving heatmaps

Is there a way to save snapshots of the interactive heatmaps? This would be very useful.

Attribute error while trying to import prolintpy

I have installed prolintpy using the third method outlined in the documentation. I ran into an import error while trying to import prolintpy, as detailed in the previous issue (#6 ) that has been kept open by you. I thought the problem would be resolved after following the solution outlined in the thread but now I'm getting this

---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
/tmp/ipykernel_8570/3457557373.py in <module>
      1 import mdtraj as md
----> 2 import prolintpy as pl

~/anaconda3/envs/prolint/lib/python3.7/site-packages/prolintpy/__init__.py in <module>
      5 from .vis.show_points import show_points
      6 from .vis.show_network import show_network
----> 7 from .vis.show_contact_projection import show_contact_projection
      8 from .vis.show_distances import show_distances
      9 from .vis.show_radar import show_radar

~/anaconda3/envs/prolint/lib/python3.7/site-packages/prolintpy/vis/show_contact_projection.py in <module>
      4 from matplotlib.pyplot import cm
      5 
----> 6 import nglview as nv
      7 
      8 from prolintpy.utils.shift_range import shift_range

~/anaconda3/envs/prolint/lib/python3.7/site-packages/nglview/__init__.py in <module>
      2 
      3 # for doc
----> 4 from . import adaptor, datafiles, show, widget
      5 from ._version import get_versions
      6 from .adaptor import *

~/anaconda3/envs/prolint/lib/python3.7/site-packages/nglview/show.py in <module>
     11                       RdkitStructure,
     12                       TextStructure)
---> 13 from .widget import NGLWidget
     14 
     15 __all__ = [

~/anaconda3/envs/prolint/lib/python3.7/site-packages/nglview/widget.py in <module>
     17 import traitlets
     18 
---> 19 from . import color, interpolate
     20 from .adaptor import Structure, Trajectory
     21 from .component import ComponentViewer

~/anaconda3/envs/prolint/lib/python3.7/site-packages/nglview/color.py in <module>
    112 
    113 
--> 114 ColormakerRegistry = _ColormakerRegistry()

~/anaconda3/envs/prolint/lib/python3.7/site-packages/nglview/base.py in getinstance()
      8     def getinstance():
      9         if cls not in instances:
---> 10             instances[cls] = cls()
     11         return instances[cls]
     12     return getinstance

~/anaconda3/envs/prolint/lib/python3.7/site-packages/nglview/color.py in __init__(self, *args, **kwargs)
     45         try:
     46             get_ipython() # only display in notebook
---> 47             self._ipython_display_()
     48         except NameError:
     49             pass

~/anaconda3/envs/prolint/lib/python3.7/site-packages/nglview/color.py in _ipython_display_(self, **kwargs)
     52         if self._ready:
     53             return
---> 54         super()._ipython_display_(**kwargs)
     55 
     56     def __repr__(self):

AttributeError: 'super' object has no attribute '_ipython_display_'

I don't why this is happening. I am also very new to Jupyter. Help would be great!

key errors for lipidnames in local version

Hello,

I have been trying to use prolintpy locally in jupyter to look at an atomistic system with a rather complex membrane. If I just follow the tutorial on the contact analysis (except for changing the resolution to 'atomistic') it prints out all the correct lipidnames with lipids.lipid_names()

array(['CHL1', 'PDOPE', 'PAPS', 'PLPC', 'PLA20', 'POPI2', 'POPE', 'SAPS',
'SAPE', 'DPPC', 'POPC', 'PSM'], dtype=object)

However, when I try to use those same lipids it returns key errors (see screenshot). This is true for most lipids I tested, except for POPC. When I submit this to the webserver it seems to work without issues. Could this be a version error? I installed prolintpy via pip install today (3rd Sep. 2021).

Many thanks!
Stefan

Screenshot from 2021-09-03 16-42-01_cropped

import error

hi, i tried to install the prolintpy use your thirdth methods and success. But when i import the prolintpy, the error occur as follows:
屏幕截图 2022-04-11 195753

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.