Skip to content

Commit

Permalink
Merge pull request #5 from biothings/bte_804_update_data
Browse files Browse the repository at this point in the history
update ontology files and dependencies in README
  • Loading branch information
tokebe authored Jul 19, 2024
2 parents e4bb786 + b5b9849 commit aaae863
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 11 deletions.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ Module for expanding terms to children.
pnpm i @biothings-explorer/node-expansion
```

### Dependencies
1. Java 11+ (to run `robot.jar`)
2. Download the script and JAR from [ROBOT](http://robot.obolibrary.org/). The script for Mac & Linux is already downloaded.

## Usage

- by default, the module will expand terms to all descendants
Expand Down Expand Up @@ -62,3 +66,6 @@ console.log(getDescendants(['GO:0022010', 'DOID:0060524', 'DOID:4'], recursive=f
node download.js
```
- downloads, converts, and parses all the owl files listed in the config file

## References
R.C. Jackson, J.P. Balhoff, E. Douglass, N.L. Harris, C.J. Mungall, and J.A. Overton. ROBOT: A tool for automating ontology workflows. BMC Bioinformatics, vol. 20, July 2019.
10 changes: 4 additions & 6 deletions __test__/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,12 @@ test('go', () => {
expect(descendants['GO:0032553']).toContain('GO:0032559');
});

//HP:0003812 -> HP:0003829 -> HP:0003831
//Phenotypic variability -> Incomplete penetrance -> Age-dependent penetrance
//HP:0003812 -> HP:0003828
//Phenotypic variability -> Variable expressivity
test('hp', () => {
let curies = ['HP:0003812'];
let descendants = getDescendants(curies);
expect(descendants['HP:0003812']).toContain('HP:0003829');
expect(descendants['HP:0003812']).toContain('HP:0003831');
expect(descendants['HP:0003812']).toContain('HP:0003828');
});

//MONDO:0001517 -> MONDO:0001955 -> MONDO:0024275
Expand All @@ -57,8 +56,7 @@ test('umls', () => {
test('multiple', () => {
let curies = ['HP:0003812', 'MONDO:0001517'];
let descendants = getDescendants(curies);
expect(descendants['HP:0003812']).toContain('HP:0003829');
expect(descendants['HP:0003812']).toContain('HP:0003831');
expect(descendants['HP:0003812']).toContain('HP:0003828');
expect(descendants['MONDO:0001517']).toContain('MONDO:0001955');
expect(descendants['MONDO:0001517']).toContain('MONDO:0024275');
});
Expand Down
2 changes: 1 addition & 1 deletion data/chebi-parsed.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion data/doid-parsed.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion data/go-parsed.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion data/hp-parsed.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion data/mondo-parsed.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions src/download.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ for (let ontology of Object.values(ONTOLOGIES)) {
console.log(`Done downloading ${url} with code ${code}`);

// use robot to convert owl to json
// http://robot.obolibrary.org/
child_process.execSync(
`../robot convert -i ../data/${ontology.name}.owl --format json -o ../data/${ontology.name}.json`,
);
Expand Down

0 comments on commit aaae863

Please sign in to comment.