Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ dev = [
"biopython>=1.85",
"playwright>=1.51.0",
"requests>=2.32.3",
"streamlit>=1.44.0",
"watchdog>=6.0.0",
"ty==0.0.1a26",
]
Expand Down
2 changes: 1 addition & 1 deletion src/grodecoder/databases/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def assert_database_exists(path: Path):
assert_database_exists(CSML_DB_PATH)


ModelType = TypeVar("ModelType", Ion, Solvent, Nucleotide, AminoAcid)
ModelType = TypeVar("ModelType", Ion, Solvent, Nucleotide, AminoAcid, mad.Residue, csml.Residue)


def _read_database(path: Path, model: type[ModelType]) -> list[ModelType]:
Expand Down
7 changes: 4 additions & 3 deletions src/grodecoder/identifier.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import time
from typing import Iterable, Iterator
from typing import Iterable, Iterator, Sequence

from loguru import logger
from MDAnalysis import AtomGroup
Expand Down Expand Up @@ -72,7 +72,8 @@ def _select_protein(universe: UniverseLike) -> AtomGroup:
logger.debug("excluding possible methanol residues (MET) from protein")
methanol = _find_methanol(universe)
if methanol:
selection_str += f" and not index {' '.join(map(str, methanol))}"
indexes = " ".join(str(i) for i in methanol) # ty complains when using map
selection_str += f" and not index {indexes}"

logger.debug("selecting protein")
protein = universe.select_atoms(selection_str)
Expand Down Expand Up @@ -135,7 +136,7 @@ def _unique_definitions(definitions: Iterable[DB.ResidueDefinition]) -> dict[str
return unique_items


def _remove_identified_atoms(universe: AtomGroup, molecules: list[HasAtoms]) -> AtomGroup:
def _remove_identified_atoms(universe: AtomGroup, molecules: Sequence[HasAtoms]) -> AtomGroup:
"""Removes the atoms of the identified molecules from the universe."""
for molecule in molecules:
universe -= molecule.atoms
Expand Down
26 changes: 12 additions & 14 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.