Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update mappings, semantic types (without update to biolink v2) #61

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
114 changes: 78 additions & 36 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
![Test Coveralls](https://github.com/kevinxin90/biomedical_id_resolver.js/workflows/Test%20Coveralls/badge.svg)
[![Coverage Status](https://coveralls.io/repos/github/kevinxin90/biomedical_id_resolver.js/badge.svg?branch=master)](https://coveralls.io/github/kevinxin90/biomedical_id_resolver.js?branch=master)
![Test Coveralls](https://github.com/biothings/biomedical_id_resolver.js/workflows/Test%20Coveralls/badge.svg)
[![Coverage Status](https://coveralls.io/repos/github/biothings/biomedical_id_resolver.js/badge.svg?branch=master)](https://coveralls.io/github/kevinxin90/biomedical_id_resolver.js?branch=master)
![npm](https://img.shields.io/npm/dw/biomedical_id_resolver)
![GitHub issues](https://img.shields.io/github/issues/kevinxin90/biomedical_id_resolver.js)
![GitHub issues](https://img.shields.io/github/issues/biothings/biomedical_id_resolver.js)
![NPM](https://img.shields.io/npm/l/biomedical_id_resolver)
![npm](https://img.shields.io/npm/v/biomedical_id_resolver?style=plastic)
![GitHub tag (latest by date)](https://img.shields.io/github/v/tag/kevinxin90/biomedical_id_resolver.js)
![GitHub tag (latest by date)](https://img.shields.io/github/v/tag/biothings/biomedical_id_resolver.js)



Expand Down Expand Up @@ -114,7 +114,24 @@ let input = {
5. OMIM
6. UniProtKB
7. UMLS
8. name
8. MGI
9. name

> Transcript ID resolution is done through MyGene.info API

- Transcript
1. ENSEMBL
2. SYMBOL
3. name

> Protein ID resolution is done through MyGene.info API

- Protein
1. UniProtKB
2. ENSEMBL
3. SYMBOL
4. UMLS
5. name

> Variant ID resolution is done through MyVariant.info API

Expand All @@ -130,15 +147,35 @@ let input = {
1. CHEBI
2. CHEMBL.COMPOUND
3. DRUGBANK
4. PUBCHEM
4. PUBCHEM.COMPOUND
5. MESH
6. INCHI
7. INCHIKEY
8. UNII
9. UMLS
10. CAS
11. HMDB
12. LINCS
13. name

> Drug ID resolution is done through MyChem.info API

- Drug
1. CHEBI
2. CHEMBL.COMPOUND
3. DRUGBANK
4. PUBCHEM.COMPOUND
5. MESH
6. INCHI
7. INCHIKEY
8. UNII
9. KEGG
10. UMLS
11. name
12. id
9. UMLS
10. CAS
11. HMDB
12. LINCS
13. RXCUI
14. NDC
15. name

> Disease ID Resolution is done through MyDisease.info API

Expand All @@ -151,17 +188,23 @@ let input = {
5. EFO
6. UMLS
7. MESH
8. GARD
9. name
8. HP
9. GARD
10. SNOMEDCT
11. NCIT
12. name

> Pathway ID Resolution is done through biothings.ncats.io/geneset API

- Pathway
1. Reactome
1. REACT
2. KEGG
3. PHARMGKB
3. PHARMGKB.PATHWAYS
4. WIKIPATHWAYS
5. name
5. BIOCARTA
6. GO
7. SMPDB
8. name

> MolecularActivity ID Resolution is done through BioThings Gene Ontology Molecular Activity API

Expand All @@ -170,37 +213,31 @@ let input = {
2. MetaCyc
3. RHEA
4. KEGG.REACTION
5. Reactome
5. REACT
6. name

> CellularComponent ID Resolution is done through BioThings Gene Ontology Cellular Component API

- CellularComponent
1. GO
2. MESH
3. UMLS
4. NCIT
5. SNOMEDCT
6. UBERON
7. CL
8. name
2. name

> BiologicalProcess ID Resolution is done through BioThings Gene Ontology Biological Process API

- BiologicalProcess

1. GO
2. MetaCyc
3. Reactome
3. REACT
4. name

> AnatomicalEntity ID Resolution is done through BioThings UBERON API

- AnatomicalEntity
1. UBERON
2. UMLS
3. NCIT
4. MESH
5. name
3. MESH
4. name

> PhenotypicFeature ID Resolution is done through BioThings HPO API

Expand All @@ -215,16 +252,21 @@ let input = {
8. MP
9. name

> Cell ID Resolution is done through nodenormalization API
> ClinicalFinding ID Resolution is done through MyDisease.info API

- ClinicalFinding
1. LOINC
2. NCIT
3. EFO
4. name

> Cell ID Resolution is done through Biothings Cell Ontology API

- Cell
1. CL
2. UMLS
3. NCIT
4. MESH
5. UBERON
6. SNOMEDCT
7. name
2. NCIT
3. MESH
4. name

## Development

Expand All @@ -234,9 +276,9 @@ let input = {
3. Run `npm ci` to install the dependencies.
4. scripts are stored in `/src` folder
5. Add test to `/__tests__` folder
6. run `npm run release` to bump version and generte change log
6. run `npm run release` to bump version and generate change log
7. run `npx depcheck` to check for unused packages in package.json

## CHANGELOG

See [CHANGELOG.md](https://github.com/kevinxin90/biomedical_id_resolver.js/blob/master/CHANGELOG.md)
See [CHANGELOG.md](https://github.com/biothings/biomedical_id_resolver.js/blob/master/CHANGELOG.md)
22 changes: 11 additions & 11 deletions __tests__/integration/default_resolver.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -232,20 +232,20 @@ describe("Test ID Resolver", () => {
expect(res["NCIT:C116936"][0]).toBeInstanceOf(ResolvableBioEntity);
})

// skip RHEA test below per https://github.com/biothings/biomedical_id_resolver.js/pull/56
test.skip("Test chemical ids can be resolved as RHEA ids", async () => {
// update RHEA test to use MolecularActivity semantic type
test("Test molecular activity ids can be resolved as RHEA ids", async () => {
const resolver = new DefaultIDResolver();
const res = await resolver.resolve({ "ChemicalSubstance": ["PUBCHEM.COMPOUND:5460389"] });
expect(res["PUBCHEM.COMPOUND:5460389"][0]).toBeInstanceOf(ResolvableBioEntity);
expect(res["PUBCHEM.COMPOUND:5460389"][0].dbIDs).toHaveProperty("RHEA");
expect(res["PUBCHEM.COMPOUND:5460389"][0].dbIDs.RHEA).toContain("RHEA:37975")
const res = await resolver.resolve({ "MolecularActivity": ["GO:0010176"] });
expect(res["GO:0010176"][0]).toBeInstanceOf(ResolvableBioEntity);
expect(res["GO:0010176"][0].dbIDs).toHaveProperty("RHEA");
expect(res["GO:0010176"][0].dbIDs.RHEA).toContain("RHEA:37975")
})

// skip RHEA test below per https://github.com/biothings/biomedical_id_resolver.js/pull/56
test.skip("Test RHEA ids can be correctly resolved", async () => {
// update RHEA test to use MolecularActivity semantic type
test("Test RHEA ids can be correctly resolved", async () => {
const resolver = new DefaultIDResolver();
const res = await resolver.resolve({ "ChemicalSubstance": ["RHEA:37975"] });
const res = await resolver.resolve({ "MolecularActivity": ["RHEA:37975"] });
expect(res["RHEA:37975"][0]).toBeInstanceOf(ResolvableBioEntity);
expect(res["RHEA:37975"][0].primaryID).toEqual("CHEBI:16169")
expect(res["RHEA:37975"][0].primaryID).toEqual("GO:0010176")
})
})
})
10 changes: 7 additions & 3 deletions __tests__/unittest/bioentity.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const CDK2_DB_IDs = {
const RILUZOLE_DB_IDS = {
"CHEMBL.COMPOUND": ["CHEMBL744"],
"name": ["Riluzole", "RILUZOLE"],
"PUBCHEM": ["5070"],
"PUBCHEM.COMPOUND": ["5070"],
}

const DB_ID_WITH_NO_PRIMARY = {
Expand All @@ -22,7 +22,11 @@ const DISEASE_DB_IDS = {
"MONDO": ["MONDO:12345"]
}

const CHEMBL7512_DB_IDS = { "CHEMBL.COMPOUND": ["CHEMBL7512"], "PUBCHEM": ["53428"] }
const CHEMBL7512_DB_IDS = {
"CHEMBL.COMPOUND": ["CHEMBL7512"],
"PUBCHEM.COMPOUND": ["53428"]
}

describe("Test ResolvableBioEntity Class", () => {
test("return semanticType when called semanticType property", () => {
const entity = new ResolvableBioEntity("Gene", CDK2_DB_IDs, {});
Expand Down Expand Up @@ -147,4 +151,4 @@ describe("Test IrresolvableBioEntity Class", () => {

})

})
})
8 changes: 8 additions & 0 deletions src/common/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,15 @@ export interface BioThingsAPIFailedQueryResponse extends BioThingsAPIQueryRespon

export type ResolvableSemanticTypes =
| 'Gene'
| 'Transcript'
| 'Protein'
| 'SequenceVariant'
| 'ChemicalSubstance'
| 'Drug'
| 'Disease'
| 'DiseaseOrPhenotypicFeature'
| 'PhenotypicFeature'
| 'ClinicalFinding'
| 'MolecularActivity'
| 'BiologicalProcess'
| 'CellularComponent'
Expand All @@ -27,11 +31,15 @@ export type ResolvableSemanticTypes =

export enum ResolvableTypes {
Gene = 'Gene',
Transcript = 'Transcript',
Protein = 'Protein',
SequenceVariant = 'SequenceVariant',
ChemicalSubstance = 'ChemicalSubstance',
Drug = 'Drug',
Disease = 'Disease',
DiseaseOrPhenotypicFeature = 'DiseaseOrPhenotypicFeature',
PhenotypicFeature = 'PhenotypicFeature',
ClinicalFinding = 'ClinicalFinding',
MolecularActivity = 'MolecularActivity',
BiologicalProcess = 'BiologicalProcess',
CellularComponent = 'CellularComponent',
Expand Down
Loading