Unconfigured Ad

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • shilo
    Junior Member
    • Sep 2011
    • 3

    merging fastq files

    Hi all,

    We have recently got the fastq files from our RNA-seq experiments. For each treatment we got many fastq file (1Gb each). I'm looking for a way to merge these file before running the analysis (Tophat).

    Thanks,
    Shilo
  • upendra_35
    Senior Member
    • Apr 2010
    • 102

    #2
    Shilo,

    Either you can use 'cat' to merge all fastq files:

    cat file1.fq file2.fq file3.fq file4.fq file5.fq > merged.fq

    cat file*.fq > merged.fq

    OR

    Tophat can take them all without merging:

    tophat [options] <index> <file1_1, file2_1, etc...> <file1_2,file2_2, etc...>

    Hope this helps.....

    Comment

    • shilo
      Junior Member
      • Sep 2011
      • 3

      #3
      Thanks, its work.
      Just to make sure, by using cat it creats one file that merged the previous files and order the data of one file after the other??

      Thanks,
      Shilo

      Comment

      • arkal
        advancing one byte at a time!
        • Jun 2011
        • 56

        #4
        Originally posted by shilo View Post
        Thanks, its work.
        Just to make sure, by using cat it creats one file that merged the previous files and order the data of one file after the other??

        Thanks,
        Shilo
        if u do what he said :

        Originally posted by upendra_35 View Post
        Shilo,


        cat file1.fq file2.fq file3.fq file4.fq file5.fq > merged.fq

        cat file*.fq > merged.fq
        then merged.fq will contain all data from file1.fq, file2.fq, file3.fq, file4.fq and file5.fq in that order. Basically you are printing those 5 in that order into file merged.fq instead of onto the terminal.
        Hope that answers your question!

        -A

        Comment

        • shilo
          Junior Member
          • Sep 2011
          • 3

          #5
          Yes, Thanks a lot

          Comment

          • Lovro
            Member
            • Mar 2015
            • 19

            #6
            This preserves the original files. Can I rather append the second file to the first, to conserve disk space ?

            Comment

            • Brian Bushnell
              Super Moderator
              • Jan 2014
              • 2709

              #7
              If you want to conserve disk space, I recommend gzipping the files, and deleting the originals.

              Comment

              • Lovro
                Member
                • Mar 2015
                • 19

                #8
                I was working on a virtual machine and had only cca 100gb left on the hdd. I have 2 WGS fastq.gz with 50gb each... I solved the problem by allocating extra hdd space to the virtual machine, but I would be nice to know a proven method to append or concatenate fastq.gz-s without temporarily needing extra hdd space.

                Comment

                • Brian Bushnell
                  Super Moderator
                  • Jan 2014
                  • 2709

                  #9
                  I've wanted something like that too (for time rather than space reasons), but I don't think it's possible.

                  However, there are a lot of programs that will let you stream from standard in without writing to disk:

                  Code:
                  cat *.fastq.gz | program

                  Comment

                  Latest Articles

                  Collapse

                  • SEQadmin2
                    From Collection to Sequencing: Why Sample Preparation and Preservation Define Sequencing Data
                    by SEQadmin2


                    Data variability is still an issue in sequencing technologies despite the advances in reproducibility and accuracy of these platforms. But the problem does not originate in the sequencing itself, but in the previous steps, before the sample reaches the sequencer.


                    The first step is collection, followed by preservation and sample preparation for analysis. Most scientists overlook those steps, but not being careful might just be skewing the experiment’s results.
                    ...
                    Yesterday, 10:05 AM
                  • SEQadmin2
                    Single-Cell Sequencing at an Inflection Point: Early Impacts of New Platforms and Emerging Trends
                    by SEQadmin2


                    With the launch of new single-cell sequencing platforms in 2026, the field stands at an exciting inflection point. This article surveys the most impactful advances in the field and discusses how they’re reshaping research in cancer, immunology, and beyond.


                    Introduction

                    Single-cell sequencing technologies have undergone remarkable advances over the past decade, transitioning from low-throughput experimental approaches to highly scalable platforms capable of...
                    05-22-2026, 06:42 AM
                  • SEQadmin2
                    Environmental Genomics in the Age of NGS: From Microbes to Conservation Strategies
                    by SEQadmin2

                    Studying ecosystems means dealing with complex, multi-species communities that are hard to observe at scale. This complexity, however, hides many important questions to be answered, from how biogeochemical cycles work and how climate change can affect species distribution to how conservation strategies can work best.


                    Genomics, particularly since the expansion of NGS, has transformed ecosystem ecology. By sequencing environmental DNA, we can now assess biodiversity without direct...
                    05-06-2026, 09:04 AM

                  ad_right_rmr

                  Collapse

                  News

                  Collapse

                  Topics Statistics Last Post
                  Started by SEQadmin2, Yesterday, 12:03 PM
                  0 responses
                  19 views
                  0 reactions
                  Last Post SEQadmin2  
                  Started by SEQadmin2, Yesterday, 11:40 AM
                  0 responses
                  14 views
                  0 reactions
                  Last Post SEQadmin2  
                  Started by SEQadmin2, 05-28-2026, 11:40 AM
                  0 responses
                  29 views
                  0 reactions
                  Last Post SEQadmin2  
                  Started by SEQadmin2, 05-26-2026, 10:12 AM
                  0 responses
                  31 views
                  0 reactions
                  Last Post SEQadmin2  
                  Working...