Getting .fastq.gz files from Gene Expression Omnibus (GEO).

If Gene Counts, TPM, or other processed data uploaded by the authors are available, using those files is the simplest option. Even when author-uploaded processed data are not available, NCBI-generated data may be available from https://www.ncbi.nlm.nih.gov/geo/download/?acc=[GSE accession number], in which case you may not need to process the FASTQ files yourself. If neither of these options is available, or if you want to reanalyze the data starting from FASTQ files, you will need to obtain and process the FASTQ files yourself.

Check the SRR Accessions

To obtain FASTQ files from GEO, first identify the SRR accession corresponding to each sample. Open the GSM record in GEO and follow the link to the corresponding SRX record near the bottom of the page. There, check whether the sequencing data are single-end or paired-end and identify the corresponding SRR accession. For datasets with many samples, the SRA Run Selector is useful for checking multiple SRR accessions at once. It also shows the correspondence between SRR and GSM accessions, which is helpful if you later want to rename the FASTQ files using GSM accessions.

Use Kingfisher to Download FASTQ.gz Files

When obtaining FASTQ files for RNA-Seq datasets registered in GEO, Kingfisher is a convenient option. Kingfisher supports several download methods, and when FASTQ.gz files are available from the European Nucleotide Archive (ENA), the compressed FASTQ.gz files can be downloaded directly.

This is particularly useful when working with RNA-Seq data. Methods that generate FASTQ files from SRA data first create large uncompressed FASTQ files and then require a separate gzip compression step. If FASTQ.gz files can instead be downloaded directly from ENA, there is no need to create large uncompressed FASTQ files temporarily, and no additional compression step is required. This reduces temporary disk-space requirements and simplifies the overall workflow.

Running Kingfisher

Kingfisher is run from the command line. On Mac and Linux, it can be used from a Terminal. On Windows, it is convenient to run it in a Linux environment such as Ubuntu under WSL (Windows Subsystem for Linux). Because the installation procedure for Kingfisher and its conda environment depends on the operating system and local environment, you can refer to the latest official documentation or ask an AI tool such as ChatGPT for installation instructions based on your environment.

Once Kingfisher is installed, for example, the following command can be used to download FASTQ.gz files directly from ENA.

kingfisher get -r SRR1234 -m ena-ftp -f fastq.gz

For paired-end data, this will usually produce files such as SRR1234_1.fastq.gz and SRR1234_2.fastq.gz. These compressed FASTQ files can be used directly as input by many RNA-Seq analysis tools.

Download Multiple FASTQ.gz Files from a List of SRR Accessions

One useful feature of Kingfisher is that multiple SRR accessions can be provided in a text file. For example, create a file named SraAccList.txt containing one SRR accession per line, as shown below.

SRR1234
SRR1235
SRR1236
SRR1237

You can then provide this file to Kingfisher to download the FASTQ.gz files for all of the listed SRR accessions. If you obtain a list of SRR accessions from the SRA Run Selector and save it as a text file, you can easily download FASTQ files for dozens of samples with a single command.

kingfisher get --run-identifiers-list SraAccList.txt -m ena-ftp -f fastq.gz

In this way, Kingfisher allows you to download compressed FASTQ.gz files directly without first creating large uncompressed FASTQ files. It also eliminates the need for a separate gzip compression step and makes it easy to process many SRR accessions from a simple text list, so it is convenient for both small and large RNA-Seq datasets.

If Kingfisher Cannot Retrieve the FASTQ.gz Files, Use SRA Toolkit

If Kingfisher cannot directly retrieve the FASTQ.gz files because of how the data are registered or distributed, you can use the NCBI SRA Toolkit instead.

In general, fasterq-dump is recommended as a faster alternative to the older fastq-dump. However, in practice, fasterq-dump may not always run reliably in every environment. If this happens, it is worth trying the older fastq-dump, which may successfully retrieve the data when fasterq-dump does not.

Open Command Prompt, PowerShell, or a Terminal and run fasterq-dump from the bin directory of the SRA Toolkit. For example, to convert a paired-end run such as SRR1234 into FASTQ files, use:

fasterq-dump --split-files --outdir "C:Users[user name]Documentsastqdump" SRR1234

With --split-files, paired-end data are written as SRR1234_1.fastq and SRR1234_2.fastq. The --outdir option specifies the output directory, and the SRR accession at the end specifies the run to retrieve. For single-end data, --split-files is not necessary.

FASTQ files generated by fasterq-dump are not compressed. Because RNA-Seq FASTQ files can be very large, they are usually compressed in gzip format after conversion, and many RNA-Seq analysis tools can use the resulting FASTQ.gz files directly as input. However, fasterq-dump first creates large uncompressed FASTQ files, so substantially more free disk space may be required temporarily than for the final FASTQ.gz files. For this reason, Kingfisher is generally simpler when FASTQ.gz files can be downloaded directly from ENA.

If One Sample Is Split Across Multiple Runs, Combine the FASTQ Files

If multiple SRR accessions are registered for a single GSM sample, check the GEO and SRA information to determine whether they represent multiple sequencing runs from the same library. If they do, the corresponding FASTQ files can be combined as needed before analysis.

Using Windows Command Prompt

copy /b SRR1234.fastq.gz + SRR1235.fastq.gz + SRR1236.fastq.gz GSM5678.fastq.gz

Using Terminal on Mac, Linux, or WSL

cat SRR1234.fastq.gz SRR1235.fastq.gz SRR1236.fastq.gz > GSM5678.fastq.gz

For paired-end data, combine the Read 1 files separately from the Read 2 files. For example, combine SRR1234_1.fastq.gz and SRR1235_1.fastq.gz into GSM5678_1.fastq.gz, and combine SRR1234_2.fastq.gz and SRR1235_2.fastq.gz into GSM5678_2.fastq.gz.

Next Step

For the complete RNA-Seq data analysis workflow, see:
→ RNA-Seq Data Analysis Tutorial

After obtaining the FASTQ files from GEO, continue from “1-a. Importing and Processing FASTQ Files” in the tutorial.