Module for expanding terms to children.
pnpm i @biothings-explorer/node-expansion
- Java 11+ (to run
robot.jar
) - Download the script and JAR from ROBOT. The script for Mac & Linux is already downloaded.
- by default, the module will expand terms to all descendants
const { getDescendants } = require('@biothings-explorer/node-expansion');
console.log(getDescendants(['GO:0022010', 'DOID:0060524']));
// {
// 'DOID:0060524': [
// 'DOID:0040001',
// 'DOID:0060526',
// 'DOID:0060525',
// 'DOID:0060527',
// 'DOID:0060528',
// 'DOID:0060529'
// ]
// }
- use
recursive=false
to get direct children only
const { getDescendants } = require('@biothings-explorer/node-expansion');
console.log(getDescendants(['GO:0022010', 'DOID:0060524', 'DOID:4'], recursive=false));
// {
// 'DOID:0060524': [ 'DOID:0040001', 'DOID:0060526' ],
// 'DOID:4': [
// 'DOID:0014667',
// 'DOID:0050117',
// 'DOID:0080015',
// 'DOID:14566',
// 'DOID:150',
// 'DOID:225',
// 'DOID:630',
// 'DOID:7'
// ]
// }
- GO
- DOID
- HP
- MONDO
- CHEBI
node download.js
- downloads, converts, and parses all the owl files listed in the config file
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.