SEQanswers

Go Back   SEQanswers > Sequencing Technologies/Companies > Illumina/Solexa



Similar Threads
Thread Thread Starter Forum Replies Last Post
Merging bam files memento Bioinformatics 1 02-17-2012 03:39 PM
Merging vcf files kjaja Bioinformatics 0 01-12-2012 11:06 AM
merging many bam files-novice needs help please shawpa Bioinformatics 2 01-06-2012 08:03 AM
merging VCF files kjaja Bioinformatics 2 12-20-2011 06:50 AM
merging 2 sam files papori Bioinformatics 0 07-29-2011 04:44 AM

Reply
 
Thread Tools
Old 09-18-2011, 04:53 AM   #1
shilo
Junior Member
 
Location: israel

Join Date: Sep 2011
Posts: 3
Default 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
shilo is offline   Reply With Quote
Old 09-18-2011, 12:55 PM   #2
upendra_35
Senior Member
 
Location: USA

Join Date: Apr 2010
Posts: 102
Default

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.....
upendra_35 is offline   Reply With Quote
Old 09-19-2011, 12:35 AM   #3
shilo
Junior Member
 
Location: israel

Join Date: Sep 2011
Posts: 3
Default

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
shilo is offline   Reply With Quote
Old 09-19-2011, 01:59 AM   #4
arkal
advancing one byte at a time!
 
Location: Bangalore, India

Join Date: Jun 2011
Posts: 56
Default

Quote:
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 :

Quote:
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
arkal is offline   Reply With Quote
Old 09-19-2011, 02:08 AM   #5
shilo
Junior Member
 
Location: israel

Join Date: Sep 2011
Posts: 3
Default

Yes, Thanks a lot
shilo is offline   Reply With Quote
Old 07-06-2016, 02:15 AM   #6
Lovro
Member
 
Location: Slovenia

Join Date: Mar 2015
Posts: 19
Default

This preserves the original files. Can I rather append the second file to the first, to conserve disk space ?
Lovro is offline   Reply With Quote
Old 07-06-2016, 10:08 AM   #7
Brian Bushnell
Super Moderator
 
Location: Walnut Creek, CA

Join Date: Jan 2014
Posts: 2,707
Default

If you want to conserve disk space, I recommend gzipping the files, and deleting the originals.
Brian Bushnell is offline   Reply With Quote
Old 07-06-2016, 01:10 PM   #8
Lovro
Member
 
Location: Slovenia

Join Date: Mar 2015
Posts: 19
Default

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.
Lovro is offline   Reply With Quote
Old 07-06-2016, 01:15 PM   #9
Brian Bushnell
Super Moderator
 
Location: Walnut Creek, CA

Join Date: Jan 2014
Posts: 2,707
Default

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
Brian Bushnell is offline   Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off




All times are GMT -8. The time now is 07:41 AM.


Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2018, vBulletin Solutions, Inc.
Single Sign On provided by vBSSO