SEQanswers

Go Back   SEQanswers > Bioinformatics > Bioinformatics



Similar Threads
Thread Thread Starter Forum Replies Last Post
Recover corrupt illumna fastq gzip file rnathg Bioinformatics 0 01-24-2012 06:46 PM
Conversion from bcl format to fastq files kjaja Bioinformatics 5 09-14-2011 07:13 AM
New to next gen: read format help kapoormanav Illumina/Solexa 2 07-08-2010 12:09 PM
help, the SOAPsnp input files format ptong7 Bioinformatics 1 06-08-2010 11:05 AM
What does NS:i:1 means in the .sam format files? Gangcai Bioinformatics 2 04-20-2010 10:51 AM

Reply
 
Thread Tools
Old 12-30-2011, 05:51 PM   #1
yumtaoist
Member
 
Location: lanzhou

Join Date: Dec 2011
Posts: 10
Default Bowtie2 cannot read gzip format files

Hey, everyone!

The help document of bowtie2 have said that the files of reads could be gzip'ed.

When I use the paired reads and try the argument ( -1 <m1> -2 <m2>), the bowtie2 can read the gzip'ed files.

However, if I use the gzip'ed unpaired reads and apply the argument (-U <r>), the bowtie2 suggest that "Error: reads file does not look like a FASTQ file". The gzip'ed file can not be recognized.

Does anyone have come up with this problem?

Thank You!
yumtaoist is offline   Reply With Quote
Old 01-20-2012, 07:31 AM   #2
earonesty
Member
 
Location: United States of America

Join Date: Mar 2011
Posts: 52
Default

# HOW to add GUNZIP support to ANY program that doesn't have it:

mkfifo file1.fifo
mkfifo file2.fifo
gunzip file1.gz > file.fifo &
gunzip file2.gz > file.fifo &
bowtie -1 file1.fifo -2 file2.fifo
earonesty is offline   Reply With Quote
Old 01-20-2012, 04:12 PM   #3
yumtaoist
Member
 
Location: lanzhou

Join Date: Dec 2011
Posts: 10
Smile

Quote:
Originally Posted by earonesty View Post
# HOW to add GUNZIP support to ANY program that doesn't have it:

mkfifo file1.fifo
mkfifo file2.fifo
gunzip file1.gz > file.fifo &
gunzip file2.gz > file.fifo &
bowtie -1 file1.fifo -2 file2.fifo
Thank You Very Much!

This is very useful!
yumtaoist is offline   Reply With Quote
Old 01-21-2012, 04:11 PM   #4
gringer
David Eccles (gringer)
 
Location: Wellington, New Zealand

Join Date: May 2011
Posts: 838
Default

Quote:
Originally Posted by earonesty View Post
# HOW to add GUNZIP support to ANY program that doesn't have it:

mkfifo file1.fifo
mkfifo file2.fifo
gunzip file1.gz > file.fifo &
gunzip file2.gz > file.fifo &
bowtie -1 file1.fifo -2 file2.fifo
In many cases this will work, but not all cases. This doesn't work for programs that attempt to seek through files (low-memory fastq randomisation being one example that I've recently seen).
gringer is offline   Reply With Quote
Old 01-31-2012, 04:09 PM   #5
dsenalik
Carrot Scientist
 
Location: Madison WI USA

Join Date: Nov 2009
Posts: 42
Default

I needed to add a "-c" to that command, otherwise gunzip will delete the original compressed file, i.e.
Code:
mkfifo file1.fifo
mkfifo file2.fifo
gunzip -c file1.gz > file1.fifo &
gunzip -c file2.gz > file2.fifo &
dsenalik is offline   Reply With Quote
Old 02-18-2014, 06:40 AM   #6
earonesty
Member
 
Location: United States of America

Join Date: Mar 2011
Posts: 52
Default

Quote:
Originally Posted by dsenalik View Post
I needed to add a "-c" to that command, otherwise gunzip will delete the original compressed file, i.e.
Code:
mkfifo file1.fifo
mkfifo file2.fifo
gunzip -c file1.gz > file1.fifo &
gunzip -c file2.gz > file2.fifo &


this patch fixes fifo support, and also adds built-in gzip support to bowtie 1.0 (which remains the fastest, fastq->sam program out there)

https://github.com/earonesty/bowtie
earonesty is offline   Reply With Quote
Old 02-18-2014, 12:34 PM   #7
westerman
Rick Westerman
 
Location: Purdue University, Indiana, USA

Join Date: Jun 2008
Posts: 1,104
Default

FYI, zcat is often a shortcut to 'gunzip -c'

Also under BASH you should be able do something like:

bowtie -1 <( zcat file1.gz ) -2 <( zcat file2.gz )

or in the original posters question

bowtie2 -U <( zcat file.gz )
westerman is offline   Reply With Quote
Old 02-27-2014, 09:10 AM   #8
earonesty
Member
 
Location: United States of America

Join Date: Mar 2011
Posts: 52
Default

actually there's a bug in bowtie ... a race condition that can make it unreliable. you should not use fifo's unless you used the patched version that supports them

https://github.com/earonesty/bowtie
earonesty 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 09:29 PM.


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