Question: Does bowtie2 take gz input files?
0
gravatar for f.dinesh
10 months ago by
f.dinesh0
f.dinesh0 wrote:

Hi I'm trying to properly input files to bowtie2 and I'm first of all confused if bowtie2 can take fq.gz files or not? or do they need to be unizipped first (.fq)?

Thanks, Dinesh

gzip fq.gz gz gzip input bowtie2 • 1.9k views
ADD COMMENTlink modified 8 months ago by Biostar ♦♦ 20 • written 10 months ago by f.dinesh0
2

Have you tried running the command or reading the manual? What did the manual say?

ADD REPLYlink written 10 months ago by RamRS28k

Yes I did run the code with the gz files and it failed saying that there is no such directory. I unzipped the files and ran the same code and its running so I think it works. But i'm sure that it should accept gz files, the manual says it does. I'm wondering what is the difference between these pieces of code:

bowtie2 [options]* -x <bt2-idx> {-1 <m1> -2 <m2> | -U <r> | --interleaved } [-S <sam>]

and

$BT2_HOME/bowtie2 -x $BT2_HOME/example/index/lambda_virus -1 $BT2_HOME/example/reads/reads_1.fq -2 $BT2_HOME/example/reads/reads_2.fq -S eg2.sam

The top code mentions it can accept .gz or .bz2 however these did not work. I have paired read files so from my understanding m1 is R1 file and m2 is R2 file name. I don't have any unpaired reads so -U was deleted my files are also not interleaved so all thats left is this:

bowtie2 -p 4 -x atccxxxx {-1 ND_R1.fq.gz -2 ND_R2.fq.gz} [-S <sam>]

This is the code I ended up using

bowtie2 -p 4 -x atccxxxx -1 ND_Rep1_R1_val_1.fq, -2 ND_Rep1_R2_val_2.fq -S nd1sam.sam

Can anyone provide some help on why the initial commands didn't work? Thank you so much!

ADD REPLYlink modified 10 months ago • written 10 months ago by f.dinesh0
1

I'm pretty rusty with bowtie, but I'm pretty sure the braces and brackets are not meant to be taken literally. That's why your command line without them worked (though I'm surprised the comma was acceptable)

ADD REPLYlink written 10 months ago by swbarnes28.2k

Exactly thanks! The brackets were confusing me, all good now!

ADD REPLYlink written 10 months ago by f.dinesh0

did not work

That is not a sufficient explanation of what went wrong. Please tell us what you expected to happen, what happened and why you think it happened and what you think the error is.

ADD REPLYlink written 10 months ago by RamRS28k
1
gravatar for genomax
10 months ago by
genomax87k
United States
genomax87k wrote:

bowtie2 can use gzipped files for alignment (for reference my version is 2.3.4.1)

ADD COMMENTlink written 10 months ago by genomax87k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1811 users visited in the last hour