Ena Download logo

Ena Download

Community
ssinder
ena-download

Downloads RNA-seq and other sequencing FASTQ data from the ENA (European Nucleotide Archive) Portal API and exports run-level metadata. Resolves download URLs and file sizes from the structured API rather than scraping archive web pages, supports batch accession lists, HTTP Range resume for interrupted transfers, and MD5 verification against the checksums ENA publishes. This skill should be used when fetching raw sequencing reads by SRA/ERR/DRR accession, retrieving FASTQ files for an RNA-seq project, or collecting run metadata and read counts is requested.

Overview

Publisherssinder
Repositorybioinformatics-agent-skills
Skill nameena-download
Stars
75
Forks
2
Bundled files
5
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 5 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by ssinder on GitHub. Read the source before you install it.

Installation

Install the Ena Download AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/ssinder/bioinformatics-agent-skills/tree/main/skills/ena-download
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/ssinder/bioinformatics-agent-skills.git /tmp/bioinformatics-agent-skills
mkdir -p .claude/skills
cp -r /tmp/bioinformatics-agent-skills/skills/ena-download .claude/skills/ena-download
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Ena Download in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Ena Download on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Ena Download is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

ENA Sequencing Data Retrieval

Overview

This skill retrieves raw sequencing data (FASTQ) from the ENA Portal API and exports run-level metadata. It replaces a common but fragile pattern: scraping archive web pages to extract download links and file sizes.

The ENA Portal API returns structured fields — fastq_ftp, fastq_bytes, fastq_md5, library_strategy, read_count, base_count — for every run. That removes three failure modes at once:

  • Fragile HTML parsing. Page-scraping approaches depend on absolute XPath positions (/html/body/div[2]/div[2]/div[2]/...) that break whenever the archive changes its layout. The API's schema is stable.
  • Only getting .sra. The archive's own download links point at the original submitted format (usually .sra), which then needs a separate fastq-dump conversion step. ENA already ships the converted FASTQ, with per-file sizes and MD5 checksums.
  • No integrity check. A truncated download looks like a successful one until a downstream tool fails on malformed reads. ENA publishes the MD5 of every FASTQ; this skill verifies each file after transfer and deletes it if the checksum does not match.

Downloads are resumable: an interrupted transfer continues from the byte it stopped at using an HTTP Range request, instead of starting over.

When to Use This Skill

  • Fetching FASTQ for a list of SRA/ERR/DRR accessions for an RNA-seq project
  • Collecting run metadata (library strategy, read counts, organism) before deciding what to download
  • Resuming a large download that was interrupted
  • Verifying that downloaded FASTQ files are complete and uncorrupted
  • Sizing a dataset before committing bandwidth (metadata-only mode)

Quick Start

bash
export PYTHONPATH="$PWD/packages"

# 批量下载
python scripts/download_runs.py --ids SRR390728 SRR1975568 --output-dir fastq/

# 从文件读取 accession 列表
python scripts/download_runs.py --ids runs.txt --output-dir fastq/

# 只查元数据不下载(先摸清数据规模)
python scripts/download_runs.py --ids runs.txt --metadata-only --output-dir meta/

# 只处理 RNA-Seq 文库,跳过 WGS 等其它类型
python scripts/download_runs.py --ids runs.txt --strategy RNA-Seq --output-dir fastq/

# 单端数据只取第一个 FASTQ
python scripts/download_runs.py --ids runs.txt --single-end --output-dir fastq/

Workflow

  1. Collect accessions — --ids accepts accession strings directly or paths to text files (one accession per line, # for comments). Unlike the original script, there is no separate "index" configuration file mixing paths and URLs together; the accession list is the only input.
  2. Query the API — ena_client.fetch_run_metadata() builds an run_accession=X OR run_accession=Y query and posts it to the ENA search endpoint. (The filereport endpoint rejects multi-accession queries, so search is used for batching.)
  3. Export metadata — every run is written to ena_run_metadata.csv and .json, including library_strategy, read_count, base_count and the FASTQ paths, sizes and MD5s.
  4. Filter (optional) — --strategy keeps only runs with a given library strategy, e.g. RNA-Seq.
  5. Download — each FASTQ is fetched as a stream. Existing files are skipped unless --force is given; partial files are continued with a Range header.
  6. Verify — the file's MD5 is compared against the ENA-published value. A mismatch deletes the file (so it is not mistaken for complete on the next run) and counts the run as failed.
  7. Report — counts of downloaded / skipped / failed files, plus the list of failed runs.

Parameters

ParameterDefaultDescription
--idsrequiredAccession list or path(s) to text files containing accessions
--output-direna_fastqDownload directory for FASTQ files and metadata
--metadata-onlyoffQuery and export metadata only; skip downloads
--single-endoffDownload only the first FASTQ of each run
--strategynoneKeep only runs with this library_strategy (e.g. RNA-Seq)
--forceoffRe-download files that already exist
--no-resumeoffDisable resume; restart interrupted transfers from zero
--no-verifyoffSkip MD5 verification (not recommended)
--timeout600Per-request timeout in seconds

Outputs

FileContent
{SRRxxxxxxx}_1.fastq.gzDownloaded FASTQ (ENA's original filenames are kept)
ena_run_metadata.csvOne row per run: accessions, organism, instrument, library strategy/layout, read and base counts, FASTQ paths, sizes and MD5s
ena_run_metadata.jsonSame content as nested JSON

Validation

  • The FASTQ is valid gzip — gzip -t file.fastq.gz should pass. A file that fails this check was likely truncated; re-download with --force.
  • MD5 matches — the metadata CSV records ENA's expected MD5 per file. The skill already verifies this, and deletes mismatching files.
  • File size matches fastq_bytes — the metadata records ENA's byte count for each file. A size mismatch means the transfer was incomplete even if the MD5 was skipped with --no-verify.
  • Read count is plausible — read_count in the metadata is the number of reads (not read pairs). For paired-end data the number of FASTQ files should be 2, and the total base count should be roughly read_count × read_length.
  • Library strategy is what you expect — WGS runs also live in SRA/ENA. If you expected RNA-Seq and see WGS, the accession may belong to a different project; check --strategy filtering output.
  • Spot-check the first reads — zcat file.fastq.gz | head -4 should show a header line starting with @ and a quality line starting with +.

References

  • references/methodology.md — API semantics, format choice, integrity verification strategy
  • references/troubleshooting.md — common failures and how to diagnose them
  • ENA Portal API: https://www.ebi.ac.uk/ena/portal/api

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Ena Download AI skill do?

Downloads RNA-seq and other sequencing FASTQ data from the ENA (European Nucleotide Archive) Portal API and exports run-level metadata. Resolves download URLs and file sizes from the structured API rather than scraping archive web pages, supports batch accession lists, HTTP Range resume for interrupted transfers, and MD5 verification against the checksums ENA publishes. This skill should be used when fetching raw sequencing reads by SRA/ERR/DRR accession, retrieving FASTQ files for an RNA-seq project, or collecting run metadata and read counts is requested.

Why use Ena Download on TypingMind?

Because you install it once and use it with any model. Ena Download is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Ena Download in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/ssinder/bioinformatics-agent-skills/tree/main/skills/ena-download. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Ena Download?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Ena Download?

As many as you like. As long as a model supports skills, you can use Ena Download with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Ena Download AI skill free?

Yes. It is published on GitHub by ssinder under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇