agentleFS
Scientific-ToolingScientific-Tooling/structured-intelligence/skills/search-sra/SKILL.md

search-sra

Skill4 starsChanged 12 days agoMITView on GitHub

Search NCBI Sequence Read Archive (SRA) for sequencing runs, experiments, studies, and samples using E-utilities or the NCBI Datasets CLI.

The file

We split this skill into the rules it gives an agent

5 rules. About 0 are common, 1 is distinctive, and 4 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 4

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    If given a bare accession (SRR/SRX/SRS/SRP/PRJNA/SAMN), map it to the correct NCBI database:

    line 35
  2. Very specific:

    If given a free-text query, use esearch -db sra with structured field tags when helpful:

    line 39
  3. Very specific:

    Run esearch -db sra -query "<term>" to retrieve UIDs.

    line 44
  4. Very specific:

    If the user wants to download, provide the prefetch or fasterq-dump command with the accession list.

    line 49
  5. Distinctive:

    Search query used (exact E-utilities command)

    line 53

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Skill: Search SRA

Use When

  • A user wants to find sequencing runs, experiments, studies, or biosamples in the NCBI Sequence Read Archive.
  • A user needs to look up SRA accessions (SRR, SRX, SRS, SRP, SAMN) or search by organism, tissue, assay type, or keyword.
  • A user wants to retrieve run metadata (file size, read count, platform, library strategy) before downloading.
  • A user wants to list all runs belonging to a BioProject or BioSample.
  • A user needs to build a manifest of SRR accessions for downstream download with prefetch or fasterq-dump.
  • A user wants to filter SRA by sequencing platform (Illumina, PacBio, Nanopore) or library layout (PAIRED, SINGLE).

Inputs

  • Required:
    • one of: free-text search query, SRA/BioProject/BioSample accession, organism name, or NCBI taxonomy ID
  • Optional:
    • target SRA entity type: run, experiment, sample, study (default: run)
    • organism filter (e.g., "Homo sapiens", "Mus musculus")
    • library strategy filter (e.g., RNA-Seq, WGS, ChIP-Seq, ATAC-seq)
    • platform filter (e.g., ILLUMINA, PACBIO_SMRT, OXFORD_NANOPORE)
    • library layout: PAIRED or SINGLE
    • date range: mindate / maxdate in YYYY/MM/DD
    • maximum results to return (retmax, default 20)
    • output format: json, xml, or runinfo CSV
    • output directory

Workflow

  1. Determine the search strategy:
    • If given a bare accession (SRR/SRX/SRS/SRP/PRJNA/SAMN), map it to the correct NCBI database:
      • SRR, SRX, SRS, SRP → sra
      • PRJNA → bioproject, then link to sra
      • SAMN → biosample, then link to sra
    • If given a free-text query, use esearch -db sra with structured field tags when helpful:
      • organism: [Organism]
      • library strategy: [Strategy]
      • platform: [Platform]
      • layout: [Layout]
  2. Run esearch -db sra -query "<term>" to retrieve UIDs.
  3. Pipe to esummary -db sra -format json or efetch -db sra -format runinfo for metadata.
  4. For BioProject-level queries, use esearch -db bioproject | elink -target sra | efetch -format runinfo to get the full run table.
  5. Parse the run info CSV or JSON to extract: Run, SampleName, BioSample, Experiment, LibraryStrategy, LibraryLayout, Platform, spots, bases, size_MB, PublishDate.
  6. Report a summary table of matching runs and key metadata.
  7. If the user wants to download, provide the prefetch or fasterq-dump command with the accession list.

Output Contract

  • Search query used (exact E-utilities command)
  • Number of hits found
  • Summary table with columns: Run (SRR), Sample, BioProject, Strategy, Platform, Layout, Spots, Bases, Size (MB), Date
  • Full accession list suitable for use with prefetch or fasterq-dump
  • Saved output files when an output directory is provided:
    • esearch.json
    • runinfo.csv (when efetch -format runinfo is used)
    • accessions.txt (one SRR per line)

Limits

  • This skill depends on live access to https://eutils.ncbi.nlm.nih.gov/entrez/eutils/.
  • NCBI rate limit: 3 requests/second without API key, 10/second with API key. Always pass --email for repeated queries.
  • esummary JSON field names for SRA differ from the runinfo CSV columns; prefer efetch -format runinfo for tabular metadata.
  • Private or access-controlled SRA datasets (dbGaP) cannot be retrieved without an authorized token.
  • Very large BioProjects (>10 000 runs) require paging with WebEnv + query_key.
  • Common failure cases:
    • confusing SRA database UIDs with run accessions (they are not the same)
    • querying bioproject instead of sra when an SRR is needed
    • omitting [Organism] field tag, causing organism name to match free text in other fields
    • requesting retmax > 10 000 without using history server

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.