Skip to main content

Automated harmonization of public omics metadata

Project description

omicsmeta

omicsmeta is an early-stage Python package for harmonizing public omics metadata from GEO, SRA, BioSample, and tabular exports.

The central design choice is to make ontology mapping pluggable. Generic mapping tools such as text2term are useful, but public omics metadata also needs domain-specific preprocessing, field-type detection, confidence-aware routing, and cross-field validation. omicsmeta is intended to provide that pipeline.

Current implementation status:

  • string normalization and biomedical abbreviation expansion
  • heuristic metadata field detection
  • lightweight built-in ontology mapper for common terms
  • optional text2term mapper adapter
  • simple OBO loader and SQLite ontology cache
  • tabular, minimal GEO SOFT, BioSample XML, and SRA XML readers
  • harmonization orchestrator and CLI
  • real GEO SOFT snippet test coverage
  • conservative field routing for ambiguous metadata columns
  • transparent cell-line inference for missing species/tissue/disease fields
  • deduplicated unmapped-term summaries for manual curation
  • sample-wide output tables
  • batch harmonization
  • known-answer benchmark helper and CLI script

Example:

omicsmeta harmonize metadata.tsv \
  --output harmonized.tsv \
  --unmapped unmapped.tsv \
  --unmapped-summary-output unmapped_summary.tsv \
  --sample-output samples.tsv \
  --report qc_report.html

Direct GEO fetching is also available:

omicsmeta harmonize \
  --geo-accession GSE123456 \
  --output harmonized.tsv \
  --unmapped unmapped.tsv \
  --unmapped-summary-output unmapped_summary.tsv \
  --sample-output samples.tsv \
  --report qc_report.html

Custom local OBO files can be added to the built-in mapper:

omicsmeta harmonize metadata.tsv \
  --ontology-obo disease_slim.obo \
  --output harmonized.tsv \
  --unmapped unmapped.tsv \
  --unmapped-summary-output unmapped_summary.tsv \
  --sample-output samples.tsv \
  --report qc_report.html

Managed ontology resources can be cached locally:

omicsmeta ontologies list
omicsmeta ontologies download doid uberon cl
omicsmeta ontologies index --resource doid --resource uberon
omicsmeta harmonize metadata.tsv \
  --ontology-resource doid \
  --ontology-resource uberon \
  --output harmonized.tsv \
  --unmapped unmapped.tsv \
  --unmapped-summary-output unmapped_summary.tsv \
  --sample-output samples.tsv \
  --report qc_report.html

Multiple files can be harmonized in one run:

omicsmeta batch \
  --input metadata_a.tsv \
  --input metadata_b.tsv \
  --output harmonized.tsv \
  --unmapped unmapped.tsv \
  --unmapped-summary-output unmapped_summary.tsv \
  --sample-output samples.tsv \
  --report qc_report.html

Known-answer fixtures can be benchmarked:

python scripts/benchmark_mapping.py \
  --input examples/basic/metadata.tsv \
  --truth examples/basic/expected_harmonized.tsv

Run the bundled multi-fixture benchmark suite:

python scripts/benchmark_mapping.py \
  --manifest benchmarks/known_answer_suite.tsv \
  --output-json benchmark_suite.json

Documentation

Maturity

This repository is pre-alpha and not yet JOSS-ready. The implemented code is tested, but the project still needs publication-scale curated benchmarks, release packaging, external user feedback, and Galaxy Tool Shed validation before submission.

Run tests locally with:

python -m pip install -e ".[dev]"
python -m pytest

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

omicsmeta-0.1.0.tar.gz (48.8 kB view details)

Uploaded Source

Built Distribution

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

omicsmeta-0.1.0-py3-none-any.whl (31.6 kB view details)

Uploaded Python 3

File details

Details for the file omicsmeta-0.1.0.tar.gz.

File metadata

  • Download URL: omicsmeta-0.1.0.tar.gz
  • Upload date:
  • Size: 48.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for omicsmeta-0.1.0.tar.gz
Algorithm Hash digest
SHA256 3a5618866ad28113b45204f9060cb54d6aa825c2f33dd62280d4dcc48664bb7b
MD5 37e2e73a231ee447763f3df3e1c54eb3
BLAKE2b-256 f422b2323fb90fc7a47976c0425f700a3e9a182875f089484d1c2ddcbbf525b6

See more details on using hashes here.

Provenance

The following attestation bundles were made for omicsmeta-0.1.0.tar.gz:

Publisher: publish.yml on qchiujunhao/omicsmeta

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file omicsmeta-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: omicsmeta-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 31.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for omicsmeta-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4c72d823f958d8aaa3a1182b403f825b9a50a7b0ff2a552c388793330b14bfa4
MD5 60777f89b7e578c71af926034c6eef29
BLAKE2b-256 8a5319877defa53a5b38925fac156a62211cb8d95e2205db174bd523b403c49e

See more details on using hashes here.

Provenance

The following attestation bundles were made for omicsmeta-0.1.0-py3-none-any.whl:

Publisher: publish.yml on qchiujunhao/omicsmeta

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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