[med-svn] [Git][med-team/plip][master] 6 commits: Add myself to uploaders
Nilesh Patra
gitlab at salsa.debian.org
Fri Dec 18 21:25:51 GMT 2020
Nilesh Patra pushed to branch master at Debian Med / plip
Commits:
73f80a44 by Nilesh Patra at 2020-12-19T02:52:56+05:30
Add myself to uploaders
- - - - -
b85030ab by Nilesh Patra at 2020-12-19T02:53:31+05:30
routine-update: New upstream version
- - - - -
393877e4 by Nilesh Patra at 2020-12-19T02:53:32+05:30
New upstream version 2.1.7+dfsg
- - - - -
983c8253 by Nilesh Patra at 2020-12-19T02:53:32+05:30
Update upstream source from tag 'upstream/2.1.7+dfsg'
Update to upstream version '2.1.7+dfsg'
with Debian dir ebc6081eb30dea03d7f86c1a37ee908e6dc15e9f
- - - - -
bf7a672c by Nilesh Patra at 2020-12-19T02:53:32+05:30
routine-update: Standards-Version: 4.5.1
- - - - -
f35e7c00 by Nilesh Patra at 2020-12-19T02:53:37+05:30
routine-update: Ready to upload to unstable
- - - - -
8 changed files:
- debian/changelog
- debian/control
- plip/basic/supplemental.py
- plip/plipcmd.py
- plip/structure/preparation.py
- plip/test/test_structure_processing.py
- + plip/test/test_visualization.py
- plip/visualization/visualize.py
Changes:
=====================================
debian/changelog
=====================================
@@ -1,3 +1,10 @@
+plip (2.1.7+dfsg-1) unstable; urgency=medium
+
+ * New upstream version
+ * Standards-Version: 4.5.1 (routine-update)
+
+ -- Nilesh Patra <npatra974 at gmail.com> Sat, 19 Dec 2020 02:53:37 +0530
+
plip (2.1.6+dfsg-1) unstable; urgency=medium
* Team upload.
=====================================
debian/control
=====================================
@@ -1,6 +1,6 @@
Source: plip
Maintainer: Debian Med Packaging Team <debian-med-packaging at lists.alioth.debian.org>
-Uploaders: Alexandre Mestiashvili <mestia at debian.org>
+Uploaders: Alexandre Mestiashvili <mestia at debian.org>, Nilesh Patra <npatra974 at gmail.com>
Section: python
Priority: optional
Build-Depends: debhelper-compat (= 13),
@@ -12,7 +12,7 @@ Build-Depends: debhelper-compat (= 13),
python3-numpy,
python3-openbabel,
python3-setuptools
-Standards-Version: 4.5.0
+Standards-Version: 4.5.1
Vcs-Browser: https://salsa.debian.org/med-team/plip
Vcs-Git: https://salsa.debian.org/med-team/plip.git
Homepage: https://projects.biotec.tu-dresden.de/plip-web/plip/
=====================================
plip/basic/supplemental.py
=====================================
@@ -1,7 +1,6 @@
import gzip
import itertools
import os
-import platform
import re
import subprocess
import sys
@@ -17,14 +16,6 @@ from plip.basic import config, logger
logger = logger.get_logger()
-# Windows and MacOS
-if os.name != 'nt' and platform.system() != 'Darwin': # Resource module not available for Windows
- import resource
-
-# Settings
-np.seterr(all='ignore') # No runtime warnings
-
-
def tmpfile(prefix, direc):
"""Returns the path to a newly created temporary file."""
return tempfile.mktemp(prefix=prefix, suffix='.pdb', dir=direc)
@@ -378,10 +369,6 @@ def int32_to_negative(int32):
def read_pdb(pdbfname, as_string=False):
"""Reads a given PDB file and returns a Pybel Molecule."""
pybel.ob.obErrorLog.StopLogging() # Suppress all OpenBabel warnings
- if os.name != 'nt': # Resource module not available for Windows
- maxsize = resource.getrlimit(resource.RLIMIT_STACK)[-1]
- resource.setrlimit(resource.RLIMIT_STACK, (min(2 ** 28, maxsize), maxsize))
- sys.setrecursionlimit(10 ** 5) # increase Python recursion limit
return readmol(pdbfname, as_string=as_string)
=====================================
plip/plipcmd.py
=====================================
@@ -225,9 +225,8 @@ def main():
parser.add_argument("--nohydro", dest="nohydro", default=False,
help="Do not add polar hydrogens in case your structure already contains hydrogens.",
action="store_true")
- parser.add_argument("--model", dest="model", default=1,
- help="Model number to be used for multi-model structures.",
- action="store_true")
+ parser.add_argument("--model", dest="model", default=1, type=int,
+ help="Model number to be used for multi-model structures.")
# Optional threshold arguments, not shown in help
thr = namedtuple('threshold', 'name type')
thresholds = [thr(name='aromatic_planarity', type='angle'),
=====================================
plip/structure/preparation.py
=====================================
@@ -63,6 +63,8 @@ class PDBParser:
corrected_line, newnum = self.fix_pdbline(line, lastnum)
if corrected_line is not None:
if corrected_line.startswith('MODEL'):
+ # reset atom number when new model is encountered
+ lastnum = 0
try: # Get number of MODEL (1,2,3)
model_num = int(corrected_line[10:14])
# initialize storage for new model
@@ -72,7 +74,8 @@ class PDBParser:
other_models = True
except ValueError:
logger.debug(f'ignoring invalid MODEL entry: {corrected_line}')
- lastnum = newnum
+ else:
+ lastnum = newnum
model_dict[current_model].append(corrected_line)
# select model
try:
=====================================
plip/test/test_structure_processing.py
=====================================
@@ -22,10 +22,10 @@ class StructureProcessingTestCase(unittest.TestCase):
all_hbonds = interactions.hbonds_ldon + interactions.hbonds_pdon
all_hydrogen_bonds.add(len(all_hbonds))
# models contain from 0-2 hydrogen bonds
- self.assertEquals(all_hydrogen_bonds, {0, 1, 2})
+ self.assertEqual(all_hydrogen_bonds, {0, 1, 2})
def test_nmr_invalid_model(self):
config.MODEL = 11
interactions = characterize_complex('./pdb/2ndo.pdb', 'SFQ:A:201')
all_hbonds = interactions.hbonds_ldon + interactions.hbonds_pdon
- self.assertEquals(len(all_hbonds), 1)
+ self.assertEqual(len(all_hbonds), 1)
=====================================
plip/test/test_visualization.py
=====================================
@@ -0,0 +1,31 @@
+import os
+import tempfile
+import unittest
+
+from plip.basic import config
+from plip.basic.remote import VisualizerData
+from plip.structure.preparation import PDBComplex
+from plip.visualization.visualize import visualize_in_pymol
+
+
+class VisualizationTest(unittest.TestCase):
+
+ def setUp(self) -> None:
+ self.tmp_dir = tempfile.mkdtemp()
+
+ def test_visualization(self) -> None:
+
+ pdb_file = './pdb/2ndo.pdb'
+ binding_site_id = 'SFQ:A:201'
+ config.PYMOL = True
+ config.MODEL = 2
+ config.OUTPATH = str(self.tmp_dir)
+ pdb_complex = PDBComplex()
+ pdb_complex.load_pdb(pdb_file)
+ for ligand in pdb_complex.ligands:
+ if ':'.join([ligand.hetid, ligand.chain, str(ligand.position)]) == binding_site_id:
+ pdb_complex.characterize_complex(ligand)
+ visualizer_complexes = [VisualizerData(pdb_complex, site) for site in sorted(pdb_complex.interaction_sets) if
+ not len(pdb_complex.interaction_sets[site].interacting_res) == 0]
+ visualize_in_pymol(visualizer_complexes[0])
+ self.assertEqual(1, len(os.listdir(self.tmp_dir)))
=====================================
plip/visualization/visualize.py
=====================================
@@ -8,7 +8,7 @@ logger = logger.get_logger()
def visualize_in_pymol(plcomplex):
- """Visualizes the protein-ligand pliprofiler at one site in PyMOL."""
+ """Visualizes the given Protein-Ligand complex at one site in PyMOL."""
vis = PyMOLVisualizer(plcomplex)
@@ -39,7 +39,8 @@ def visualize_in_pymol(plcomplex):
cmd.load(plcomplex.sourcefile)
current_name = cmd.get_object_list(selection='(all)')[0]
- logger.debug(f'setting current_name to {current_name} and pdbid to {pdbid}')
+
+ logger.debug(f'setting current_name to {current_name} and PDB-ID to {pdbid}')
cmd.set_name(current_name, pdbid)
cmd.hide('everything', 'all')
if config.PEPTIDES:
View it on GitLab: https://salsa.debian.org/med-team/plip/-/compare/100be1392e5ba13088463cbaa491d23d40117d2b...f35e7c00f5f5b2b7c7fd825a8953388f0edd6e95
--
View it on GitLab: https://salsa.debian.org/med-team/plip/-/compare/100be1392e5ba13088463cbaa491d23d40117d2b...f35e7c00f5f5b2b7c7fd825a8953388f0edd6e95
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/20201218/2ea52847/attachment-0001.html>
More information about the debian-med-commit
mailing list