question about Bowtie2 command
1
2
Entering edit mode
9.4 years ago
biolab ★ 1.4k

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 • 4.6k views
ADD COMMENT
1
Entering edit mode
9.4 years ago
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 COMMENT
1
Entering edit mode
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 REPLY
2
Entering edit mode

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 REPLY
1
Entering edit mode

Hi Devon, Thanks a lot!

ADD REPLY

Login before adding your answer.

Traffic: 2568 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6