Skip to content

c2fc2f/Extend-PubMed-MeSH-KG

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

xpmkg — Extend PubMed-MeSH Knowledge Graph

A command-line multitool written in Rust for enriching PubMed-MeSH knowledge graphs (CSV-based, targeting Neo4j) with additional nodes, relationships, and external metadata.

It is designed to extend the output produced by pm2kg, adding nodes, relationships, or properties sourced from external biomedical databases such as UMLS.

Overview

The project is organized as a Cargo workspace with one internal library crate:

  • crates/dispatch_derive — procedural macro that derives an async dispatch method on clap subcommand enums

The xpmkg binary ties the subcommands together.

Requirements

  • Rust toolchain (edition 2024, stable)
  • Output CSVs produced by pm2kg
  • A locally extracted UMLS release (for subcommands that consume UMLS data)

Installation

From source

git clone https://github.com/c2fc2f/Extend-PubMed-MeSH-KG
cd Extend-PubMed-MeSH-KG
cargo build --release
# or
cargo install --git https://github.com/c2fc2f/Extend-PubMed-MeSH-KG

The compiled binary will be at target/release/xpmkg.

With Nix

A Nix flake is provided:

nix run github:c2fc2f/Extend-PubMed-MeSH-KG -- --help
# or
nix build
# or, to enter a development shell:
nix develop

Usage

xpmkg <COMMAND>

Run xpmkg --help for the full list of available subcommands, or xpmkg <COMMAND> --help for subcommand-specific options.

Subcommands

Subcommand Description Documentation
cui-umls Annotates MeSH nodes with their corresponding UMLS CUIs README
kg-umls Creates cross-graph relationships between MeSH elements and UMLS atoms and concepts README

Library Crate

The dispatch_derive library crate can be used independently in other projects.

dispatch_derive

An internal procedural macro crate that derives an async dispatch method on clap subcommand enums. It eliminates the boilerplate of hand-written match arms by generating dispatch from the enum variant's type path to the corresponding run function.

See crates/dispatch_derive/README.md for full documentation.

License

This project is licensed under the MIT License.

About

A multitool for extending PubMed-MeSH knowledge graphs (CSV-based for Neo4J) with additional nodes, relationships, and external metadata

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors