{"id":18591899,"url":"https://github.com/sdsc-ordes/modos-api","last_synced_at":"2026-02-08T02:02:41.333Z","repository":{"id":221170367,"uuid":"731058860","full_name":"sdsc-ordes/modos-api","owner":"sdsc-ordes","description":"Python API to manage multi-omics digital objects","archived":false,"fork":false,"pushed_at":"2026-01-19T19:16:29.000Z","size":5518,"stargazers_count":2,"open_issues_count":8,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2026-01-20T01:06:43.307Z","etag":null,"topics":["cli","fair","metadata","multi-omics","omics","rest-api"],"latest_commit_sha":null,"homepage":"https://sdsc-ordes.github.io/modos-api","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sdsc-ordes.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":"NOTICE","maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-12-13T09:14:23.000Z","updated_at":"2026-01-19T19:16:03.000Z","dependencies_parsed_at":"2025-04-22T15:35:37.760Z","dependency_job_id":"ca01efe1-efab-4b00-abc8-6e2337c9698e","html_url":"https://github.com/sdsc-ordes/modos-api","commit_stats":null,"previous_names":["sdsc-ordes/smoc-api","sdsc-ordes/modo-api","sdsc-ordes/modos-api"],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/sdsc-ordes/modos-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sdsc-ordes%2Fmodos-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sdsc-ordes%2Fmodos-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sdsc-ordes%2Fmodos-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sdsc-ordes%2Fmodos-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sdsc-ordes","download_url":"https://codeload.github.com/sdsc-ordes/modos-api/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sdsc-ordes%2Fmodos-api/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29217757,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-08T00:10:47.190Z","status":"online","status_checked_at":"2026-02-08T02:00:07.642Z","response_time":57,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","fair","metadata","multi-omics","omics","rest-api"],"created_at":"2024-11-07T01:05:33.629Z","updated_at":"2026-02-08T02:02:41.318Z","avatar_url":"https://github.com/sdsc-ordes.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"./docs/img/modos.svg\" alt=\"modos logo\" width=\"250\"\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/sdsc-ordes/modos-api/releases/latest\"\u003e\n    \u003cimg src=\"https://img.shields.io/github/release/sdsc-ordes/modos-api.svg?style=for-the-badge\" alt=\"Current Release label\" /\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/sdsc-ordes/modos-api/actions/workflows/poetry-pytest.yml\"\u003e\n    \u003cimg src=\"https://img.shields.io/github/actions/workflow/status/sdsc-ordes/modos-api/uv-pytest.yml?label=tests\u0026style=for-the-badge\" alt=\"Test Status label\" /\u003e\u003c/a\u003e\n  \u003ca href=\"https://sdsc-ordes.github.io/modos-api\"\u003e\n    \u003cimg src=\"https://img.shields.io/website?url=https%3A%2F%2Fsdsc-ordes.github.io%2Fmodos-api\u0026up_message=online\u0026up_color=blue\u0026down_message=offline\u0026style=for-the-badge\u0026label=docs\" alt=\"Documentation website\" /\u003e\u003c/a\u003e\n  \u003ca href=\"http://www.apache.org/licenses/LICENSE-2.0.html\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/LICENSE-Apache2.0-ff69b4.svg?style=for-the-badge\" alt=\"License label\" /\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n# modos-api\n\nAccess and manage Multi-Omics Digital Objects (MODOs).\n\n## Context\n\n### Goals\n\nProvide a digital object and system to process, store and serve multi-omics data with their metadata such that:\n\n- Traceability and reproducibility is ensured by rich metadata\n- The different omics layers are processed and distributed together\n- Common operations such as liftover can be automated easily and ensure that omics layers are kept in sync\n- Data can be accessed, sliced and streamed over the network without downloading the dataset.\n\n### Architecture\n\nThe client library by itself can be used to work with local MODOs, or connect to a server to access objects over s3.\n\nThe server configuration and setup insructions can be found in [deploy](tools/deploy/README.md). It consists of a REST API, an s3 server and an htsget server to stream CRAM/BCF over the network. The aim is to provide transparent remote access to MODOs without storing the data locally.\n\n### Format\n\nThe digital object is composed of a folder with:\n\n- Genomic data files (CRAM, BCF, ...)\n- A zarr archive for metadata and array-based data\n\nThe metadata links to the different files and provides context using the [modos-schema](https://sdsc-ordes.github.io/modos-schema).\n\n## Installation\n\nThe library can be installed with pip:\n```sh\npip install modos\n```\n\nThe development version can be installed directly from github:\n\n```sh\npip install git+https://github.com/sdsc-ordes/modos-api.git@main\n```\n\n## Usage\n\nThe CLI is convenient for quickly managing modos (creation, edition, deletion) and quick inspections:\n\n```sh\n$ # remote example\n$ modos --endpoint http://localhost show --zarr s3://ex-bucket/ex-modo\n/\n ├── assay\n │   └── assay1\n ├── data\n │   ├── calls1\n │   └── demo1\n ├── reference\n │   └── reference1\n └── sample\n     └── sample1\n\n$ # local example\n$ modos show --files data/ex\ndata/ex/reference1.fa.fai\ndata/ex/demo1.cram\ndata/ex/reference1.fa\ndata/ex/calls1.bcf\ndata/ex/demo1.cram.crai\ndata/ex/calls1.bcf.csi\n```\n\nThe user facing API is in `modos.api`. It provides full programmatic access to the object's [meta]data:\n\n```python\n\u003e\u003e\u003e from modos.api import MODO\n\n\u003e\u003e\u003e ex = MODO('./example-digital-object')\n\u003e\u003e\u003e ex.list_samples()\n['sample/sample1']\n\u003e\u003e\u003e ex.metadata[\"data/calls1\"]\n{'@type': 'DataEntity',\n 'data_format': 'BCF',\n 'data_path': 'calls1.bcf',\n 'description': 'variant calls for tests',\n 'has_reference': ['reference/reference1'],\n 'has_sample': ['sample/sample1'],\n 'name': 'Calls 1'}\n\u003e\u003e\u003e rec = next(ex.stream_genomics(\"calls1.bcf\", \"chr1:103-1321\"))\n\u003e\u003e\u003e rec.alleles\n('A', 'C')\n```\n\nFor advanced use cases, the object's metadata can be queried with SPARQL!\n```python\n\u003e\u003e\u003e # Build a table with all files from male samples\n\u003e\u003e\u003e query = \"\"\"\n...   SELECT ?assay ?sample ?file\n...   WHERE {\n...     [] schema:name ?assay ;\n...       modos:has_data [\n...         modos:data_path ?file ;\n...         modos:has_sample [\n...           schema:name ?sample ;\n...           modos:sex ?sex\n...         ]\n...       ] .\n...     FILTER(?sex = \"Male\")\n...   }\n... \"\"\"\n\u003e\u003e\u003e ex.query(query).serialize(format=\"csv\").decode())\nassay,sample,file\nAssay 1,Sample 1,file://ex/calls1.bcf\nAssay 1,Sample 1,file://ex/demo1.cram\n```\n\n## Contributing\n\nFirst, read the [Contribution Guidelines](./CONTRIBUTING.md).\n\nFor technical documentation on setup and development, see the [Development Guide](docs/development_guide.md)\n\n\n## Acknowledgements and Funding\n\nThe development of the Multi-Omics Digital Object System (MODOS) is being funded by the Personalized Health Data Analysis Hub, a joint initiative of the Personalized Health and Related Technologies ([PHRT](https://www.sfa-phrt.ch)) and the Swiss Data Science Center ([SDSC](https://datascience.ch)), for a period of three years from 2023 to 2025. The SDSC leads the development of MODOS, bringing expertise in complex data structures associated with multi-omics and imaging data to advance privacy-centric clinical-grade integration. The PHRT contributes its domain expertise of the Swiss Multi-Omics Center ([SMOC](http://smoc.ethz.ch)) in the generation, analysis, and interpretation of multi-omics data for personalized health and precision medicine applications.\nWe gratefully acknowledge the [Health 2030 Genome Center](https://www.health2030genome.ch/) for their substantial contributions to the development of MODOS by providing test data sets, deployment infrastructure, and expertise.\n\n## Copyright\n\nCopyright © 2023-2024 Swiss Data Science Center (SDSC), [www.datascience.ch](http://www.datascience.ch/). All rights reserved. The SDSC is jointly established and legally represented by the École Polytechnique Fédérale de Lausanne (EPFL) and the Eidgenössische Technische Hochschule Zürich (ETH Zürich). This copyright encompasses all materials, software, documentation, and other content created and developed by the SDSC in the context of the Personalized Health Data Analysis Hub.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsdsc-ordes%2Fmodos-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsdsc-ordes%2Fmodos-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsdsc-ordes%2Fmodos-api/lists"}