Skip to content
Open
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
6 changes: 3 additions & 3 deletions src/biotite/database/rcsb/query.py
Original file line number Diff line number Diff line change
Expand Up @@ -439,9 +439,9 @@ class StructureQuery(SingleQuery):
Examples
--------

>>> query = StructureQuery("1L2Y", chain="A")
>>> query = StructureQuery("1GYA", assembly="1")
>>> print(sorted(search(query)))
['1L2Y', '1RIJ', '2JOF', '2LDJ', '2M7D', '7MQS', '9DPF']
['1CDB', '1GYA', '1QA9']
"""

def __init__(self, pdb_id, chain=None, assembly=None, strict=True):
Expand All @@ -452,7 +452,7 @@ def __init__(self, pdb_id, chain=None, assembly=None, strict=True):
):
raise TypeError("Either the chain ID or assembly ID must be set")
elif chain is None:
self._value = {"entry_id": pdb_id, "asssembly_id": assembly}
self._value = {"entry_id": pdb_id, "assembly_id": assembly}
else:
self._value = {"entry_id": pdb_id, "asym_id": chain}

Expand Down
5 changes: 3 additions & 2 deletions tests/database/test_rcsb.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,8 +196,9 @@ def test_search_sequence():


@pytest.mark.skipif(cannot_connect_to(RCSB_URL), reason="RCSB PDB is not available")
def test_search_structure():
query = rcsb.StructureQuery("1L2Y", chain="A")
@pytest.mark.parametrize("chain, assembly", [("A", None), (None, "1")])
def test_search_structure(chain, assembly):
query = rcsb.StructureQuery("1L2Y", chain=chain, assembly=assembly)
test_ids = rcsb.search(query)
assert "1L2Y" in test_ids

Expand Down
Loading