Agentic workflows for obtaining data from the Sequence Read Archive.
scBaseCount: An AI agent-curated, uniformly processed, and continually expanding single cell data repository. Nicholas D Youngblut, Christopher Carpenter, Jaanak Prashar, Chiara Ricci-Tam, Rajesh Ilango, Noam Teyssier, Silvana Konermann, Patrick Hsu, Alexander Dobin, David P Burke, Hani Goodarzi, Yusuf H Roohani. bioRxiv 2025.02.27.640494; doi: https://doi.org/10.1101/2025.02.27.640494
Create a conda environment [optional]:
mamba create -n sragent-env -y python=3.12 sra-tools=3.1 \
&& conda activate sragent-env
Clone the repository:
git clone https://github.com/ArcInstitute/SRAgent.git \
&& cd SRAgent
Create a uv venv:
uv venv
Source the venv:
source .venv/bin/activate
Install the package:
pip install .
For development, install the package with the dev optional dependencies:
pip install -e ".[dev]"
OPENAI_API_KEY = API key for using the OpenAI APIANTHROPIC_API_KEY = API key for using the Anthropic APIEMAIL = email for using the Entrez APINCBI_API_KEY = API key for using the Entrez APIDYNACONF = switch between "test", "prod", and "claude" environmentspip install pytest
pytest tests/
Components of SRAgent can use an SQL database to store the results.
This was crucial for the scBaseCount project, in order to: * track which datasets had been processed * quickly assess the progress of the project
However, for most users, the SQL database is not necessary. SRAgent does not use the SQL database by default.
Note: currently only a GCP Postgresql database is supported.
To set up the database, see Setting up the SQL Database.
The lowest-level agent in the SRAgent hiearchy.
The agent can call various Entrez tools (esearch, efetch, esummary, and elink).
Usually, the SRAgent agent will be more useful, since it includes more tools, including calling the Entrez agent.
SRAgent entrez "Convert GSE121737 to SRX accessions"
SRAgent entrez "Summarize SRX4967527"
A general tool for extracting data from the SRA database. The tools available:
using more tools than the Entrez agent
SRAgent sragent "Summarize SRX4967527"
SRAgent sragent "Obtain any available publications for GSE196830"
SRAgent sragent "Which 10X Genomics technology was used for ERX11887200?"
Locate publications linked to SRA accessions and download the corresponding manuscripts.
--accession-column to override the default accession).--output-dir/<accession>.--output-dir/<input-filename> with added pubmed_id, doi, and download_path columns.--core-api-key/CORE_API_KEY for CORE API--email/EMAIL for Unpaywall--max-concurrency for max concurrent tasks--recursion-limit for max recursion depth--write-graph for writing the workflow graph to a fileDownload papers for a single SRX accession:
SRAgent papers SRX4967527
Use a study accession (SRP):
SRAgent papers SRP167700
Use a bioproject accession (PRJNA):
SRAgent papers PRJNA498286
Process a CSV and add DOIs and metadata to the CSV:
SRAgent papers accessions.csv
Obtain specific metadata for >=1 SRA dataset.
As of now, the metadata fields are hard-coded into the agent. If you need alternative metadata fields, you will have to modify metadata.py.
A single SRA dataset:
SRAgent srx-info 25576380
Multiple SRA datasets:
SRAgent srx-info 36106630 32664033 27694586
Use the SQL database to filter out already-processed datasets:
SRAgent srx-info --use-database 18060880 27454880 27454942 27694586
Similar to the SRX-info agent, but you can provide SRX accessions directly, instead of Entrez IDs.
This saves compute time, since the agent does not need to convert the Entrez IDs to SRX accessions.
Provide a CSV of Entrez IDs and their associated SRX accessions to obtain metadata.
Useful for when you already have the SRX accessions, instead of providing the Entrez IDs to SRAgent srx-info.
The CSV should have the header: entrez_id,srx_accession.
The metadata fields are the same as the SRX-info agent.
SRAgent metadata "entrez-id_srx-accession.csv"
An agent for categorizing tissue descriptions using the Uberon ontology. The agent helps identify the most suitable Uberon ontology term for a given tissue description.
Categorize a single tissue:
SRAgent tissue-ontology "Categorize the following tissue: brain"
Categorize multiple tissues:
SRAgent tissue-ontology "Tissues: lung, heart, liver"
Finding ontology terms for complex tissue descriptions:
SRAgent tissue-ontology "Find the ontology term for the thin layer of epithelial cells lining the alveoli in lungs"
An agent for categorizing disease descriptions using the MONDO/PATO ontology. The agent helps identify the most suitable MONDO or PATO ontology term for a given disease description.
Categorize a single disease:
SRAgent disease-ontology "Categorize the following disease: heart disorder"
Finding ontology terms for specific diseases:
SRAgent disease-ontology "What is the MONDO ontology ID for congestive heart failure?"
Categorize multiple diseases:
SRAgent disease-ontology "Diseases: heart neoplasm, bursitis"
A high-level agent for finding datasets in the SRA via esearch and then
processing them with the SRX-info agent.
SRX-info agent)esearch to find datasetsSRX-info agentSRAgent find-datasets --max-datasets 2 \
"Obtain recent single cell RNA-seq datasets in the SRA database"
SRAgent --no-summaries \
find-datasets --max-datasets 1 --organisms pig -- \
"Obtain recent single cell RNA-seq datasets in the SRA database"
Available organisms
Using the test database:
SRAgent --no-summaries \
find-datasets --use-database --tenant test \
--max-datasets 1 --organisms rat -- \
"Obtain recent single cell RNA-seq datasets in the SRA database"
By default, most SRAgent sub-commands (e.g., entrez and sragent) use "fancy" CLI output formatting:


--no-progress: Disable progress bar--no-summaries: Disable LLM summaries for each workflowstepExample:
SRAgent --no-summaries --no-progress \
entrez "Convert GSE121737 to SRX accessions"
The models used by SRAgent are configured in the settings.yml file. Options for updating the settings:
DYNACONF_SETTINGS_PATH environment variable to the path to the new settings fileexport DYNACONF_SETTINGS_PATH=/path/to/settings.ymlpip install .SRAgent supports using Anthropic's Claude models:
ANTHROPIC_API_KEY environment variable to your Anthropic API keyexport DYNACONF=claudeClaude models support different reasoning effort levels:
* low: 1024 thinking tokens (best for simple tasks)
* medium: 4096 thinking tokens (good balance)
* high: 16384 thinking tokens (best for complex reasoning)
* Anything else: Disables thinking tokens feature
Example:
export ANTHROPIC_API_KEY=your_api_key
export DYNACONF="claude"
SRAgent entrez "Convert GSE121737 to SRX accessions"
You can also customize the specific Claude model in settings.yml:
claude:
models:
default: "claude-sonnet-4-5" # Or any other Claude model version
temperature:
default: 0.1
reasoning_effort:
default: "medium" # Set your preferred reasoning effort; use "" to disable
$ claude mcp add SRAgent \
-- python -m otcore.mcp_server <graph>