Skip to content

Commit

Permalink
changed input_type for keylookup
Browse files Browse the repository at this point in the history
  • Loading branch information
jal347 committed Oct 9, 2024
1 parent 619bcf2 commit bb543c1
Showing 1 changed file with 2 additions and 35 deletions.
37 changes: 2 additions & 35 deletions src/hub/dataload/sources/chembl/upload.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,39 +9,6 @@

from .parser import load_data

# class ChemblMergerStorage(storage.MergerStorage):
# @classmethod
# def merge_func(klass, doc1, doc2, **kwargs):
# doc2 = copy.copy(doc2)
# chembl_dict = {}

# for doc in [doc1, doc2]:
# chembl_list = doc.get("chembl", [])
# if not isinstance(chembl_list, list):
# chembl_list = [chembl_list]

# for chembl in chembl_list:
# uniprot = chembl.get("uniprot")
# chembl_target = chembl.get("chembl_target")

# if uniprot in chembl_dict:
# if isinstance(chembl_dict[uniprot]["chembl_target"], list):
# chembl_dict[uniprot]["chembl_target"].append(chembl_target)
# else:
# chembl_dict[uniprot]["chembl_target"] = [
# chembl_dict[uniprot]["chembl_target"],
# chembl_target,
# ]
# else:
# chembl_dict[uniprot] = {
# "chembl_target": chembl_target,
# "uniprot": uniprot,
# }

# merged_doc = {"_id": doc2["_id"]}
# merged_doc["chembl"] = list(chembl_dict.values())
# return merged_doc


class ChemblUploader(uploader.BaseSourceUploader):
name = "chembl"
Expand All @@ -51,8 +18,8 @@ class ChemblUploader(uploader.BaseSourceUploader):

keylookup = MyGeneKeyLookup(
input_types=[
("swissprot", "chembl.uniprot_accession"),
("trembl", "chembl.uniprot_accession"),
("swissprot", "chembl.uniprot"),
("trembl", "chembl.uniprot"),
],
skip_on_failure=True,
)
Expand Down

0 comments on commit bb543c1

Please sign in to comment.