bowtie2 --un vs --un-conc
1
0
Entering edit mode
3.8 years ago
blur ▴ 280

This might be a stupid question, but I have to figure this out -> I want to get unaligned reads when I run bowtie2

I tried every variation of --un I could think of. For example, I found this option in biostars:

bowtie2 -t -p 2 -q --phred33-quals --mm -x Human_rRNA -1 R1.fq -2 R2.fq -S out.sam  --un unaligned.sam

This didn't work - I tried moving the --un location, giving a directory, specifying file name (/unaligned/unaligned.fq) using --un-gz All this didn't work

Then I tried --un-conc and now I get out files

bowtie2 -t -p 2 -q --phred33-quals --mm -x Human_rRNA -1 R1.fq -2 R2.fq -S out.sam  --un-conc unaligned.sam

But is it the same as unaligned? I essentially want samtools -f 4 reads, in the original pairs

Any elucidation will be most welcome

bowtie2 • 4.5k views
ADD COMMENT
4
Entering edit mode
3.8 years ago

From bowtie2 manual:

--un <path>        write unpaired reads that did not align to <path>
--un-conc <path>   write pairs that did not align concordantly to <path>

The reason why --un returns nothing is probably because all your reads are paired, so --un-conc would be the way to go. On the other hand, --un-conc is different than just outputing reads that did not align (samtools -f 4), because, as described, it will return any pair that did not align concordantly (concordantly = both reads mapped on the same chromosome within reasonable distance of each other, defined by the -X and -I parameters).

To illustrate the difference, think of a read pair with one mate mapped and the other unmapped. samtools -f 4 will only return you the read that is unmapped, while bowtie2 --un-conc will give you the full pair.

ADD COMMENT
0
Entering edit mode

Thank you for this very clear and elucidating explanation!

ADD REPLY

Login before adding your answer.

Traffic: 2768 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