Skip to content

Commit

Permalink
refactor: fix to main file
Browse files Browse the repository at this point in the history
  • Loading branch information
colleenXu committed Jun 25, 2021
1 parent 1f169b1 commit 019f688
Showing 1 changed file with 76 additions and 83 deletions.
159 changes: 76 additions & 83 deletions src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,20 @@ export const APIMETA: MetaDataItemsObject = {
type_of_gene: ['type_of_gene'],
},
},
Transcript: {
id_ranks: ['ENSEMBL', 'SYMBOL', 'name'],
semantic: 'Transcript',
api_name: 'mygene.info',
url: 'https://mygene.info/v3/query',
mapping: {
ENSEMBL: ['ensembl.transcript'],
SYMBOL: ['symbol'],
name: ['name'],
},
additional_attributes_mapping: {
interpro: ['interpro.desc'],
},
},
Protein: {
id_ranks: ['UniProtKB', 'ENSEMBL', 'SYMBOL', 'UMLS', 'name'],
semantic: 'Protein',
Expand All @@ -56,8 +70,8 @@ export const APIMETA: MetaDataItemsObject = {
mapping: {
MYVARIANT_HG19: ['_id'],
DBSNP: ['dbsnp.rsid', 'clinvar.rsid', 'dbnsfp.rsid'],
HGVS: ['clinvar.hgvs.genomic', 'clinvar.hgvs.protein', 'clinvar.hgvs.coding'],
ClINVAR: ['clinvar.rcv.accession'],
HGVS: ['clinvar.hgvs.genomic', 'clinvar.hgvs.protein', 'clinvar.hgvs.coding', 'dbnsfp.clinvar.hgvs'],
ClINVAR: ['clinvar.variant_id', 'dbnsfp.clinvar.clinvar_id'],
},
additional_attributes_mapping: {
cadd_consequence: ['cadd.consequence'],
Expand All @@ -67,42 +81,24 @@ export const APIMETA: MetaDataItemsObject = {
sift_category: ['cadd.sift.cat'],
},
},
ChemicalSubstance: {
id_ranks: [
'CHEBI',
'CHEMBL.COMPOUND',
'DRUGBANK',
'PUBCHEM.COMPOUND',
'MESH',
'INCHI',
'INCHIKEY',
'UNII',
'KEGG',
'UMLS',
'RHEA',
'name',
],
semantic: 'ChemicalSubstance',
SmallMolecule: {
id_ranks: ['CHEBI', 'CHEMBL.COMPOUND', 'DRUGBANK', 'PUBCHEM.COMPOUND', 'MESH', 'INCHI', 'INCHIKEY', 'UNII', 'UMLS', 'CAS', 'HMDB', 'LINCS', 'name'],
semantic: 'SmallMolecule',
api_name: 'mychem.info',
url: 'https://mychem.info/v1/query',
mapping: {
'CHEMBL.COMPOUND': ['chembl.molecule_chembl_id', 'drugbank.xrefs.chembl', 'drugcentral.xrefs.chembl_id'],
DRUGBANK: ['drugcentral.xrefs.drugbank_id', 'pharmgkb.xrefs.drugbank', 'chebi.xrefs.drugbank', 'drugbank.id'],
'PUBCHEM.COMPOUND': [
'pubchem.cid',
'drugbank.xrefs.pubchem.cid',
'drugcentral.xrefs.pubchem_cid',
'pharmgkb.xrefs.pubchem.cid',
],
CHEBI: ['chebi.id', 'chembl.chebi_par_id', 'drugbank.xrefs.chebi', 'drugcentral.xrefs.chebi'],
'CHEMBL.COMPOUND': ['chembl.molecule_chembl_id', 'drugbank.xrefs.chembl', 'drugcentral.xrefs.chembl_id', 'unichem.chembl'],
DRUGBANK: ['drugcentral.xrefs.drugbank_id', 'pharmgkb.xrefs.drugbank', 'chebi.xrefs.drugbank', 'drugbank.id', 'unichem.drugbank'],
'PUBCHEM.COMPOUND': ['pubchem.cid', 'drugbank.xrefs.pubchem.cid', 'drugcentral.xrefs.pubchem_cid', 'pharmgkb.xrefs.pubchem.cid', 'chebi.xrefs.pubchem.cid', 'unichem.pubchem'],
CHEBI: ['chebi.id', 'chembl.chebi_par_id', 'drugbank.xrefs.chebi', 'drugcentral.xrefs.chebi', 'pharmgkb.xrefs.chebi', 'unichem.chebi'],
UMLS: ['drugcentral.xrefs.umlscui', 'pharmgkb.xrefs.umls', 'umls.cui'],
MESH: ['umls.mesh', 'drugcentral.xrefs.mesh_descriptor_ui', 'ginas.xrefs.MESH', 'pharmgkb.xrefs.mesh'],
UNII: ['drugcentral.xrefs.unii', 'unii.unii', 'aeolus.unii', 'ginas.unii'],
INCHIKEY: ['drugbank.inchi_key', 'ginas.inchikey', 'unii.inchikey', 'chebi.inchikey'],
INCHI: ['drugbank.inchi', 'chebi.inchi', 'chembl.inchi'],
KEGG: ['drugbank.xrefs.kegg.cid'],
LINCS: ['unichem.lincs'],
RHEA: ['chebi.xrefs.rhea'],
INCHIKEY: ['drugbank.inchi_key', 'ginas.inchikey', 'unii.inchikey', 'chebi.inchikey', 'chembl.inchi_key', 'pubchem.inchi_key'],
INCHI: ['drugbank.inchi', 'chebi.inchi', 'chembl.inchi', 'pharmgkb.inchi', 'pubchem.inchi'],
LINCS: ['unichem.lincs', 'chebi.xrefs.lincs'],
CAS: ['chebi.xrefs.cas', 'ginas.cas_primary', 'pharmgkb.xrefs.cas'],
HMDB: ['chebi.xrefs.hmdb', 'pharmgkb.xrefs.hmdb'],
name: ['chembl.pref_name', 'drugbank.name', 'umls.name', 'ginas.preferred_name', 'pharmgkb.name', 'chebi.name'],
},
additional_attributes_mapping: {
Expand All @@ -120,22 +116,8 @@ export const APIMETA: MetaDataItemsObject = {
},
},
Drug: {
id_ranks: [
'CHEBI',
'CHEMBL.COMPOUND',
'DRUGBANK',
'PUBCHEM.COMPOUND',
'MESH',
'INCHI',
'INCHIKEY',
'UNII',
'KEGG',
'UMLS',
'LINCS',
'RHEA',
'name',
],
semantic: 'ChemicalSubstance',
id_ranks: ['CHEBI', 'CHEMBL.COMPOUND', 'DRUGBANK', 'PUBCHEM.COMPOUND', 'MESH', 'INCHI', 'INCHIKEY', 'UNII', 'UMLS', 'CAS', 'HMDB', 'LINCS', 'RXCUI', 'NDC', 'name'],
semantic: 'Drug',
api_name: 'mychem.info',
url: 'https://mychem.info/v1/query',
mapping: {
Expand All @@ -147,14 +129,20 @@ export const APIMETA: MetaDataItemsObject = {
'drugcentral.xrefs.pubchem_cid',
'pharmgkb.xrefs.pubchem.cid',
],
CHEBI: ['chebi.id', 'chembl.chebi_par_id', 'drugbank.xrefs.chebi', 'drugcentral.xrefs.chebi'],
'CHEMBL.COMPOUND': ['chembl.molecule_chembl_id', 'drugbank.xrefs.chembl', 'drugcentral.xrefs.chembl_id', 'unichem.chembl'],
DRUGBANK: ['drugcentral.xrefs.drugbank_id', 'pharmgkb.xrefs.drugbank', 'chebi.xrefs.drugbank', 'drugbank.id', 'unichem.drugbank'],
'PUBCHEM.COMPOUND': ['pubchem.cid', 'drugbank.xrefs.pubchem.cid', 'drugcentral.xrefs.pubchem_cid', 'pharmgkb.xrefs.pubchem.cid', 'chebi.xrefs.pubchem.cid', 'unichem.pubchem'],
CHEBI: ['chebi.id', 'chembl.chebi_par_id', 'drugbank.xrefs.chebi', 'drugcentral.xrefs.chebi', 'pharmgkb.xrefs.chebi', 'unichem.chebi'],
UMLS: ['drugcentral.xrefs.umlscui', 'pharmgkb.xrefs.umls', 'umls.cui'],
MESH: ['umls.mesh', 'drugcentral.xrefs.mesh_descriptor_ui', 'ginas.xrefs.MESH', 'pharmgkb.xrefs.mesh'],
UNII: ['drugcentral.xrefs.unii', 'unii.unii', 'aeolus.unii', 'ginas.unii'],
INCHIKEY: ['drugbank.inchi_key', 'ginas.inchikey', 'unii.inchikey', 'chebi.inchikey'],
INCHI: ['drugbank.inchi', 'chebi.inchi', 'chembl.inchi'],
KEGG: ['drugbank.xrefs.kegg.cid'],
RHEA: ['chebi.xrefs.rhea'],
INCHIKEY: ['drugbank.inchi_key', 'ginas.inchikey', 'unii.inchikey', 'chebi.inchikey', 'chembl.inchi_key', 'pubchem.inchi_key'],
INCHI: ['drugbank.inchi', 'chebi.inchi', 'chembl.inchi', 'pharmgkb.inchi', 'pubchem.inchi'],
LINCS: ['unichem.lincs', 'chebi.xrefs.lincs'],
CAS: ['chebi.xrefs.cas', 'ginas.cas_primary', 'pharmgkb.xrefs.cas'],
HMDB: ['chebi.xrefs.hmdb', 'pharmgkb.xrefs.hmdb'],
RXCUI: ['ginas.xrefs.RXCUI', 'unii.rxcui', 'aeolus.rxcui'],
NDC: ['pharmgkb.xrefs.ndc'],
name: ['chembl.pref_name', 'drugbank.name', 'umls.name', 'ginas.preferred_name', 'pharmgkb.name', 'chebi.name'],
},
additional_attributes_mapping: {
Expand All @@ -178,7 +166,7 @@ export const APIMETA: MetaDataItemsObject = {
url: 'https://biothings.ncats.io/hpo/query',
mapping: {
UMLS: ['xrefs.umls'],
SNOMEDCT: ['xrefs.snomed_ct'],
SNOMEDCT: ['xrefs.snomed_ct', 'xrefs.snomedct_us'],
HP: ['_id'],
MEDDRA: ['xrefs.meddra'],
EFO: ['xrefs.efo'],
Expand All @@ -189,108 +177,113 @@ export const APIMETA: MetaDataItemsObject = {
},
},
Disease: {
id_ranks: ['MONDO', 'DOID', 'OMIM', 'ORPHANET', 'EFO', 'UMLS', 'MESH', 'HP', 'GARD', 'name'],
id_ranks: ['MONDO', 'DOID', 'OMIM', 'ORPHANET', 'EFO', 'UMLS', 'MESH', 'HP', 'GARD', 'SNOMEDCT', 'NCIT', 'name'],
semantic: 'Disease',
api_name: 'mydisease.info',
url: 'https://mydisease.info/v1/query',
mapping: {
MONDO: ['mondo.mondo'],
DOID: ['mondo.xrefs.doid'],
UMLS: [
'mondo.xrefs.umls',
'mondo.xrefs.umls_cui',
'disgenet.xrefs.umls',
'umls.umls',
'disease_ontology.xrefs.umls_cui',
],
name: ['mondo.label', 'disgenet.xrefs.disease_name'],
MONDO: ['mondo.mondo', 'disgenet.xrefs.mondo'],
DOID: ['mondo.xrefs.doid', 'disease_ontology.doid', 'disgenet.xrefs.doid'],
UMLS: ['mondo.xrefs.umls', 'mondo.xrefs.umls_cui', 'disgenet.xrefs.umls', 'umls.umls', 'disease_ontology.xrefs.umls_cui'],
name: ['mondo.label', 'disgenet.xrefs.disease_name', 'disease_ontology.name'],
MESH: ['mondo.xrefs.mesh', 'disease_ontology.xrefs.mesh', 'ctd.mesh'],
OMIM: ['mondo.xrefs.omim', 'hpo.omim', 'disgenet.xrefs.omim'],
EFO: ['mondo.xrefs.efo'],
OMIM: ['mondo.xrefs.omim', 'hpo.omim', 'disgenet.xrefs.omim', 'disease_ontology.xrefs.omim'],
EFO: ['mondo.xrefs.efo', 'disgenet.xrefs.efo', 'disease_ontology.xrefs.efo'],
ORPHANET: ['hpo.orphanet', 'mondo.xrefs.orphanet'],
GARD: ['mondo.xrefs.gard', 'disease_ontology.xrefs.gard'],
HP: ['mondo.xrefs.hp'],
HP: ['mondo.xrefs.hp', 'disgenet.xrefs.hp'],
SNOMEDCT: ['mondo.xrefs.sctid', 'umls.snomed.preferred', 'umls.snomed.non-preferred'],
NCIT: ['mondo.xrefs.ncit', 'disease_ontology.xrefs.ncit']
},
},
ClinicalFinding: {
id_ranks: ['LOINC', 'NCIT', 'EFO', 'name'],
semantic: 'Disease',
api_name: 'mydisease.info',
url: 'https://mydisease.info/v1/query',
mapping: {
LOINC: ['mondo.xrefs.loinc'],
NCIT: ['mondo.xrefs.ncit', 'disease_ontology.xrefs.ncit']
EFO: ['mondo.xrefs.efo', 'disgenet.xrefs.efo', 'disease_ontology.xrefs.efo'],
name: ['mondo.label', 'disgenet.xrefs.disease_name', 'disease_ontology.name'],
},
},
MolecularActivity: {
id_ranks: ['GO', 'MetaCyc', 'RHEA', 'KEGG', 'REACT', 'name'],
id_ranks: ['GO', 'MetaCyc', 'RHEA', 'KEGG.REACTION', 'REACT', 'name'],
semantic: 'MolecularActivity',
api_name: 'Gene Ontology Molecular Function API',
url: 'https://biothings.ncats.io/go_mf/query',
mapping: {
GO: ['_id'],
MetaCyc: ['xrefs.metacyc'],
RHEA: ['xrefs.rhea'],
KEGG: ['xrefs.kegg_reaction'],
"KEGG.REACTION": ['xrefs.kegg_reaction'],
REACT: ['xrefs.reactome'],
name: ['name'],
},
},
BiologicalProcess: {
id_ranks: ['GO', 'MetaCyc', 'REACT', 'KEGG', 'name'],
id_ranks: ['GO', 'MetaCyc', 'REACT', 'name'],
semantic: 'BiologicalProcess',
api_name: 'Gene Ontology Biological Process API',
url: 'https://biothings.ncats.io/go_bp/query',
mapping: {
GO: ['_id'],
MetaCyc: ['xrefs.metacyc'],
KEGG: ['xrefs.kegg_pathway'],
REACT: ['xrefs.reactome'],
name: ['name'],
},
},
CellularComponent: {
id_ranks: ['GO', 'MetaCyc', 'RHEA', 'name'],
id_ranks: ['GO', 'name'],
semantic: 'CellularComponent',
api_name: 'Gene Ontology Cellular Component API',
url: 'https://biothings.ncats.io/go_cc/query',
mapping: {
GO: ['_id'],
MetaCyc: ['xrefs.metacyc'],
RHEA: ['xrefs.rhea'],
name: ['name'],
},
},
Pathway: {
id_ranks: ['REACT', 'KEGG', 'PHARMGKB', 'WIKIPATHWAYS', 'BIOCARTA', 'name'],
id_ranks: ['REACT', 'KEGG', 'PHARMGKB.PATHWAYS', 'WIKIPATHWAYS', 'BIOCARTA', 'GO', 'SMPDB', 'name'],
semantic: 'Pathway',
api_name: 'geneset API',
api_name: 'Geneset API',
url: 'https://biothings.ncats.io/geneset/query',
mapping: {
REACT: ['reactome'],
WIKIPATHWAYS: ['wikipathways'],
KEGG: ['kegg'],
BIOCARTA: ['biocarta'],
PHARMGKB: ['pharmgkb'],
"PHARMGKB.PATHWAYS": ['pharmgkb'],
GO: ['go'],
SMPDB: ['smpdb'],
name: ['name'],
},
additional_attributes_mapping: {
num_of_participants: ['num_of_participants'],
},
},
AnatomicalEntity: {
id_ranks: ['UBERON', 'UMLS', 'MESH', 'NCIT', 'name'],
id_ranks: ['UBERON', 'UMLS', 'MESH', 'name'],
semantic: 'AnatomicalEntity',
api_name: 'UBERON API',
url: 'https://biothings.ncats.io/uberon/query',
mapping: {
UBERON: ['_id'],
UMLS: ['xrefs.umls'],
MESH: ['xrefs.mesh'],
NCIT: ['xrefs.ncit'],
name: ['name'],
},
},
Cell: {
id_ranks: ['CL', 'NCIT', 'MESH', 'EFO', 'name'],
id_ranks: ['CL', 'NCIT', 'MESH', 'name'],
semantic: 'Cell',
api_name: 'Cell Onotlogy API',
api_name: 'Cell Ontology API',
url: 'https://biothings.ncats.io/cell_ontology/query',
mapping: {
CL: ['_id'],
NCIT: ['xrefs.ncit'],
MESH: ['xrefs.mesh'],
EFO: ['xrefs.efo'],
name: ['name'],
},
},
Expand Down

1 comment on commit 019f688

@colleenXu
Copy link
Contributor Author

@colleenXu colleenXu commented on 019f688 Jun 25, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

large changes:

  • changed ChemicalSubstance to SmallMolecule
  • added Transcript, ClinicalFinding (for multiomics wellness kp api)

Smaller changes:

  • fix typos
  • added mapping fields
  • SequenceVariant: changed clinvar ID to use variation ID (not rcv)
  • SmallMolecule: removed KEGG / RHEA (not chemical ids), added LINCS / CAS / HMDB (for specific apis that use them)
  • Drug: added rxcui, ndc, and the small molecule stuff
  • MolecularActivity: changed KEGG to KEGG.REACTION
  • BiologicalProcess: removed KEGG
  • CellularComponent: removed MetaCyc, Rhea
  • Pathway: add GO/SMPDB, change pharmgkb to pharmgkb.pathways
  • AnatomicalEntity: removed NCIT (not in api)
  • Cell: removed umls, hpo (couldn't find in the api)

Please sign in to comment.