Skip to content

Commit

Permalink
upgraded to new RCSB webservices
Browse files Browse the repository at this point in the history
  • Loading branch information
pwrose committed Jan 26, 2022
1 parent 2fe8fd8 commit e22eb64
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions mmtfPyspark/webfilters/sequenceSimilarity.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,15 +96,24 @@ def __init__(self, sequence, target="Protein", evalue_cutoff=0.1, identity_cutof
'}'
)

print(query)
# TODO: need custom post query that returns scores, alignments, etc.

# TODO use return_type polymer_entity, match entities to chains

result_type, identifiers, scores = post_query(query)
print(identifiers[:25])
self.structureIds = set(identifiers)


def get_structure_ids(self):
return list(self.structureIds)


def __call__(self, t):
match = t[0] in self.structureIds

# If results are PDB IDs, but the keys contains chain names,
# then trucate the chain name before matching (eg. 4HHB.A -> 4HHB)
if not match and len(t[0]) > 4:
match = t[0][:4] in self.structureIds

return match

0 comments on commit e22eb64

Please sign in to comment.