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

Integrate pdbprep into codebase #592

Draft
wants to merge 14 commits into
base: dev
Choose a base branch
from
7 changes: 2 additions & 5 deletions deeprank2/features/exposure.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
import logging
import signal
import sys
import warnings
from typing import NoReturn

import numpy as np
from Bio.PDB.Atom import PDBConstructionWarning
from Bio.PDB.HSExposure import HSExposureCA
from Bio.PDB.PDBParser import PDBParser
from Bio.PDB.ResidueDepth import get_surface, residue_depth
Expand Down Expand Up @@ -42,9 +40,8 @@ def add_features( # noqa:D103
signal.signal(signal.SIGINT, handle_sigint)
signal.signal(signal.SIGALRM, handle_timeout)

with warnings.catch_warnings(record=PDBConstructionWarning):
parser = PDBParser()
structure = parser.get_structure("_tmp", pdb_path)
parser = PDBParser(QUIET=True)
structure = parser.get_structure("_tmp", pdb_path)
bio_model = structure[0]

try:
Expand Down
6 changes: 5 additions & 1 deletion deeprank2/features/irc.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,11 @@ def __init__(self, residue: tuple[str, int, str], polarity: Polarity):
self.connections["all"] = []


def get_IRCs(pdb_path: str, chains: list[str], cutoff: float = 5.5) -> dict[str, _ContactDensity]:
def get_IRCs(
pdb_path: str,
chains: list[str],
cutoff: float = 5.5,
) -> dict[str, _ContactDensity]:
"""Get all close contact residues from the opposite chain.

Args:
Expand Down
Empty file.
Loading