| name | geniml |
| description | This skill should be used when working with genomic interval data (BED files) for machine learning tasks. Use for training region embeddings (Region2Vec, BEDspace), single-cell ATAC-seq analysis (scEmbed), building consensus peaks (universes), or any ML-based analysis of genomic regions. Applies to BED file collections, scATAC-seq data, chromatin accessibility datasets, and region-based genomic feature learning. |
| license | BSD-2-Clause license |
| metadata | {"skill-author":"K-Dense Inc."} |
| verified | false |
| lastVerifiedAt | "2026-02-19T05:29:09.098Z" |
| source | builtin |
| trust_score | 100 |
| provenance_sha | 6fd7638d722efdc6 |
Geniml: Genomic Interval Machine Learning
Overview
Geniml is a Python package for building machine learning models on genomic interval data from BED files. It provides unsupervised methods for learning embeddings of genomic regions, single cells, and metadata labels, enabling similarity searches, clustering, and downstream ML tasks.
Installation
Install geniml using uv:
uv uv pip install geniml
For ML dependencies (PyTorch, etc.):
uv uv pip install 'geniml[ml]'
Development version from GitHub:
uv uv pip install git+https://github.com/databio/geniml.git
Core Capabilities
Geniml provides five primary capabilities, each detailed in dedicated reference files:
1. Region2Vec: Genomic Region Embeddings
Train unsupervised embeddings of genomic regions using word2vec-style learning.
Use for: Dimensionality reduction of BED files, region similarity analysis, feature vectors for downstream ML.
Workflow:
- Tokenize BED files using a universe reference
- Train Region2Vec model on tokens
- Generate embeddings for regions
Reference: See references/region2vec.md for detailed workflow, parameters, and examples.
2. BEDspace: Joint Region and Metadata Embeddings
Train shared embeddings for region sets and metadata labels using StarSpace.
Use for: Metadata-aware searches, cross-modal queries (region→label or label→region), joint analysis of genomic content and experimental conditions.
Workflow:
- Preprocess regions and metadata
- Train BEDspace model
- Compute distances
- Query across regions and labels
Reference: See references/bedspace.md for detailed workflow, search types, and examples.
3. scEmbed: Single-Cell Chromatin Accessibility Embeddings
Train Region2Vec models on single-cell ATAC-seq data for cell-level embeddings.
Use for: scATAC-seq clustering, cell-type annotation, dimensionality reduction of single cells, integration with scanpy workflows.
Workflow:
- Prepare AnnData with peak coordinates
- Pre-tokenize cells
- Train scEmbed model