Skip to content

Commit

Permalink
test keylookup
Browse files Browse the repository at this point in the history
  • Loading branch information
jal347 committed Oct 3, 2024
1 parent 8d8e568 commit 97c75b3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/hub/dataload/sources/chembl/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ def parse_data(data):
uniprot_accessions.append(accession)
if uniprot_accessions:
output = {
"_id": item["target_chembl_id"],
"chembl_target": item["target_chembl_id"],
"xrefs": {
"accession": uniprot_accessions,
Expand Down
6 changes: 3 additions & 3 deletions src/hub/dataload/sources/chembl/upload.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ def load_data(self, data_folder):
target_filepaths = glob.iglob(
os.path.join(data_folder, self.TARGET_FILENAME_PATTERN)
)
for doc in load_data(target_filepaths):
yield doc
# return self.keylookup(load_data(target_filepaths))
# for doc in load_data(target_filepaths):
# yield doc
return self.keylookup(load_data(target_filepaths))

@classmethod
def get_mapping(klass):
Expand Down

0 comments on commit 97c75b3

Please sign in to comment.