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

simple: fast fixes #64

Merged
merged 3 commits into from
Aug 3, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
102 changes: 62 additions & 40 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=main)](https://coveralls.io/github/biothings/biomedical_id_resolver.js?branch=main)
![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 @@ -104,7 +104,7 @@ let input = {

## Available Semantic Types & prefixes

> Gene ID resolution is done through MyGene.info API
> Gene, Transcript, Protein ID resolution is done through MyGene.info API

- Gene
1. NCBIGene
Expand All @@ -114,7 +114,20 @@ let input = {
5. OMIM
6. UniProtKB
7. UMLS
8. name
8. MGI
9. name

- Transcript
1. ENSEMBL
2. SYMBOL
3. name

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

> Variant ID resolution is done through MyVariant.info API

Expand All @@ -124,21 +137,35 @@ let input = {
3. MYVARIANT_HG19
4. ClinVar

> ChemicalSubstance ID resolution is done through MyChem.info API
> ChemicalSubstance, Drug ID resolution is done through MyChem.info API

- ChemicalSubstance
1. CHEBI
2. CHEMBL.COMPOUND
3. DRUGBANK
4. PUBCHEM
4. PUBCHEM.COMPOUND
5. MESH
6. INCHI
7. INCHIKEY
8. UNII
9. KEGG
9. KEGG.COMPOUND
10. UMLS
11. name
12. id
11. LINCS
12. name

- Drug
1. CHEBI
2. CHEMBL.COMPOUND
3. DRUGBANK
4. PUBCHEM.COMPOUND
5. MESH
6. INCHI
7. INCHIKEY
8. UNII
9. KEGG.COMPOUND
10. UMLS
11. LINCS
12. name

> Disease ID Resolution is done through MyDisease.info API

Expand All @@ -148,20 +175,24 @@ let input = {
2. DOID
3. OMIM
4. ORPHANET
5. EFO
6. UMLS
7. MESH
8. GARD
9. name
5. SNOMEDCT
6. NCIT
7. EFO
8. UMLS
9. MESH
10. HP
11. GARD
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. name

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

Expand All @@ -170,37 +201,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 +240,13 @@ let input = {
8. MP
9. name

> Cell ID Resolution is done through nodenormalization API
> 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 +256,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/main/CHANGELOG.md)
8 changes: 6 additions & 2 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
6 changes: 6 additions & 0 deletions src/common/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,11 @@ export interface BioThingsAPIFailedQueryResponse extends BioThingsAPIQueryRespon

export type ResolvableSemanticTypes =
| 'Gene'
| 'Transcript'
| 'Protein'
| 'SequenceVariant'
| 'ChemicalSubstance'
| 'Drug'
| 'Disease'
| 'DiseaseOrPhenotypicFeature'
| 'PhenotypicFeature'
Expand All @@ -27,8 +30,11 @@ export type ResolvableSemanticTypes =

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