Skip to content

Commit

Permalink
Merge pull request #342 from pwrose/master
Browse files Browse the repository at this point in the history
upgraded to new RCSB webservices
  • Loading branch information
pwrose committed Jan 27, 2022
2 parents 49b89ca + d950be0 commit a1758be
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
9 changes: 8 additions & 1 deletion mmtfPyspark/webfilters/advancedQuery.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ class AdvancedQuery(object):
def __init__(self, xmlQuery):

result_type, results, scores = post_query(xmlQuery)

print('AdvanceQuery:', result_type)
self.result_type = result_type
#self.entityLevel = (len(results) > 0) and (":" in results[0])
self.entityLevel = result_type == 'polymer_entity'

Expand All @@ -50,6 +51,12 @@ def __init__(self, xmlQuery):
#print('structureIds:', self.structureIds)
self.exclusive = False

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

def get_result_type(self):
return self.result_type

def __call__(self, t):

structure = t[1]
Expand Down
2 changes: 1 addition & 1 deletion mmtfPyspark/webfilters/sequenceSimilarity.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ def __init__(self, sequence, target="Protein", evalue_cutoff=0.1, identity_cutof
# self.structureIds = set(identifiers)
self.filter = AdvancedQuery(query)
self.structureIds = self.filter.structureIds
self.result_type = self.filter.result_type
# self.result_type = self.filter.result_type

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

0 comments on commit a1758be

Please sign in to comment.