Question: question about Bowtie2 command
2
gravatar for biolab
4.9 years ago by
biolab1.1k
biolab1.1k wrote:

Hi, everyone,

I am running Bowtie2 to get mapped reads as well as unmapped reads.  The following command gives mapped reads:

bowtie2 -x rRNA -U file.fq -S file.sam

And the below command gives unmapped reads:

bowtie2 -x rRNA -U file.fq --un file_filtered.fq

How to run one command to get both mapped and unmapped reads? THANK YOU!

bowtie2 • 3.2k views
ADD COMMENTlink modified 4.9 years ago by Devon Ryan92k • written 4.9 years ago by biolab1.1k
1
gravatar for Devon Ryan
4.9 years ago by
Devon Ryan92k
Freiburg, Germany
Devon Ryan92k wrote:
bowtie2 --un file_filtered.fq -x rRNA -U file.fq -S file.sam

Though keep in mind that the SAM file will have unmapped reads too, since you didn't specify --no-unal.

ADD COMMENTlink written 4.9 years ago by Devon Ryan92k
1
Hi Devon, thanks a lot!  My understanding is: in your command, the file.sam has both mapped and unmapped reads information. If I only want mapped reads information, I just add --no-unal option.  Is my understanding right? I just make it sure. THANKS!
ADD REPLYlink modified 4.9 years ago • written 4.9 years ago by biolab1.1k
2

In both yours and mine it'll have both mapped and unmapped alignments. If you just want the mapped alignments in it then bowtie2 --no-unal --un file_filtered.fq -x rRNA -U file.fq -S file.sam should work.

ADD REPLYlink written 4.9 years ago by Devon Ryan92k
1

Hi Devon, Thanks a lot!

ADD REPLYlink written 4.9 years ago by biolab1.1k
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: 1293 users visited in the last hour