Skip to content

Commit

Permalink
replace _load_ppi_atoms function
Browse files Browse the repository at this point in the history
only requires a single line of code anyway
  • Loading branch information
DaniBodor committed Sep 21, 2023
1 parent b780d64 commit 79fe1ae
Showing 1 changed file with 3 additions and 19 deletions.
22 changes: 3 additions & 19 deletions deeprank2/query.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
from deeprank2.domain.aminoacidlist import convert_aa_nomenclature
from deeprank2.features import components, conservation, contact
from deeprank2.molstruct.aminoacid import AminoAcid
from deeprank2.molstruct.atom import Atom
from deeprank2.molstruct.residue import Residue, SingleResidueVariant
from deeprank2.molstruct.structure import Chain, PDBStructure
from deeprank2.utils.buildgraph import (get_contact_atoms, get_structure,
Expand Down Expand Up @@ -475,20 +474,6 @@ def build(
return graph


def _load_ppi_atoms(
pdb_path: str,
chain_ids: List[str],
distance_cutoff: float,
) -> List[Atom]:

# get the contact atoms
contact_atoms = get_contact_atoms(pdb_path, chain_ids, distance_cutoff)

if len(contact_atoms) == 0:
raise ValueError("no contact atoms found")

return contact_atoms

def _load_ppi_pssms(
pssm_paths: Optional[Dict[str, str]],
chain_ids: List[str],
Expand Down Expand Up @@ -543,10 +528,9 @@ def build(
:class:`Graph`: The resulting :class:`Graph` object with all the features and targets.
"""

contact_atoms = _load_ppi_atoms(self.pdb_path,
self.chain_ids,
self.distance_cutoff,
)
contact_atoms = get_contact_atoms(self.pdb_path, self.chain_ids, self.distance_cutoff)
if len(contact_atoms) == 0:
raise ValueError("no contact atoms found")

# build the graph
if self.resolution == 'atomic':
Expand Down

0 comments on commit 79fe1ae

Please sign in to comment.