-
Resolve the GEO FTP base path for the accession:
-
List available files:
curl -s "https://ftp.ncbi.nlm.nih.gov/geo/series/$PREFIX/$ACC/" 2>/dev/null
curl -s "https://www.ncbi.nlm.nih.gov/geo/query/acc.cgi?acc=$ACC&targ=self&form=text&view=brief"
-
Download supplementary files (if --type supplementary or both):
wget -r -nH --cut-dirs=5 -np -nd \
-P "$OUTDIR/$ACC/supplementary/" \
"https://ftp.ncbi.nlm.nih.gov/geo/series/$PREFIX/$ACC/suppl/"
Apply --filter pattern if provided.
-
Download series matrix (if --type matrix or both):
wget -r -nH --cut-dirs=5 -np -nd \
-P "$OUTDIR/$ACC/matrix/" \
"https://ftp.ncbi.nlm.nih.gov/geo/series/$PREFIX/$ACC/matrix/"
-
Download SOFT file (if --soft):
wget -P "$OUTDIR/$ACC/soft/" \
"https://ftp.ncbi.nlm.nih.gov/geo/series/$PREFIX/$ACC/soft/"
-
Extract SRA run accessions for raw FASTQ (if --type sra-list):
esearch -db gds -query "$ACC[Accession]" | elink -target sra | \
efetch -format runinfo | awk -F',' 'NR>1 && $1!="" {print $1}'
Write the SRR list to $OUTDIR/$ACC/sra_accessions.txt and instruct the user to run download-sra with this file.
-
Report: files downloaded, total size, destination paths. For sra-list mode, display the SRR list and the recommended download-sra command.