# NCBI SRA Fastq (convert SRA files from GEO into fastq files)

**URL:** <https://help.galaxyproject.org/t/ncbi-sra-fastq-convert-sra-files-from-geo-into-fastq-files/6159>\
**Category:** usegalaxy.org support\
**Tags:** metadata, sra, quality-control\
**Created:** [June 9, 2021, 5:02pm UTC](https://help.galaxyproject.org/t/ncbi-sra-fastq-convert-sra-files-from-geo-into-fastq-files/6159 "2021-06-09T17:02:43Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![ysrbrs](https://avatars.discourse-cdn.com/v4/letter/y/f05b48/32.png) [@ysrbrs](https://help.galaxyproject.org/u/ysrbrs)\
**Post date:** [June 9, 2021, 5:02pm UTC](https://help.galaxyproject.org/t/ncbi-sra-fastq-convert-sra-files-from-geo-into-fastq-files/6159/1 "2021-06-09T17:02:43Z")

</div>

Hello,

I want to convert SRA files from GEO into fastq files in order to map them on the genome. I have uploaded SRA files directly on Galaxy but it does not seem to be the right thing to do.

Now, I’m going through the instructions on the support page of Galaxy: [NCBI SRA Fastq](https://galaxyproject.org/support/ncbi-sra-fastq/#:~:text=Prior%20to%20importing,to%20each%20condition)

It asks to manipulate the file before importing to Galaxy but I cannot see mentioned tools on the NCBI SRA Run Selector page (highlighted above). Is there a more detailed explanation or tutorial to follow because the link I shared seems to be the thing I need but it is not very clear to me how to proceed.

Thank you.

---

<div class="post-metadata">

**Author:** ![David](https://sea2.discourse-cdn.com/flex020/user_avatar/help.galaxyproject.org/david/32/7031_2.png) [@David](https://help.galaxyproject.org/u/David)\
**Post date:** [June 9, 2021, 6:18pm UTC](https://help.galaxyproject.org/t/ncbi-sra-fastq-convert-sra-files-from-geo-into-fastq-files/6159/2 "2021-06-09T18:18:25Z")

</div>

@ysrbrs,

First you isolate the IDs:

> Organizing metadata
> 
> The “RunInfo Table” provides the experimental condition and replicate structure of all of the samples. Prior to importing the data, we need to parse this file into individual files that contain the sample IDs of the replicates in each condition. This can be achieved by using a combination of the ‘group’, ‘compare two datasets’, ‘filter’, and ‘cut’ tools **to end up with single column lists of sample IDs (SRRxxxxx) corresponding to each condition.**

Then you import IDs with [Download and Extract Reads in FASTA/Q](https://usegalaxy.org/root?tool_id=toolshed.g2.bx.psu.edu/repos/iuc/sra_tools/fastq_dump/2.10.9+galaxy0); which corresponds to `NCBI SRA Tools (fastq-dump)`:

> **What it does?**
> 
> This tool extracts data (in [fastq](https://en.wikipedia.org/wiki/FASTQ_format) format) from the Short Read Archive (SRA) at the National Center for Biotechnology Information (NCBI). It is based on the [fastq-dump](https://ncbi.github.io/sra-tools/fastq-dump.html) utility of the SRA Toolkit.

---

<div class="post-metadata">

**Author:** ![ysrbrs](https://avatars.discourse-cdn.com/v4/letter/y/f05b48/32.png) [@ysrbrs](https://help.galaxyproject.org/u/ysrbrs)\
**Post date:** [June 10, 2021, 7:33am UTC](https://help.galaxyproject.org/t/ncbi-sra-fastq-convert-sra-files-from-geo-into-fastq-files/6159/3 "2021-06-10T07:33:11Z")

</div>

Thank you for your reply!

I have done what’s recommended but now I have 18 individual fastqsanger.gz files but I want to group them by condition, replica. I have 6 different conditions with 3 replicates each.

Any tutorial advice on how to do it? It would be more organized this way before going with trimming and alignment etc. In addition, I have to do the same analysis with a much bigger dataset so I would be happy to learn it.

---

<div class="post-metadata">

**Author:** ![ysrbrs](https://avatars.discourse-cdn.com/v4/letter/y/f05b48/32.png) [@ysrbrs](https://help.galaxyproject.org/u/ysrbrs)\
**Post date:** [June 10, 2021, 7:42am UTC](https://help.galaxyproject.org/t/ncbi-sra-fastq-convert-sra-files-from-geo-into-fastq-files/6159/4 "2021-06-10T07:42:33Z")

</div>

[https://galaxyproject.org/tutorials/collections/](https://galaxyproject.org/tutorials/collections/)

This tutorial has not been helpful because my fastqsanger.gz files aren’t directly on the history pane but inside a folder “Single-end data (fasterq-dump)”. That is why I cannot see check box on upper right as shown on the link.

---

<div class="post-metadata">

**Author:** ![David](https://sea2.discourse-cdn.com/flex020/user_avatar/help.galaxyproject.org/david/32/7031_2.png) [@David](https://help.galaxyproject.org/u/David)\
**Post date:** [June 10, 2021, 2:57pm UTC](https://help.galaxyproject.org/t/ncbi-sra-fastq-convert-sra-files-from-geo-into-fastq-files/6159/5 "2021-06-10T14:57:37Z")

</div>

@ysrbrs, you understand that the datasets are organized by collections?  
Can you please paste a screenshot so we can see how your history looks like?

---

<div class="post-metadata">

**Author:** ![gallardoalba](https://sea2.discourse-cdn.com/flex020/user_avatar/help.galaxyproject.org/gallardoalba/32/1903_2.png) [@gallardoalba](https://help.galaxyproject.org/u/gallardoalba)\
**Post date:** [June 14, 2021, 6:08pm UTC](https://help.galaxyproject.org/t/ncbi-sra-fastq-convert-sra-files-from-geo-into-fastq-files/6159/6 "2021-06-14T18:08:34Z")

</div>

Hi @ysrbrs,  
probably in that case, the faster way would be to upload the datasets in groups, according to your replicates/conditions.

Regards

---

<div class="post-metadata">

**Author:** ![jennaj](https://sea2.discourse-cdn.com/flex020/user_avatar/help.galaxyproject.org/jennaj/32/27_2.png) [@jennaj](https://help.galaxyproject.org/u/jennaj)\
**Post date:** [June 14, 2021, 6:30pm UTC](https://help.galaxyproject.org/t/ncbi-sra-fastq-convert-sra-files-from-geo-into-fastq-files/6159/7 "2021-06-14T18:30:13Z")

</div>

Hi @ysrbrs

That FAQ is intended to help resolve issues around format variations – after the data is in Galaxy. The collections GTN tutorial is an overview of the ways to manipulate data in collections.

@David is correct about the output of the collection from this tool, and the advice from @gallardoalba is a good simple way to get your data organized at the start.

Should you want to explore advanced methods to download data in a structured format from the very start, see the GTN tutorials here under the section _Uploading Data_ – the two about the “Rule Based Uploader” are what you will be doing, and the one above it provides context and the one below it demonstrates usage in the context of a practical example. Many other tutorials cover the Upload/Collection functions – use the search at that site to find them. Even it is not exactly your use case, can still be helpful.

> **[Galaxy Training: Using Galaxy and Managing your Data](https://training.galaxyproject.org/training-material/topics/galaxy-interface/)**
>
> A collection of microtutorials explaining various feature...

---

<div class="post-metadata">

**Author:** ![ysrbrs](https://avatars.discourse-cdn.com/v4/letter/y/f05b48/32.png) [@ysrbrs](https://help.galaxyproject.org/u/ysrbrs)\
**Post date:** [June 22, 2021, 1:57pm UTC](https://help.galaxyproject.org/t/ncbi-sra-fastq-convert-sra-files-from-geo-into-fastq-files/6159/8 "2021-06-22T13:57:18Z")

</div>

Dear all, @David @gallardoalba

Thank you for your responses. I somehow did not see these messages. Sorry for the late reply.

I figured out that, in Galaxy, it’s easier to merge multiple files into a data collection, than splitting a collection into multiple files.

So, I uploaded multiple Acc\_List.txt in groups depending on the condition. Each contained only three (replicates) SRA Run accessions for each sample.
