I'm performing searches on GEO manually, but it's too laborious and time-consuming.
Are there packages to automatize the searches?
I'm looking for COVID-19 bulk RNA-Seq datasets and I need the patients profile (age, sex, etc)..
many thanks,
Fabiano
1 answer
pysradb is excellent for this. It's a command-line tool (also has a Python API) that queries SRA/GEO metadata directly. Install is just:
bash
pip install pysradb
Step 1 — Search for COVID-19 bulk RNA-seq studies:
bash
pysradb search "COVID-19 RNA-Seq bulk" --db-search --max-results 50
or search for the SARS-CoV-2 human host studies specifically:
bash
pysradb search "SARS-CoV-2 human RNA-Seq" --max-results 100 > covid_rnaseq_hits.txt
Step 2 — Once you have a GSE accession (e.g. from GEO or the search above), get its SRP:
bash
pysradb gse-to-srp GSE152418
Step 3 — Fetch full metadata including patient attributes (age, sex, disease status):
bash
pysradb metadata SRP268271 --detailed
The --detailed flag is the key one for your use case — it pulls the BioSample attributes where submitters deposit clinical/patient metadata like host_sex, host_age, host_disease, etc. These fields vary by submission, but many COVID-19 patient datasets include them.
Step 4 — Save to a TSV for easy filtering:
bash
pysradb metadata SRP268271 --detailed --saveto metadata.tsv
Then open in Excel/R/pandas and filter for library_strategy == RNA-Seq, check for age/sex columns, etc.
Important caveat (as noted above by GenoMax): patient-level clinical data like exact age is sometimes protected or simply not deposited. What you'll reliably find is what the submitter chose to make public in BioSample. Many COVID-19 cohort studies do include age group, sex, and severity — but it varies by study. The --detailed output will show you exactly what each study provides before you commit to downloading anything.
Log in to answer this question.
ChatGPT really. Just tell it to do a comprehensive search on GEO for datasets meeting this and that criteria. It's surprisingly good at it.
That may be limiting since some of that information would be protected and likely require an application for access.
looks like I can get it using the R package GEO query..