Unconfigured Ad

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

    #1

    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
                    16S/ITS Profiling vs. Shotgun Metagenomics: What Changes in Your Workflow?
                    by SEQadmin2




                    NGS has revolutionized clinical microbiology by offering new ways to identify and surveil pathogens without prior knowledge of the target. One popular approach is 16S rRNA and ITS amplicon sequencing, which targets specific microbial markers. But studies are increasingly incorporating shotgun metagenomics, a technique that sequences all DNA from a sample without targeting specific microbial markers. This approach allows more detailed taxonomic classification, detection...
                    Today, 06:46 AM
                  • SEQadmin2
                    Multiomic Liquid Biopsy: What DNA/RNA Panels Reveal That DNA Alone Can’t
                    by SEQadmin2



                    Tumors contain complex mixtures of cell populations that evolve in response to treatment and host-specific factors. Tissue biopsies provide only static snapshots of a tumor’s state. But what if we could follow that evolution over time using a minimally invasive technique?

                    Liquid biopsies can detect tumor-derived material circulating in the bloodstream, providing a way to study treatment response, detect emerging resistance, and discover new biomarkers. Circulating
                    ...
                    10-14-2026, 09:55 AM

                  ad_right_rmr

                  Collapse

                  News

                  Collapse

                  Topics Statistics Last Post
                  Started by SEQadmin2, 10-28-2026, 09:57 AM
                  0 responses
                  22 views
                  0 reactions
                  Last Post SEQadmin2  
                  Started by SEQadmin2, 10-28-2026, 09:51 AM
                  0 responses
                  14 views
                  0 reactions
                  Last Post SEQadmin2  
                  Started by SEQadmin2, 10-22-2026, 11:13 AM
                  0 responses
                  68 views
                  0 reactions
                  Last Post SEQadmin2  
                  Started by SEQadmin2, 10-22-2026, 10:48 AM
                  0 responses
                  48 views
                  0 reactions
                  Last Post SEQadmin2  
                  Working...