EpiagentSingleCellEpigenomics Agent

From mdbabumiamssm/LLMs-Universal-Life-Science-and-Clinical-Skills- · View interactive version

EpiagentSingleCellEpigenomics Agent is an AI agent skill from the GitHub repository mdbabumiamssm/LLMs-Universal-Life-Science-and-Clinical-Skills-. Prepare human scATAC-seq data for EpiAgent and run documented embedding, annotation, imputation, integration, or adaptation workflows with reproducibility checks.

How to use this skill

Skill file

<!--

COPYRIGHT NOTICE

This file is part of the "Universal AI Agentic Skills" project.

Copyright (c) 2026 MD BABU MIA, PhD <md.babu.mia@mssm.edu>

All Rights Reserved.

#

This code is proprietary and confidential.

Unauthorized copying of this file, via any medium is strictly prohibited.

#

Provenance: Authenticated by MD BABU MIA

-->

<!-- AUTHOR_SIGNATURE: 9a7f3c2e-MD-BABU-MIA-2026-MSSM-SECURE -->


name: 'epiagent-single-cell-epigenomics'

description: 'Prepare human scATAC-seq data for EpiAgent and run documented embedding, annotation, imputation, integration, or adaptation workflows with reproducibility checks.'

measurable_outcome: 'Execute skill workflow successfully with valid output within 15 minutes.'

allowed-tools:


EpiAgent Single-Cell Epigenomics

Overview

Use EpiAgent to represent human single-cell chromatin accessibility as ordered cCRE token sequences and derive cell embeddings or task-specific predictions. This skill connects the repository's preprocessing and inference examples with checks that prevent mismatched genome coordinates, feature vocabularies, and model resources from silently corrupting results.

When to Use This Skill

Core Capabilities

  1. Validate assay and resource compatibility. Establish genome build, fragment layout, cell identifiers, cCRE order, checkpoint, and intended task before computation. The documented workflow targets human scATAC-seq; do not assume direct support for methylation, histone-mark assays, RNA expression, or nonhuman data.
  2. Prepare model inputs. Convert hg19 fragments to hg38 when necessary, intersect fragments with the supplied cCRE BED, construct a sparse cell-by-cCRE AnnData object, and apply repository global TF-IDF and tokenization.
  3. Run pretrained inference. Use the base checkpoint for cell embeddings. Select EpiAgent-B for brain annotation or EpiAgent-NT for other tissues, retaining the corresponding model's label mapping and preprocessing.
  4. Adapt models for documented tasks. Route to the matching notebook for feature extraction, supervised annotation, imputation, reference integration/query mapping, perturbation prediction, or cCRE knockout. Obtain the labels, reference data, condition information, and external embeddings required by that notebook rather than treating every task as zero-shot inference.
  5. Verify outputs and provenance. Check cell alignment, numerical validity, checkpoint compatibility, and repeatability; record data and resource hashes alongside execution settings. Treat biological predictions as task-dependent research outputs rather than validated causal or clinical conclusions.

Workflow

1. Establish scope and execution readiness.

Choose one task and read its notebook from the repository demo directory. Record the repository commit and installed package version; do not assume a PyPI installation exactly matches the current GitHub branch.

The documented environment uses Python 3.11, PyTorch 2.0.1, CUDA 11.7, and FlashAttention 2.5.8; installation is via pip install epiagent. Check the actual GPU, CUDA, compiler, and FlashAttention compatibility before following those historical version pins. A notebook's CPU device fallback alone does not establish that its FlashAttention configuration works on CPU.

For the 15-minute outcome, use a small fixed subset of already prepared cells with dependencies and checkpoints available locally. Time a single inference pass and save a validated output. Installation, large downloads, full fragment processing, fine-tuning, and paper reproduction are separate workloads with no documented 15-minute guarantee; report incomplete prerequisites instead of claiming successful execution.

2. Acquire matching models and resources.

The README links model weights and example data on Google Drive. The embedding demo expects model/pretrained_EpiAgent.pth; annotation requires the corresponding EpiAgent-B or EpiAgent-NT model and its label mapping. Obtain data/cCRE.bed and data/cCRE_document_frequency.npy from the compatible repository resources. Record download URLs and SHA-256 hashes; if access fails, report the unavailable resource without substituting unrelated weights.

The repository software has an MIT license. Preserve its required notice when redistributing upstream software. The reviewed README does not establish separate licensing terms for every externally hosted checkpoint or dataset; inspect their accompanying terms before redistribution. The copyright header of this skill does not change upstream ownership or licensing.

3. Construct and check inputs.

Follow Data Preprocessing.ipynb:

4. Execute the selected analysis.

For the minimal embedding workflow, follow Zero-shot Feature Extraction using EpiAgent.ipynb:

For other tasks, use the corresponding demo's architecture, loss, data split, and inference routine. EpiAgent-B and EpiAgent-NT are supervised annotation models applied directly to new data; their zero-shot application does not imply recognition of arbitrary unseen label categories. Perturbation and knockout workflows require their task-specific setup, and predicted changes are hypotheses rather than experimental validation.

For imputation, use the corrected cCRE_frequency.npy resource: the README's 2026-05-28 update reports a scale correction affecting imputation. Record its hash and version, and do not confuse this file with cCRE_document_frequency.npy used for global TF-IDF.

5. Validate and report.

Inputs / Outputs

Inputs: Human scATAC-seq fragment BED files with cell barcodes and optional counts, or a validated cell-by-cCRE .h5ad; genome-build information; cell/sample metadata; the ordered cCRE BED and frequency resources; a compatible checkpoint; and task-dependent labels, references, perturbation metadata, or external embeddings.

Outputs: A processed AnnData file containing tokenized cell sentences and, for embedding inference, obsm['cell_embeddings_zero_shot']; task-specific predictions or adapted weights when requested; and a run manifest with input/resource hashes, parameters, elapsed time, validation results, and limitations. Preserve cell IDs and feature order in every exported matrix. A blocked setup report is useful diagnostic output but does not satisfy the successful-execution outcome.

References

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.