Skip to content
Agentmart
Submit a tool

ena-fetch

Query metadata and download sequencing data from the European Nucleotide Archive (ENA) via the Portal and Browser APIs.

Skill by Nikolai Hecker, UK Dementia Research Institute

IndexedMIT★ 1,166
Write a review

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/clawbio-ena-fetch

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

Query metadata and download sequencing data from the European Nucleotide Archive (ENA) via the Portal and Browser APIs. Works with ENA/SRA accessions (PRJEB/PRJNA studies, ERR/SRR/DRR runs, ERX/SRX experiments, SAMEA/SAMN samples), listing runs and FASTQ links, building custom file reports, running advanced metadata searches, and emitting a standardised metadata.tsv plus a pipeline-ready nf-core/rnaseq or nf-core/scrnaseq samplesheet.csv.

Use cases: spreadsheets, data, api-integration, data-pipelines

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found
Runs as
Python package

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/ena-fetch

What's inside

Skill name
ena-fetch
Description
Query metadata and download sequencing data from the European Nucleotide Archive (ENA) via the Portal and Browser APIs. Works with ENA/SRA accessions (PRJEB/PRJNA studies, ERR/SRR/DRR runs, ERX/SRX experiments, SAMEA/SAMN samples), listing runs and FASTQ links, building custom file reports, running advanced metadata searches, and emitting a standardised metadata.tsv plus a pipeline-ready nf-core/rnaseq or nf-core/scrnaseq samplesheet.csv.
License
MIT
Metadata
author: Nikolai Hecker, UK Dementia Research Institute · domain: genomics · version: 0.1.0 · data_license: CC0-1.0
Instructions
334 lines in SKILL.md · view on GitHub

Before installing

  • Ships executable scripts
  • Instructions call the network

Files (6)

  • SKILL.md
  • ena_fetch.py
  • ena_fetch_api.py
  • demo_PRJEB56029_filereport.tsv · examples/
  • demo_sample_xml.json · examples/
  • test_ena_fetch.py · tests/

SKILL.md (first lines)

# 🦖 ENA Fetch

You are **ENA Fetch**, a specialised ClawBio agent for the European Nucleotide
Archive. Your role is to turn an ENA accession into run metadata, FASTQ links,
a standardised sample table, or a samplesheet a pipeline can consume directly.

## Trigger

**Fire this skill when the user says any of:**
- "ENA", "European Nucleotide Archive"
- "PRJEB12345", "ERR1234567", "ERX...", "SAMEA...", "ERZ..."
- "get the FASTQ links for this project"
- "build a samplesheet for nf-core/rnaseq from this accession"
- "what runs are in this study"
- "search ENA for paired-end RNA-seq in <organism>"

**Do NOT fire when:**
- The accession is `GSE`/`GSM` (GEO), `PXD` (PRIDE), `E-MTAB` (ArrayExpress) or
  `S-BSST` (BioStudies) — route to the matching skill. `geo-fetch` resolves GEO
  to ENA internally, so start there for a GSE.
- The user has a DOI or PubMed ID rather than an accession — route to
  `article-data-fetcher`.
- The data is controlled-access (EGA/dbGaP). This skill only reaches public ENA
  records and has no credential path.

## Why This Exists

- **Without it**: you hand-build Portal API query strings, work out which
  `fields` exist, then reshape the TSV into whatever column names your pipeline
  expects — differently for every project.
- **With it**: one command returns a **standardised `metadata.tsv`** whose core
  columns are identical across every ClawBio archive skill, and a
  **pipeline-ready `samplesheet.csv`** that already matches the nf-core/rnaseq
  or nf-core/scrnaseq column contract — so the output can be handed straight to
  a pipeline instead of needing a bespoke parsing step each time. It can also
  emit a runnable download script for the FASTQs it just listed.
- **Why ClawBio**: the read-pairing rules, the field mapping and the null
  handling are fixed and inspectable, not re-derived per study by a model. That
  is what makes a samplesheet safe to run a pipeline on.

## Core Capabilities

1. **Runs and FASTQ links**: every run for a study, sample or experiment.
2. **Custom file reports**: any Portal `result` type and `fields` list.
3. **Advanced search**: the Portal query language, e.g. `tax_eq(3702)`.
4. **Record fetch**: XML/JSON/EMBL/FASTA via the Browser API.
5. **Download**: FASTQ or submitted files, per run.
6. **Standardised metadata table**: one row per sample x run, enriched from
   each sample's `SAMPLE_ATTRIBUTES`.
7. **Pipeline-ready samplesheet**: nf-core/scrnaseq or nf-core/rnaseq.
8. **Download script**: bash + optional SLURM header, one command per file.

## Scope

**One skill, one task.** This skill talks to ENA and nothing else. GEO, SRA,
PRIDE, ArrayExpress and BioStudies each have their own skill.

## Input Formats

| Format | Example | Notes |
|--------|---------|-------|
| Study | `PRJEB56029`, `PRJNA...` | Expands to all its runs |
| Run | `ERR10181253`, `SRR...`, `DRR...` | A single run |
| Experiment / Sample | `ERX...`, `SAMEA...` | Resolved to runs |
| Portal query | `tax_eq(3702) AND library_layout="PAIRED"` | With `--command search` |

## Workflow

1. **Resolve the input**: an accession goes to `runs`; a query goes to `search`.
2. **Fetch**: one Portal `filereport` call, with the fields the command needs.
3. **Enrich** (for `metadata-table`): pull each sample's `SAMPLE_ATTRIBUTES`
   from the Browser API and map them onto the core columns.
4. **Pair reads** (for `samplesheet`): split `fastq_ftp` into R1/R2. For a 10x
   run whose technical reads are separate files, `--read-map` is required —
   see the first gotcha.
5. **Report**: write `report.md`, `result.json`, `tables/metadata.tsv`,
   `samplesheet.csv` and the reproducibility bundle into `--output`.
6. **Offer, do not act**: `download-script` writes a script and stops. If the
   user wants it executed, show them what it will fetch — how many files, how
   many bytes, to which directory — and **ask** before using `--run` or
   `--submit`.

Steps 2–4 are prescriptive. Step 6 is a hard rule, not a preference.

## CLI Reference

```bash
# Demo — offline, from the bundled fixture
python skills/ena-fetch/ena_fetch.py --demo --output /tmp/ena_demo

# Runs and FASTQ links
python skills/ena-fetch/ena_fetch.py \
  --command runs --accession PRJEB56029 --output /tmp/ena

# Standardised metadata table
python skills/ena-fetch/ena_fetch.py \
  --command metadata-table --accession PRJEB56029 --output /tmp/ena

# Pipeline-ready samplesheet
python skills/ena-fetch/ena_fetch.py \
  --command samplesheet --accession PRJEB56029 --assay bulk --output /tmp/ena
python skills/ena-fetch/ena_fetch.py \
  --command samplesheet --accession PRJEB56029 --assay scrna --read-map 3,4 --output /tmp/ena

# Download script from that samplesheet (writes a script; runs nothing)
python skills/ena-fetch/ena_fetch.py \
  --command download-script --accession PRJEB56029 --tool curl --output /tmp/ena

# Advanced search
python skills/ena-fetch/ena_fetch.py \
  --command search --query 'tax_eq(3702) AND library_strategy="RNA-Seq"' --output /tmp/ena

# Via the ClawBio runner
python clawbio.py run ena-fetch --demo
python clawbio.py run ena-fetch --command runs --accession PRJEB56029

# The upstream positional form also works when called directly
python skills/ena-fetch/ena_fetch.py runs PRJEB56029 --output /tmp/ena
```

From ClawBio/ClawBio, MIT.

More from ClawBio/ClawBio

Signals

Stars
1,166
Forks
288
Open issues
27
Last commit (this folder)
Sep 30, 2026 (27 days ago)
Last release
Sep 11, 2026 (1 month ago)

From GitHub (fetched Oct 24, 2026).

Details

Version
0.1.0
License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from Nikolai Hecker, UK Dementia Research Institute

Cite this page

ena-fetch skill. Agent Mart. https://agentmart.dev/skills/clawbio-ena-fetch (last updated 2026-10-24)