Skip to content

Commit

Permalink
1-1 uniprot mapping
Browse files Browse the repository at this point in the history
  • Loading branch information
jal347 committed Oct 3, 2024
1 parent 31766d3 commit ce73d6c
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions src/hub/dataload/sources/chembl/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,15 @@ def parse_data(data):
if UNIPROT_ACCESSION_PATTERN.fullmatch(accession):
uniprot_accessions.append(accession)
if uniprot_accessions:
output = {
"_id": uniprot_accessions[0],
"chembl_target": item["target_chembl_id"],
"xrefs": {
"accession": uniprot_accessions[0],
},
}
yield output
for uniprot_accession in uniprot_accessions:
output = {
"_id": uniprot_accession,
"chembl_target": item["target_chembl_id"],
"xrefs": {
"accession": uniprot_accession,
},
}
yield output


def load_data(target_filepaths):
Expand Down

0 comments on commit ce73d6c

Please sign in to comment.