Announcement

Collapse

Welcome to the New Seqanswers!

Welcome to the new Seqanswers! We'd love your feedback, please post any you have to this topic: New Seqanswers Feedback.
See more
See less

How convert multiple .sra files into .fastq in one go?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • How convert multiple .sra files into .fastq in one go?

    Hi all,

    I have hundreds of .sra files of a genome re-sequencing project which I downloaded from the NCBI sequence read archive. Does anyone know a quick way of converting them into fastq files? With the SRA toolkit it seems to work with only one file at the time:

    ../bin64/fastq-dump -A <SRR_accession> -D <Path_to_SRR_Directory> -O <Output_Path>

    Many thanks for your suggestions!

  • #2
    bash scripts 4tw

    Assuming you're running bash (otherwise the syntax might be slightly different):

    Code:
    for fn in *.sra
    do
    ../bin64/fastq-dump $fn
    done
    This will take all *.sra files in the current directory and convert them into corresponding fasta-files.

    If you are on a powerful machine you might want to add an & to the end of the call to fastq-dump in order to start all of this simultaneously (risking angry glares from other users and/or the admin once the machine crashes ).

    Cheers,
    Paul

    "You are only young once, but you can stay immature indefinitely."

    Comment


    • #3
      This is great! Thanks a lot! I'll check what my machine can do ;-)

      Comment


      • #4
        many samples?

        Hi TuA,

        Can I ask if the data that you downloaded, is from multiple samples or it's just one sample? The reason for this question is that I am looking for NGS datasets with multiple samples, ideally from 2 different phenotypes. And “hundreds of .sra files of a genome re-sequencing project” gave me hope for finding many samples

        Thank you!

        Comment


        • #5
          Hi tldgID

          Sorry for not responding earlier. I'm afraid I don't think the data will be of use for you. I actually downloaded data from different projects on mammals but with only 1-2 samples per species and no phenotype info...

          I guess you checked the experiments/studies on SRA?

          Comment


          • #6
            Hi tldgID

            Sorry for not responding earlier. I'm afraid I don't think the data will be of use for you. I actually downloaded data from different projects on mammals but with only 1-2 samples per species and no phenotype info...

            I guess you checked the experiments/studies on SRA?

            Comment

            Working...
            X