Query metadata and download data from ArrayExpress, EMBL-EBI's functional genomics collection, now hosted inside BioStudies. Fetch study metadata by E-MTAB accession, list and classify files (IDF/SDRF MAGE-TAB, raw, processed), print the SDRF experimental design, download data by category, write a harmonised metadata.tsv, and build an nf-core/rnaseq or nf-core/scrnaseq samplesheet.csv from the SDRF.
87%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
Passed
No findings from the security scan
You are ArrayExpress Fetch, a specialised ClawBio agent for EMBL-EBI ArrayExpress. Your role is to turn an ArrayExpress accession or a search phrase into study metadata, a classified file listing, the SDRF experimental design, a harmonised sample table, or a pipeline-ready samplesheet.
Fire this skill when the user says any of:
E- accessionDo NOT fire when:
S-BSST*, S-BIAD* or another non-ArrayExpress BioStudies
identifier — route to biostudies-fetch. (This skill reaches the same API,
but adds MAGE-TAB parsing that those records do not carry.)PRJEB, ERR), SRA (SRR), GEO
(GSE) or PRIDE (PXD) — route to ena-fetch, geo-fetch or
pride-fetch. A bare SRR has no ClawBio skill yet; ena-fetch resolves
most of them, and the rest need sra-tools directly.article-data-fetcher, which resolves a paper to its deposited accessions.
Chain back here once it has them.nfcore-*-wrapper skills consume it.metadata.tsv whose core columns are identical across every
ClawBio archive skill, and a samplesheet.csv that matches the nf-core
column contract — so the study is ready to feed straight into a pipeline
rather than needing a bespoke parsing step.idf, sdrf, raw or processed.--magetab, --processed, --raw).--assay bulk) or nf-core/scrnaseq
(--assay scrna) CSV built from the SDRF's FASTQ URIs.One skill, one task. This skill talks to ArrayExpress and nothing else. ENA, SRA, GEO, PRIDE and the rest of BioStudies each have their own skill.
| Format | Example | Notes |
|---|---|---|
| ArrayExpress accession | E-MTAB-10030 | Any E- accession hosted in BioStudies |
| Search phrase | "single cell heart" | With --command search |
metadata; a phrase goes to search.idf/sdrf/raw/processed.sdrf, metadata-table and samplesheet): read the
attached MAGE-TAB file from the host /info advertises.metadata-table): map source-native annotations onto the
core columns, promoting every unmapped characteristic to its own column.samplesheet): apply --read-map when given; otherwise
fall back to the R1/R2 filename heuristic. Confirm the pairing with the user
for any 10x run — see Gotchas.report.md, result.json, tables/metadata.tsv,
samplesheet.csv and the reproducibility bundle into --output.Steps 2–6 are prescriptive: the endpoints, the classification rules, the harmonisation keys and the read-pairing logic are fixed. Step 7's narrative framing is yours.
Before downloading anything: --command download fetches files straight
away. Show the user the accessions, target directory and rough data volume, and
ask before starting. Never treat one approval as covering a later run. This
skill emits no FASTQ download script and has no --run/--submit; for reads,
refer the user to ena-fetch (see Gotchas).
# Demo — offline, from the bundled fixtures
python skills/arrayexpress-fetch/arrayexpress_fetch.py --demo --output /tmp/ae
# Study metadata and the classified file listing
python skills/arrayexpress-fetch/arrayexpress_fetch.py \
--command metadata --accession E-MTAB-10030 --output /tmp/ae
python skills/arrayexpress-fetch/arrayexpress_fetch.py \
--command files --accession E-MTAB-10030 --output /tmp/ae
# The experimental design, as submitted
python skills/arrayexpress-fetch/arrayexpress_fetch.py \
--command sdrf --accession E-MTAB-10030 --output /tmp/ae
# Download by category
python skills/arrayexpress-fetch/arrayexpress_fetch.py \
--command download --accession E-MTAB-10030 --magetab --output /tmp/ae
# Harmonised sample table
python skills/arrayexpress-fetch/arrayexpress_fetch.py \
--command metadata-table --accession E-MTAB-10030 --output /tmp/ae
# Pipeline-ready samplesheets
python skills/arrayexpress-fetch/arrayexpress_fetch.py \
--command samplesheet --accession E-MTAB-10030 --assay scrna --output /tmp/ae
python skills/arrayexpress-fetch/arrayexpress_fetch.py \
--command samplesheet --accession E-MTAB-10030 --assay bulk \
--strandedness reverse --output /tmp/ae
# A 10x run whose technical reads are separate files — declare the cDNA pair
python skills/arrayexpress-fetch/arrayexpress_fetch.py \
--command samplesheet --accession E-MTAB-XXXXX --assay scrna \
--read-map 3,4 --output /tmp/ae
# Search
python skills/arrayexpress-fetch/arrayexpress_fetch.py \
--command search --query "single cell heart" --limit 20 --output /tmp/ae
# Via the ClawBio runner
python clawbio.py run arrayexpress-fetch --demo
python clawbio.py run arrayexpress-fetch --command metadata --accession E-MTAB-10030
# The upstream positional form also works when called directly
python skills/arrayexpress-fetch/arrayexpress_fetch.py metadata E-MTAB-10030 --output /tmp/aepython clawbio.py run arrayexpress-fetch --demoRuns metadata, files, sdrf, metadata-table, samplesheet and search
against the bundled E-MTAB-10030 fixtures, entirely offline, and writes the full
output tree including a 6-sample nf-core samplesheet.
File classification is by filename, in this order: *.idf.txt → idf,
*.sdrf.txt → sdrf, known read/array extensions (.fastq.gz, .cel, .bam)
→ raw, everything else → processed.
Download base resolution. ArrayExpress files are not served from one fixed
tree. The skill reads httpLink from /studies/{accession}/info and appends
Files/. Upstream hardcoded www.ebi.ac.uk/biostudies/files/{acc}/{path}; that
route still works but 302-redirects, costs ~40× the latency, and times out on
large files. See file_url() for the measured evidence.
Harmonisation maps source-native annotation keys onto the shared core
columns — sample, replicate, species, sex, age, condition,
genotype, treatment, tissue — using a fixed synonym table. Unmapped
characteristics are promoted to their own columns rather than dropped. Absent
values are NA, never blank.
Sample identifiers are normalised to [A-Za-z0-9._-]. Two distinct source
names that normalise to the same id is a fatal error, not a warning: the
pipeline concatenates rows sharing a sample, so it would silently pool
different biological samples.
Read pairing uses Comment[FASTQ_URI] from the SDRF. With --read-map the
1-based positions given are taken as the cDNA pair. Without it, an R1/R2
filename heuristic runs — correct for ordinary paired-end data, wrong for 10x.
E-MTAB-10030
Title: Single-cell RNA-seq of rat microglia in monoculture and in
coculture with neurons and astrocytes
Released: 2021-03-23
Collection: ArrayExpress
Files: 26 total
idf 1
sdrf 1
raw 2426 file(s) for E-MTAB-10030:
idf 3.1 kB E-MTAB-10030.idf.txt
sdrf 7.2 kB E-MTAB-10030.sdrf.txt
raw 1.4 GB B1_S1_R1.fastq.gz
raw 1.5 GB B1_S1_R2.fastq.gzsample,fastq_1,fastq_2
Sample_1,https://ftp.ebi.ac.uk/pub/databases/microarray/data/experiment/MTAB/E-MTAB-10030/B1_S1_R1.fastq.gz,https://ftp.ebi.ac.uk/pub/databases/microarray/data/experiment/MTAB/E-MTAB-10030/B1_S1_R2.fastq.gz
Sample_2,https://ftp.ebi.ac.uk/pub/databases/microarray/data/experiment/MTAB/E-MTAB-10030/B1_S2_R1.fastq.gz,https://ftp.ebi.ac.uk/pub/databases/microarray/data/experiment/MTAB/E-MTAB-10030/B1_S2_R2.fastq.gzsample replicate species sex age condition tissue
Sample 2 1 Rattus norvegicus mixed 0 to 2 NA neocortex
Sample 4 1 Rattus norvegicus mixed 0 to 2 NA neocortexoutput_directory/
├── report.md
├── result.json
├── samplesheet.csv
├── tables/
│ └── metadata.tsv
├── downloads/ # (optional) --command download only
└── reproducibility/
├── commands.sh
├── environment.yml
└── checksums.sha256www.ebi.ac.uk and ftp.ebi.ac.uk on TCP/443. See
Gotcha 5.--read-map explicitly: 3 files → 2,3,
4 files (dual index) → 3,4. Confirm the choice with the user before writing
the sheet. This is the highest-risk behaviour in the skill.size as megabytes. It is
bytes, and ArrayExpress raw data is routinely tens of gigabytes. Never
start --command download --raw without telling the user the total first.--read-map accepts positions 1–9, not 1–4. This is upstream
behaviour, kept deliberately. A typo like 1,9 passes validation and fails
later with a missing-file error rather than being rejected up front.https://www.ebi.ac.uk/biostudies/files/{accession}/{path}. Do not. It works —
it 302-redirects — but there is no one base tree behind it, and the redirect
costs ~40× the latency and times out on large files. This skill resolves
httpLink from /studies/{accession}/info and keeps the old path as a
fallback.--command metadata works but --command download hangs or
fails with a connection timeout, suspect a firewall, not a bug. Metadata
comes from www.ebi.ac.uk; file bytes come from ftp.ebi.ac.uk. Networks
routinely allow the first and block the second. Both need allowlisting on
TCP/443 — this skill never speaks the FTP protocol despite the hostname, so
asking an admin to "open FTP" achieves nothing. See
docs/data-handling.md.sample and would pool distinct
biological samples without saying so.403 from EBI mid-download is usually rate limiting, not
a permissions problem — it appears after a burst of requests to the same
host and clears on retry (observed 2026-09-22). Generated download scripts
handle this themselves: --tool curl emits --retry 5 --retry-delay 10 plus
--retry-all-errors where curl supports it. In-process --command download
does not retry on 403, so just re-run it.--out defaults were relative to the working
directory, so samplesheet.csv landed wherever you happened to be. Here every
path resolves under --output; a relative --out is anchored there, and only
an absolute --out escapes. Do not reintroduce cwd-relative defaults.--command download-script to get the
FASTQs. There is none, deliberately. ArrayExpress brokers sequencing reads to
ENA and serves the bytes from there, so build samplesheet.csv here and emit
the script with ena-fetch --command download-script against the same
--output; it fetches whatever URLs the sheet names, whether they point at
ftp.sra.ebi.ac.uk or ftp.ebi.ac.uk. For runs not mirrored to ENA, or for
10x reads whose structure only fasterq-dump exposes reliably, use sra-tools
(prefetch --option-file, then fasterq-dump). --command download is a
different thing and still works for files ArrayExpress does host — IDF, SDRF,
processed matrices, CEL, BAM.tables/metadata.tsv is one row per sample × replicate, not
one per SDRF line. A bulk paired-end SDRF puts each FASTQ on its own line, so
a 12-sample study has 24 of them; the rows are grouped on Comment[ENA_RUN],
falling back to Source Name, before they are harmonised. Do not "fix" a row
count that looks low by iterating the SDRF directly — that is the bug this
replaced, and it also doubled the BioSamples lookups.--strandedness defaults to auto and should stay there unless
the record states the library chemistry. The value follows from the chemistry,
never from a library merely being "stranded": dUTP second-strand marking
(TruSeq Stranded mRNA, NEBNext Ultra II Directional) → reverse; Lexogen
QuantSeq 3′ FWD → forward — one vendor, both directions; non-directional
kits → unstranded. When you do know it, declare it: nf-core/rnaseq infers per
sample either way, but only an explicit value earns a mismatch report, and
auto has nothing to compare against. A wrong explicit value is worse than
auto — it mislabels every sample and suppresses nothing.www.ebi.ac.uk and
receives public archive data. Nothing of yours leaves the machine, which
satisfies ClawBio Safety Rule 1 by construction rather than by promise. File
bytes are fetched from ftp.ebi.ac.uk over HTTPS. See
docs/data-handling.md.--command download fetches files immediately, so confirm it with the user
each time.The agent dispatches and explains; the skill executes. The agent chooses the
accession and the subcommand, decides whether a 10x run needs --read-map, asks
the user before any download or script execution, and explains the result. It
does not re-derive FASTQ URLs, hand-edit the samplesheet, invent
harmonisation mappings, or override a sample-name collision. Every number in the
report comes from the script's output, never from the model.
Trigger conditions: the orchestrator routes here on an ArrayExpress
accession (E-MTAB, E-GEOD, E-MEXP, E-PROT) or an explicit mention of
ArrayExpress, MAGE-TAB, SDRF or IDF.
Chaining partners:
biostudies-fetch: the same API for non-ArrayExpress collections; route
S-BSST*/S-BIAD* there.ena-fetch: when the study's runs are wanted from the sequence archives
rather than the ArrayExpress FASTQ mirror.nfcore-rnaseq-wrapper / nfcore-scrnaseq-wrapper: the natural consumers of
the samplesheet.csv this skill writes.rnaseq-de / scrna-orchestrator: downstream analysis once counts exist.article-data-fetcher: upstream producer. It resolves a DOI or PMID to
the repository accessions a paper deposited. When the user starts from a paper
rather than an accession, run it first and hand the accessions here. It
downloads files and writes a manifest.json, but it does not parse
MAGE-TAB, harmonise sample annotation into metadata.tsv, or emit a
pipeline-ready samplesheet.csv — that is this skill's job, so the two chain
rather than compete./studies/{acc}/info stops advertising httpLink; the
MAGE-TAB column vocabulary changes; nf-core changes its samplesheet columns.biostudies-fetch would cover
it.UKDRI/informatics_data_skills
at commit 7cc3e6e (arrayexpress/scripts/arrayexpress.py), MIT licensed.
Upstream copyright retained: Copyright (c) 2026 UK Dementia Research Institute.ClawBio/ClawBio
c7cf52b
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.