Skip to main content

Metabolomics Workbench - Metabolomics Hub Integration

Project description

Metabolomics Workbench - MHD Model Integration Framework

Development Environment

Development environment for linux or mac

# install python package manager uv
curl -LsSf https://astral.sh/uv/install.sh | sh

# add $HOME/.local/bin to your PATH, either restart your shell or run
export PATH=$HOME/.local/bin:$PATH

# install git from https://git-scm.com/downloads
# Linux command
apt update; apt install git -y

# Mac command
# brew install git

# clone project from github
git clone https://github.com/MetabolomicsHub/mw-mhd-integration.git

cd mw-mhd-integration

# install python if it is not installed
uv python install 3.12

# install python dependencies
uv sync

# install pre-commit to check repository integrity and format checking
uv run pre-commit

# open your IDE (vscode, pycharm, etc.) and set python interpreter as .venv/bin/python

Commandline Usage

# you can use any python version >= 3.12
pip install mw-mhd-integration

mw-mhd-cli
####################################################################
# Usage: mw-mhd-cli [OPTIONS] COMMAND [ARGS]...

#   Metabomics Workbench - MHD Integration CLI with subcommands.

# Options:
#   --version   Show the version and exit.
#   -h, --help  Show this message and exit.

# Commands:
#   announcement  Create announcement file from MHD data model file.
#   fetch         Fetch a Metabolomics Workbench study as json file.
#   mhd           Convert a Metabolomics Workbench study to MHD file format.
#   validate      Validate MHD model and annoucenment file.
####################################################################

mw-mhd-cli fetch 

####################################################################
# Usage: mw-mhd-cli fetch [OPTIONS] STUDY_ID

#   Fetch a Metabolomics Workbench study as json file.

# Options:
#   --output-dir TEXT       Output directory for MHD file  [default: outputs]
#   --output-filename TEXT  MHD filename (e.g., MHD000001_mhd.json,
#                           ST000001_mhd.json)
#   -h, --help              Show this message and exit.
####################################################################

mw-mhd-cli fetch ST004083
# ST004083 is fetched

ls outputs
# ST004083.json

mw-mhd-cli mhd
####################################################################
# Usage: mw-mhd-cli mhd [OPTIONS] STUDY_ID

#   Convert a Metabolomics Workbench study to MHD file format.

# Options:
#   --output-dir TEXT       Output directory for MHD file  [default: outputs]
#   --output-filename TEXT  MHD filename (e.g., MHD000001_mhd.json,
#                           ST000001_mhd.json)
#   --schema_uri TEXT       Target MHD model schema. It defines format of MHD
#                           model structure.  [default:
#                           https://metabolomicshub.github.io/mhd-
#                           model/schemas/v0_1/common-data-
#                           model-v0.1.schema.json]
#   --profile_uri TEXT      Target MHD model profile. It is used to validate MHD
#                           model  [default:
#                           https://metabolomicshub.github.io/mhd-
#                           model/schemas/v0_1/common-data-model-v0.1.legacy-
#                           profile.json]
#   -h, --help              Show this message and exit.
####################################################################

mw-mhd-cli mhd ST004083
ls outputs
# ST004083.json  ST004083.mhd.json

mw-mhd-cli validate
####################################################################
# Usage: mw-mhd-cli validate [OPTIONS] COMMAND [ARGS]...

#   Validate MHD model and annoucenment file.

# Options:
#   -h, --help  Show this message and exit.

# Commands:
#   announcement  Validate MHD announcement file.
#   mhd           Validate MHD model file.
####################################################################

mw-mhd-cli validate mhd ST004083 outputs/ST004083.mhd.json

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mw_mhd_integration-0.0.8.tar.gz (7.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mw_mhd_integration-0.0.8-py3-none-any.whl (8.1 kB view details)

Uploaded Python 3

File details

Details for the file mw_mhd_integration-0.0.8.tar.gz.

File metadata

  • Download URL: mw_mhd_integration-0.0.8.tar.gz
  • Upload date:
  • Size: 7.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.22

File hashes

Hashes for mw_mhd_integration-0.0.8.tar.gz
Algorithm Hash digest
SHA256 a73fa403b6afbc3b847b184631a5203e53be83c00363a0530fe176ab12f947ed
MD5 130560c9bc152ad89d6d529f52b2de13
BLAKE2b-256 a450caf75c43acd40b4e60ee0b5584f0eec55d78f4c9861b0aa8f4b769d9abe5

See more details on using hashes here.

File details

Details for the file mw_mhd_integration-0.0.8-py3-none-any.whl.

File metadata

File hashes

Hashes for mw_mhd_integration-0.0.8-py3-none-any.whl
Algorithm Hash digest
SHA256 e767682aa6c31bcb9a252687b891b4c1dfc6b5602e9f2b5e0517916e353f3661
MD5 b8312bb51b8a93c973e615949b821f21
BLAKE2b-256 050931adf01dcdac3d2d2c371e4767914fef4a1787722cf75acbf721d660e5f1

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page