Metadata-Version: 2.3
Name: momics
Version: 0.4.0
Summary: A package to create and manage genome-related TileDB arrays
Project-URL: homepage, https://js2264.github.io/momics
Project-URL: documentation, https://js2264.github.io/momics
Project-URL: repository, https://github.com/js2264/momics
Project-URL: changelog, https://github.com/js2264/momics/blob/devel/CHANGES.md
Author-email: Jacques Serizay <jacques.serizay@pasteur.fr>
License: CC BY-NC 4.0
License-File: LICENSE
Keywords: Tile-DB,bioinformatics,epigenomics,format,genomics,matrix,multi-omics,sparse
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Requires-Python: >=3.8
Requires-Dist: biopython
Requires-Dist: click>=7
Requires-Dist: cloup
Requires-Dist: numpy
Requires-Dist: packaging
Requires-Dist: pandas
Requires-Dist: psutil
Requires-Dist: pyarrow>=1.0
Requires-Dist: pybigwig
Requires-Dist: pyfaidx
Requires-Dist: pyranges
Requires-Dist: setuptools
Requires-Dist: tensorflow[and-cuda]
Requires-Dist: tiledb
Requires-Dist: typing-extensions
Provides-Extra: all
Requires-Dist: biopython; extra == 'all'
Requires-Dist: dask[array,dataframe]; extra == 'all'
Requires-Dist: matplotlib; extra == 'all'
Requires-Dist: psutil; extra == 'all'
Provides-Extra: dev
Requires-Dist: biopython; extra == 'dev'
Requires-Dist: coverage[toml]; extra == 'dev'
Requires-Dist: dask[array,dataframe]; extra == 'dev'
Requires-Dist: isort; extra == 'dev'
Requires-Dist: matplotlib; extra == 'dev'
Requires-Dist: pre-commit; extra == 'dev'
Requires-Dist: psutil; extra == 'dev'
Requires-Dist: pytest; extra == 'dev'
Requires-Dist: pytest-cov; extra == 'dev'
Requires-Dist: pytest-order; extra == 'dev'
Requires-Dist: python-dotenv; extra == 'dev'
Requires-Dist: ruff; extra == 'dev'
Requires-Dist: twine; extra == 'dev'
Provides-Extra: docs
Requires-Dist: autodoc; extra == 'docs'
Requires-Dist: autodocsumm; extra == 'docs'
Requires-Dist: furo; extra == 'docs'
Requires-Dist: lxml[html-clean]; extra == 'docs'
Requires-Dist: m2r; extra == 'docs'
Requires-Dist: myst-parser; extra == 'docs'
Requires-Dist: nbsphinx; extra == 'docs'
Requires-Dist: pydata-sphinx-theme; extra == 'docs'
Requires-Dist: recommonmark; extra == 'docs'
Requires-Dist: sphinx-autoapi; extra == 'docs'
Requires-Dist: sphinx-autobuild; extra == 'docs'
Requires-Dist: sphinx-click; extra == 'docs'
Requires-Dist: sphinx-rtd-theme; extra == 'docs'
Requires-Dist: sphinx>=1.6; extra == 'docs'
Requires-Dist: sphinxcontrib-napoleon; extra == 'docs'
Provides-Extra: test
Requires-Dist: coverage[toml]; extra == 'test'
Requires-Dist: isort; extra == 'test'
Requires-Dist: pytest; extra == 'test'
Requires-Dist: pytest-cov; extra == 'test'
Requires-Dist: pytest-order; extra == 'test'
Requires-Dist: python-dotenv; extra == 'test'
Requires-Dist: ruff; extra == 'test'
Description-Content-Type: text/markdown

![Python Version from PEP 621 TOML](https://img.shields.io/python/required-version-toml?tomlFilePath=https%3A%2F%2Fraw.githubusercontent.com%2Fjs2264%2Fmomics%2Frefs%2Fheads%2Fdevel%2Fpyproject.toml)
[![PyPI - Version](https://img.shields.io/pypi/v/momics)](https://pypi.org/project/momics/)
[![Test & Doc](https://github.com/js2264/momics/actions/workflows/ci.yml/badge.svg)](https://github.com/js2264/momics/actions/workflows/ci.yml)
[![Codecov](https://img.shields.io/codecov/c/gh/js2264/momics)](https://app.codecov.io/gh/js2264/momics)
[![Black](https://img.shields.io/badge/style-black-black)](https://github.com/psf/black)

# momics

`momics` is both a revolutionary file format for efficient storage of ***multi-omics*** data, and a Python package designed to query and manipulate these files. The file format is specifically designed to handle genomic coverage tracks and sequences. The package provides an intuitive command-line interface (CLI) and a Python library for bioinformatics workflows involving genomic data.

## Install

You can install `momics` using `pip`:

```sh
pip install momics
```

Alternatively, clone this repository and install the package locally:

```sh
git clone https://github.com/js2264/momics.git
cd momics
pip install .
```

## Features

- Efficient genomic data storage: Store large genomic coverage tracks and genome reference sequences compactly.
- Multi-Range querying: Query multiple genomic regions simultaneously with high performance.
- Rich Python library: Directly access and manipulate genomic data using Python objects and methods.
- Full-fledged command-line interface (CLI): Perform common tasks such as adding new tracks, querying data, and extracting information directly from the shell.

## Usage

### CLI Commands

- Add a track:

To ingest a `.bw` genomic coverage data into a momics repository, you can use the `ingest` command:

```sh
momics ingest tracks -f bw1=path/to/file.bw path/to/momics_repo
```

- Query genomic coverage:

You can query tracks using either UCSC-style coordinates or a BED file:

```sh
momics query tracks --coordinates "chr1:1-1000" path/to/momics_repo
momics query tracks --file path/to/file.bed path/to/momics_repo
```

### Python API

In Python, you can load and query a momics repository like this:

```py
from momics.momics import Momics

# Load a Momics repository
repo = Momics("path/to/momics_repo")

# Query tracks with coordinates
df = repo.query_tracks("chr1:1-1000")
```

## Data Format

`momics` uses a custom data format that combines genomic sequences and coverage tracks in a compressed and indexed form. The format allows for rapid access to any region of the genome and supports simultaneous querying of multiple genomic regions.

## Contributing

Contributions are welcome! Please submit pull requests or issues on the GitHub repository.


This project uses `black` to format code and `ruff` for linting. We also support `pre-commit` to ensure
these have been run. To configure your local environment, please install these development dependencies and set up
the commit hooks.


## License

This project is licensed under the MIT License. See the LICENSE file for details.
