Skip to main content

omicsync

License: MIT Python 3.9+ PyPI version

A Python library for multi-omics data harmonisation.

omicsync handles the tedious work of aligning sample IDs, normalising each modality consistently, and exporting to downstream tools so you can focus on biology, not data wrangling.


Installation

pip install omicsync

With optional extras:

pip install "omicsync[mofa]"       # MOFA2 factor analysis
pip install "omicsync[geo]"        # GEO data loading
pip install "omicsync[anndata]"    # AnnData export
pip install "omicsync[torch]"      # PyTorch tensor export
pip install "omicsync[all]"        # Everything

Quick Start

import omicsync as oms
from omicsync.loaders.csv import load_multimodal_csv

# Load multiple modalities from CSV files
dataset = load_multimodal_csv({
    "rna":     "brca_rna.tsv",
    "protein": "brca_rppa.tsv",
    "cnv":     "brca_cnv.tsv",
}, study_id="TCGA-BRCA")

# Align, normalise, filter — all chainable
dataset.align_samples().normalize().filter_features(min_variance=0.01)

# Export to DataFrame or MOFA2
df = dataset.to_dataframe()          # samples × features, prefixed columns
mofa_input = dataset.to_mofa2()      # dict ready for mofapy2 entry_point

Features

  • Sample harmonisation — TCGA barcode parsing, fuzzy ID matching, coverage reporting
  • Per-modality normalisation — auto-detection of count/TPM/M-value formats
  • Chainable API — dataset.align().normalize().filter_features()
  • sklearn compatibility — use OmicsSyncTransformer in a Pipeline
  • Multiple export formats — DataFrame, dict, MOFA2, PyTorch tensor, AnnData
  • Open Targets integration — query target-disease associations via GraphQL
  • Type hints throughout — fully typed public API

Supported Data Sources

Source Loader Notes
TCGA load_tcga_files() Local files; barcode auto-harmonisation
GEO load_geo() Via GEOparse; requires omicsync[geo]
CSV/TSV load_csv() Any tabular file
Open Targets load_open_targets_targets() GraphQL API v4

Supported Modalities

Modality Class Default Normalisation
RNA expression RNAModality detect_and_normalise() (log1p)
DNA methylation MethylationModality M→beta conversion + clip
Copy number CNVModality log2 ratio, clipped [-2, 2]
Somatic mutations MutationModality Binarise at threshold
Protein abundance ProteinModality Z-score per protein

Documentation


Citation

If you use omicsync in your research, please cite:

Paterson V. (2026). omicsync: A Python library for multi-omics data harmonisation. GitHub: github.com/vi-c-ky/omicsync


Contributing

Contributions are welcome. Please open an issue or pull request on GitHub.

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/my-feature)
  3. Write tests for new functionality
  4. Run the test suite (pytest tests/)
  5. Open a pull request

License

MIT — see LICENSE for details.

Metadata

Release files for omicsync 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for omicsync 0.1.0
File Size Uploaded
omicsync-0.1.0.tar.gz 39.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for omicsync 0.1.0
File Interpreter ABI Platform
omicsync-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 81.3 kB

Release files / omicsync-0.1.0.tar.gz

Download URL omicsync-0.1.0.tar.gz
Size 39.0 kB
Tags Source
SHA-256 checksum
How to use checksums
9c825429e55b65d54ca7597ef89629fb129604820ef1c34ef9e3ebb02f661ab5
BLAKE2b-256 checksum
How to use checksums
3ded7d291fde77e67bc5a501d6e6ef333ff2970e975fcb020b9679e0aedbd812
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.0

Release files / omicsync-0.1.0-py3-none-any.whl

Download URL omicsync-0.1.0-py3-none-any.whl
Size 42.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2a7dc912fd7609891bdea793b0f098338498fcca755983f35252d2ed8732a665
BLAKE2b-256 checksum
How to use checksums
4bc25810f0876b3cc9e85c9e3b6041efd196d8c07dbab07ad56520e5b8509743
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.0

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page