[med-svn] [Git][med-team/plip][master] 4 commits: New upstream version 2.1.4+dfsg

Alexandre Mestiashvili gitlab at salsa.debian.org
Wed Sep 9 15:09:28 BST 2020



Alexandre Mestiashvili pushed to branch master at Debian Med / plip


Commits:
a5f37548 by Alexandre Mestiashvili at 2020-09-09T13:30:18+02:00
New upstream version 2.1.4+dfsg
- - - - -
429e7091 by Alexandre Mestiashvili at 2020-09-09T13:30:19+02:00
Update upstream source from tag 'upstream/2.1.4+dfsg'

Update to upstream version '2.1.4+dfsg'
with Debian dir ed925162949b714480efabe48514a4a087cc32ec
- - - - -
846be8bf by Alexandre Mestiashvili at 2020-09-09T13:32:35+02:00
d/control: move pymol from Depends to Recommends

- - - - -
586eea80 by Alexandre Mestiashvili at 2020-09-09T13:35:35+02:00
Update changelog

Gbp-Dch: Ignore

- - - - -


9 changed files:

- debian/changelog
- debian/control
- plip/basic/config.py
- plip/exchange/report.py
- plip/exchange/xml.py
- plip/structure/preparation.py
- plip/test/test_basic_functions.py
- plip/visualization/pymol.py
- setup.py


Changes:

=====================================
debian/changelog
=====================================
@@ -1,3 +1,10 @@
+plip (2.1.4+dfsg-1) unstable; urgency=medium
+
+  * New upstream version 2.1.4+dfsg
+  * d/control: move pymol from Depends to Recommends
+
+ -- Alexandre Mestiashvili <mestia at debian.org>  Wed, 09 Sep 2020 13:34:11 +0200
+
 plip (2.1.3+dfsg-1) unstable; urgency=medium
 
   * Add build-mulit.sh to Files-Excluded list in d/copyright


=====================================
debian/control
=====================================
@@ -19,7 +19,8 @@ Homepage: https://projects.biotec.tu-dresden.de/plip-web/plip/
 
 Package: plip
 Architecture: all
-Depends: pymol, python3-openbabel, ${misc:Depends}, ${python3:Depends}
+Depends: python3-openbabel, ${misc:Depends}, ${python3:Depends}
+Recommends: pymol
 Description: fully automated protein-ligand interaction profiler
  The Protein-Ligand Interaction Profiler (PLIP) is a tool to analyze
  and visualize protein-ligand interactions in PDB files.


=====================================
plip/basic/config.py
=====================================
@@ -1,4 +1,4 @@
-__version__ = '2.1.3'
+__version__ = '2.1.4'
 __maintainer__ = 'PharmAI GmbH (2020) - www.pharm.ai - hello at pharm.ai'
 
 import logging


=====================================
plip/exchange/report.py
=====================================
@@ -287,7 +287,8 @@ class BindingSiteReport:
                  m.location, '%.2f' % m.rms, m.geometry, str(m.complexnum), m.metal.coords,
                  m.target.atom.coords))
 
-    def write_section(self, name, features, info, f):
+    @staticmethod
+    def write_section(name, features, info, f):
         """Provides formatting for one section (e.g. hydrogen bonds)"""
         if not len(info) == 0:
             f.write('\n\n### %s ###\n' % name)
@@ -295,7 +296,8 @@ class BindingSiteReport:
             for line in info:
                 f.write('%s\n' % '\t'.join(map(str, line)))
 
-    def rst_table(self, array):
+    @staticmethod
+    def rst_table(array):
         """Given an array, the function formats and returns and table in rST format."""
         # Determine cell width for each column
         cell_dict = {}


=====================================
plip/exchange/xml.py
=====================================
@@ -6,7 +6,8 @@ from urllib.request import urlopen
 class XMLStorage:
     """Generic class for storing XML data from PLIP XML files."""
 
-    def getdata(self, tree, location, force_string=False):
+    @staticmethod
+    def getdata(tree, location, force_string=False):
         """Gets XML data from a specific element and handles types."""
         found = tree.xpath('%s/text()' % location)
         if not found:
@@ -29,7 +30,8 @@ class XMLStorage:
                     # It's a string
                     return data
 
-    def getcoordinates(self, tree, location):
+    @staticmethod
+    def getcoordinates(tree, location):
         """Gets coordinates from a specific element in PLIP XML"""
         return tuple(float(x) for x in tree.xpath('.//%s/*/text()' % location))
 


=====================================
plip/structure/preparation.py
=====================================
@@ -352,7 +352,8 @@ class LigandFinder:
                       can_to_pdb=can_to_pdb)
         return ligand
 
-    def is_het_residue(self, obres):
+    @staticmethod
+    def is_het_residue(obres):
         """Given an OBResidue, determines if the residue is indeed a possible ligand
         in the PDB file"""
         if not obres.GetResidueProperty(0):
@@ -701,7 +702,8 @@ class PLInteraction:
 
         return unpaired_hba, unpaired_hbd, unpaired_hal
 
-    def refine_hydrophobic(self, all_h, pistacks):
+    @staticmethod
+    def refine_hydrophobic(all_h, pistacks):
         """Apply several rules to reduce the number of hydrophobic interactions."""
         sel = {}
         #  1. Rings interacting via stacking can't have additional hydrophobic contacts between each other.
@@ -768,7 +770,8 @@ class PLInteraction:
             logger.info(f'reduced number of hydrophobic contacts from {before} to {reduced}')
         return hydroph_final
 
-    def refine_hbonds_ldon(self, all_hbonds, salt_lneg, salt_pneg):
+    @staticmethod
+    def refine_hbonds_ldon(all_hbonds, salt_lneg, salt_pneg):
         """Refine selection of hydrogen bonds. Do not allow groups which already form salt bridges to form H-Bonds."""
         i_set = {}
         for hbond in all_hbonds:
@@ -793,7 +796,8 @@ class PLInteraction:
                     second_set[hbl.d.idx] = (hbl.angle, hbl)
         return [hb[1] for hb in second_set.values()]
 
-    def refine_hbonds_pdon(self, all_hbonds, salt_lneg, salt_pneg):
+    @staticmethod
+    def refine_hbonds_pdon(all_hbonds, salt_lneg, salt_pneg):
         """Refine selection of hydrogen bonds. Do not allow groups which already form salt bridges to form H-Bonds with
         atoms of the same group.
         """
@@ -820,7 +824,8 @@ class PLInteraction:
                     second_set[hbp.d.idx] = (hbp.angle, hbp)
         return [hb[1] for hb in second_set.values()]
 
-    def refine_pi_cation_laro(self, all_picat, stacks):
+    @staticmethod
+    def refine_pi_cation_laro(all_picat, stacks):
         """Just important for constellations with histidine involved. If the histidine ring is positioned in stacking
         position to an aromatic ring in the ligand, there is in most cases stacking and pi-cation interaction reported
         as histidine also carries a positive charge in the ring. For such cases, only report stacking.
@@ -835,7 +840,8 @@ class PLInteraction:
                 i_set.append(picat)
         return i_set
 
-    def refine_water_bridges(self, wbridges, hbonds_ldon, hbonds_pdon):
+    @staticmethod
+    def refine_water_bridges(wbridges, hbonds_ldon, hbonds_pdon):
         """A donor atom already forming a hydrogen bond is not allowed to form a water bridge. Each water molecule
         can only be donor for two water bridges, selecting the constellation with the omega angle closest to 110 deg."""
         donor_atoms_hbonds = [hb.d.idx for hb in hbonds_ldon + hbonds_pdon]
@@ -1064,7 +1070,8 @@ class Ligand(Mol):
         """Converts internal atom ID into canonical atom ID. Agrees with Canonical SMILES in XML."""
         return self.atomorder[atomnum - 1]
 
-    def is_functional_group(self, atom, group):
+    @staticmethod
+    def is_functional_group(atom, group):
         """Given a pybel atom, look up if it belongs to a function group"""
         n_atoms = [a_neighbor.GetAtomicNum() for a_neighbor in pybel.ob.OBAtomAtomIter(atom.OBAtom)]
 
@@ -1460,7 +1467,8 @@ class PDBComplex:
         """Return list of ids from residues belonging to the binding site"""
         return [obres.GetIdx() for obres in resis if self.res_belongs_to_bs(obres, cutoff, ligcentroid)]
 
-    def res_belongs_to_bs(self, res, cutoff, ligcentroid):
+    @staticmethod
+    def res_belongs_to_bs(res, cutoff, ligcentroid):
         """Check for each residue if its centroid is within a certain distance to the ligand centroid.
         Additionally checks if a residue belongs to a chain restricted by the user (e.g. by defining a peptide chain)"""
         rescentroid = centroid([(atm.x(), atm.y(), atm.z()) for atm in pybel.ob.OBResidueAtomIter(res)])


=====================================
plip/test/test_basic_functions.py
=====================================
@@ -71,7 +71,8 @@ class TestMapping(unittest.TestCase):
 class GeometryTest(unittest.TestCase):
     """Tests for geometrical calculations in PLIP"""
 
-    def vector_magnitude(self, v):
+    @staticmethod
+    def vector_magnitude(v):
         return numpy.sqrt(sum(x**2 for x in v))
 
     # noinspection PyUnusedLocal


=====================================
plip/visualization/pymol.py
=====================================
@@ -28,7 +28,8 @@ class PyMOLVisualizer:
         cmd.clip('far', -1000)
         cmd.clip('near', 1000)
 
-    def make_initial_selections(self):
+    @staticmethod
+    def make_initial_selections():
         """Make empty selections for structures and interactions"""
         for group in ['Hydrophobic-P', 'Hydrophobic-L', 'HBondDonor-P',
                       'HBondDonor-L', 'HBondAccept-P', 'HBondAccept-L',
@@ -49,7 +50,8 @@ class PyMOLVisualizer:
         cmd.set('dash_radius', 0.05)
         self.set_custom_colorset()
 
-    def set_custom_colorset(self):
+    @staticmethod
+    def set_custom_colorset():
         """Defines a colorset with matching colors. Provided by Joachim."""
         cmd.set_color('myorange', '[253, 174, 97]')
         cmd.set_color('mygreen', '[171, 221, 164]')
@@ -58,7 +60,8 @@ class PyMOLVisualizer:
         cmd.set_color('mylightblue', '[158, 202, 225]')
         cmd.set_color('mylightgreen', '[229, 245, 224]')
 
-    def select_by_ids(self, selname, idlist, selection_exists=False, chunksize=20, restrict=None):
+    @staticmethod
+    def select_by_ids(selname, idlist, selection_exists=False, chunksize=20, restrict=None):
         """Selection with a large number of ids concatenated into a selection
         list can cause buffer overflow in PyMOL. This function takes a selection
         name and and list of IDs (list of integers) as input and makes a careful
@@ -72,7 +75,8 @@ class PyMOLVisualizer:
         if restrict is not None:
             cmd.select(selname, '%s and %s' % (selname, restrict))
 
-    def object_exists(self, object_name):
+    @staticmethod
+    def object_exists(object_name):
         """Checks if an object exists in the open PyMOL session."""
         return object_name in cmd.get_names("objects")
 
@@ -326,7 +330,8 @@ class PyMOLVisualizer:
             filename = override
         cmd.save("/".join([outfolder, "%s.pse" % filename]))
 
-    def png_workaround(self, filepath, width=1200, height=800):
+    @staticmethod
+    def png_workaround(filepath, width=1200, height=800):
         """Workaround for (a) severe bug(s) in PyMOL preventing ray-traced images to be produced in command-line mode.
         Use this function in case neither cmd.ray() or cmd.png() work.
         """
@@ -378,7 +383,8 @@ class PyMOLVisualizer:
         self.set_fancy_ray()
         self.png_workaround("/".join([outfolder, filename]))
 
-    def set_fancy_ray(self):
+    @staticmethod
+    def set_fancy_ray():
         """Give the molecule a flat, modern look."""
         cmd.set('light_count', 6)
         cmd.set('spec_count', 1.5)


=====================================
setup.py
=====================================
@@ -22,8 +22,7 @@ setup(name='plip',
       install_requires=[
           'openbabel',
           'numpy',
-          'lxml',
-          'pymol'
+          'lxml'
       ],
       entry_points={
           "console_scripts": [



View it on GitLab: https://salsa.debian.org/med-team/plip/-/compare/0d942ce3cffb19d14db1ecdd88a8d0bc68c90bfb...586eea80730c8d056ffd0a471658d8d71870f924

-- 
View it on GitLab: https://salsa.debian.org/med-team/plip/-/compare/0d942ce3cffb19d14db1ecdd88a8d0bc68c90bfb...586eea80730c8d056ffd0a471658d8d71870f924
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20200909/04219ed5/attachment-0001.html>


More information about the debian-med-commit mailing list