# Downloading Sequencing Data From the Sequence Read Archive


## Key Takeaways

- Access SRA data using hierarchical accession types: Study (SRP/ERP), Sample (SRS/ERS), Experiment (SRX/ERX), and Run (SRR/ERR), with ENA using analogous prefixes.
- Utilize NCBI Run Selector or ENA Browser to identify and filter datasets based on sample attributes, library layout, platform, and byte size to retrieve relevant metadata files (SraRunTable.txt).
- Employ the SRA Toolkit's `prefetch` and `fasterq-dump` commands for reliable download and conversion to FASTQ format, or consider Aspera for large-scale transfers.
- Verify downloaded data integrity by comparing MD5 checksums provided by SRA/ENA against computed checksums using `vdb-validate` or `md5sum`.
- Plan for substantial storage requirements (5-30 GB per RNA-seq sample) and compress FASTQ files using `gzip` or `pigz` to optimize space.
- Ensure responsible data reuse by citing the primary study accession (SRP/ERP) and respecting any data use embargo periods.

---

If you need to obtain raw high-throughput sequencing data for reanalysis or method development, the Sequence Read Archive (SRA) at NCBI is the primary public repository. This guide walks you through downloading those data efficiently and correctly. It is written for bioinformaticians, students, and wet-lab researchers who have basic command-line familiarity and need to transfer SRA files to their local or cloud environment. You can start by visiting the [NCBI Sequence Read Archive](https://www.ncbi.nlm.nih.gov/sra) to explore available datasets.

The process involves understanding accession codes, locating the correct files, choosing between several download tools, verifying data integrity, and planning for storage. Official training from [EMBL-EBI Training](https://www.ebi.ac.uk/training/) offers complementary material for European data sources. This guide provides a practical, step-by-step approach grounded in authoritative resources.

## At a Glance

| Aspect | Key Point |
|--------|-----------|
| **Accession types** | Study (SRP/ERP), Sample (SRS/ERS), Experiment (SRX/ERX), Run (SRR/ERR) |
| **Metadata** | Use NCBI Run Selector or ENA Browser to find samples and conditions |
| **Download methods** | SRA Toolkit (`prefetch`, `fasterq-dump`), Aspera, or Galaxy workflows |
| **Integrity** | Always verify MD5 checksums provided by SRA or ENA |
| **Storage** | Plan 5-30 GB per RNA-seq sample, compress FASTQ with gzip |
| **Reuse** | Cite the primary accession and respect data use embargoes |

## Understanding SRA Accession Types

Every dataset in SRA is organized hierarchically. A **Study** accession (e.g., SRP123456) groups all samples and experiments. A **Sample** accession (SRS) identifies the biological source. An **Experiment** accession (SRX) describes a specific sequencing assay. The actual sequence data are stored as **Run** accessions (SRR) for a single sequencing run or **Run Set** (SRZ) for large studies. European Bioinformatics Institute (ENA) uses analogous prefixes: ERP, ERS, ERX, ERR.

Knowing this structure helps you request exactly the files you need. For example, to download all runs from a study, you use the study accession. The [NCBI Bookshelf](https://www.ncbi.nlm.nih.gov/books/) provides detailed explanations of these identifiers in the SRA documentation.

## Finding and Interpreting Metadata

Before downloading, you must understand which runs correspond to your conditions of interest. The NCBI Run Selector is the most common starting point. Enter a study accession, and the table shows sample attributes, library layout, platform, and byte sizes. You can filter by column values and download a metadata file (SraRunTable.txt). For data hosted at ENA, the [EMBL-EBI Training](https://www.ebi.ac.uk/training/) materials explain how to use the ENA Browser to retrieve similar metadata.

Make sure to check library design: single end versus paired end, strandedness, and read length. These details affect downstream processing. Tools like `q2-fondue` can also automate metadata acquisition and integration, as described in a [reproducibility-focused publication](https://pubmed.ncbi.nlm.nih.gov/36130056/). Always record the accession numbers of all selected runs for your analysis records.

## Choosing a Download Method

Several download methods exist, each with its own tradeoffs.

**SRA Toolkit command line** is the most reliable method. Install the toolkit from NCBI, then use `prefetch` to download SRA files and `fasterq-dump` to convert them to FASTQ format. For example: `prefetch SRR123456` and then `fasterq-dump SRR123456`. The toolkit automatically handles decompression and split files for paired-end reads. The [Galaxy Training Network](https://training.galaxyproject.org/) offers interactive tutorials on using SRA Toolkit within Galaxy workflows.

**Aspera** is a faster alternative for large datasets. If you have Aspera Connect installed, you can use `ascp` with SRA's dedicated endpoint. This method is often used in high-performance computing environments.

**Graphical and programmatic options** exist. The R/Bioconductor package `SRAdb` allows querying and downloading directly from R. For those using QIIME 2, the `q2-fondue` plugin provides guided acquisition, as noted in the [q2-fondue publication](https://pubmed.ncbi.nlm.nih.gov/36130056/). Another tool, `COMMAND>_`, described in [this transcriptomic data integration paper](https://pubmed.ncbi.nlm.nih.gov/30691411/), assists with downloading and organizing data from multiple repositories.

**Cloud and mirror sites** can be used. The AWS Open Data program hosts SRA data in S3, you can use `aws s3 cp` or `wget` on the corresponding URLs. ENA provides FTP downloads for many runs.

**Recommendation**: Use `fasterq-dump` for most scenarios. It is actively maintained and produces standard FASTQ files. For very large projects, consider Aspera or cloud direct download to avoid timeouts.

## Ensuring Data Integrity

After downloading, verify that the file is not corrupted. NCBI provides MD5 checksums for every SRA file. After running `prefetch`, you can check the `.sra` file integrity using `vdb-validate SRR123456`. This command recomputes the checksum and compares it to the stored value in the SRA metadata. For FASTQ files produced by `fasterq-dump`, you should also compare the size and read count against the information in the Run Selector. The [NCBI Bookshelf](https://www.ncbi.nlm.nih.gov/books/) contains the official documentation for validation commands.

If you use ENA downloads, the FTP site provides `.md5` files. Use `md5sum` on Linux or `certutil` on Windows to verify.

## Planning Storage and Organization

Sequencing data are large. A single RNA-seq run (30 million paired-end reads, 100 bp) is roughly 6 GB compressed. A project with 100 runs needs 600 GB. Plan your storage accordingly. Compress FASTQ files with `gzip` or `pigz` to reduce space by about 60%.

Organize your files by study and run. For example:
```
data/SRP123456/
   metadata/
   raw/
      SRR123456_1.fastq.gz
      SRR123456_2.fastq.gz
   alignment/
```
Keep a manifest file listing each run accession, its original download date, and the tool used. This practice supports reproducibility. The [Bioinformatics training from Bioconductor](https://bioconductor.org/) offers guidance on file organization within analysis projects.

## Responsible Reuse and Citation

When you reuse public data, you must credit the original authors. Cite the study accession (SRP/ERP) and, if possible, the associated publication. Many studies have embargo periods, check the release date in the SRA record. Do not redistribute raw data, but you may share derived files (e.g., count matrices) with proper attribution. The [NCBI Sequence Read Archive](https://www.ncbi.nlm.nih.gov/sra) includes data use policies for each study.

## Common Mistakes

- **Downloading the wrong run**: Always verify that the run matches your experimental condition. Use metadata filters.
- **Using `fastq-dump` instead of `fasterq-dump`**: The older `fastq-dump` is slower and may produce incorrect split files for paired-end data. Use the newer `fasterq-dump`.
- **Ignoring checksums**: Skipping validation can lead to using corrupted files and wasted downstream analysis.
- **Not planning for disk space**: Running out of storage mid-download causes incomplete files. Check available space and use streaming or chunking if needed.
- **Assuming all data are in SRA**: Some datasets are only in ENA or DDBJ. Use meta-search tools like NCBI's global query.
- **Mixing paired-end read files**: Ensure that `_1` and `_2` files correspond correctly. Use `fasterq-dump --split-files` to produce properly ordered pairs.

## Limits and Uncertainty

SRA data are not always consistent. Some older submissions may lack metadata or have incorrect library layouts. The SRA Toolkit occasionally changes its API or command syntax, so always check the current version. Download speeds can be slow for large studies, consider using mirrors or Aspera. Not all data are available for direct download due to controlled access (e.g., human genomic data requiring dbGaP authorization). In such cases, apply for access through the appropriate portal. Finally, cloud-hosted copies may lag behind the main repository, so verify you have the latest version.

## Frequently Asked Questions

**1. How do I download only paired-end reads from a study?**
Use the Run Selector to filter by Library Layout equal to "PAIRED". Then download the list of SRR accessions and pass them to `prefetch`. When you run `fasterq-dump`, use the `--split-files` option to get separate `_1` and `_2` FASTQ files.

**2. What is the difference between `prefetch` and `fasterq-dump`?**
`prefetch` downloads the SRA binary file (`.sra`) to your cache. It does not convert to FASTQ. `fasterq-dump` reads the SRA file and writes FASTQ output, optionally compressing it. You can run `fasterq-dump` directly on an accession without first running `prefetch`, but it will download the data on the fly if not cached.

**3. Can I download SRA data from a European mirror?**
Yes. The European Nucleotide Archive (ENA) hosts copies of most SRA data. You can use their API or FTP to download FASTQ files directly, often faster than from NCBI. The EMBL-EBI Training resources explain how to use ENA's download services.

**4. How do I verify that a download is complete without checksums?**
You can compare the number of reads in the FASTQ file to the "spots" count listed in the SRA Run Selector metadata. Use `wc -l` and divide by 4 (for single end) or by 8 (for paired end) to get the read count. This method is less reliable than checksum validation but provides a quick sanity check.

## Related Clinical & Scientific Guides

* [Observational vs. Experimental Studies: How to Tell Them Apart](/blog/guides/observational-vs-experimental-studies-how-to-tell-them-apart)
* [Astrocyte Single Cell Rna Seq](/blog/guides/astrocyte-single-cell-rna-seq)
* [Structural Genes](/blog/guides/structural-genes)


## References and Further Reading

- [NCBI Bookshelf](https://www.ncbi.nlm.nih.gov/books/) , Official SRA documentation and command reference.
- [EMBL-EBI Training](https://www.ebi.ac.uk/training/) , Tutorials on European data access and metadata retrieval.
- [Galaxy Training Network](https://training.galaxyproject.org/) , Hands-on workflows for downloading and processing SRA data.
- [Bioconductor](https://bioconductor.org/) , R packages like `SRAdb` and `ShortRead` for programmatic access.
- [NCBI Sequence Read Archive](https://www.ncbi.nlm.nih.gov/sra) , Primary repository, start here to search for datasets.
- [q2-fondue publication](https://pubmed.ncbi.nlm.nih.gov/36130056/) , Reproducible acquisition and management of nucleotide sequence metadata.
- [COMMAND>\_ publication](https://pubmed.ncbi.nlm.nih.gov/30691411/) , Transcriptomic data acquisition and integration tool.

## Related Articles

- [RNA Sequencing Analysis: From FASTQ Files to Biological Questions](/blog/guides/rna-sequencing-analysis-from-fastq-files-to-biological-questions)
- [RNA-seq Quality Control: What to Check Before Differential Expression](/blog/guides/rna-seq-quality-control-what-to-check-before-differential-expression)
- [How to Plan a Bulk RNA-seq Differential Expression Study](/blog/guides/how-to-plan-a-bulk-rna-seq-differential-expression-study)
- [Single-Cell RNA-seq Workflow: A Practical Analysis Roadmap](/blog/guides/single-cell-rna-seq-workflow-a-practical-analysis-roadmap)
- [Single-Cell RNA-seq Quality Control: Cells, Genes, and Mitochondrial Reads](/blog/guides/single-cell-rna-seq-quality-control-cells-genes-and-mitochondrial-reads)