This is a test version of Biostars. For the public version, visit https://www.biostars.org.
BWA MEM -P option

Hello everyone

I am trying to align my sequencing reads (short reads, paired-end) to reference using BWA MEM. I am wondering what is -P option really means? In BWA official manual it says -P perform SW to do mate rescue and disable reads pairing, but I didn't really get it and there is very limit interpretations about it on the internet. Here are my questions:

  1. What -P leads to compare with command without -P in alignment?
  2. In what condition we use -P?
  3. My purpose is to detect the SV and SNV, is it OK, or better/better not or makes no difference for adding -P?

Could anyone give me some hints. Appreciate any help.

alignment bwa

Here I ask the question by myself.

From the perspective of reads left after QC and duplication removal, there is HUGE difference of using "bwa mem -P" or not using -P.

  • If I use "bwa mem -P ..." then use "samtools flagstat " on the sorted bam file after QC, the results are as follows:

77153723 + 0 in total (QC-passed reads + QC-failed reads)

0 + 0 secondary

0 + 0 supplementary

0 + 0 duplicates

77153723 + 0 mapped (100.00% : N/A)

77153723 + 0 paired in sequencing

38685462 + 0 read1

38468261 + 0 read2

0 + 0 properly paired (0.00% : N/A)

  • If I use "bwa mem " without -P option, then

90137409 + 0 in total (QC-passed reads + QC-failed reads)

0 + 0 secondary

0 + 0 supplementary

0 + 0 duplicates

90137409 + 0 mapped (100.00% : N/A)

90137409 + 0 paired in sequencing

45111060 + 0 read1

45026349 + 0 read2

89034218 + 0 properly paired (98.78% : N/A)

So we can see there is about 20% reads LOST if using -P for short-reads alignment! I don't what is the proper situation for using -P, at least for short-reads alignment and variant calling pipeline, DO NOT use -P.

1 answer

It's actually simple. Read the instructions of the variant callers you use downstream and see whether they recommend that option or not. I personally have never seen it, nor seen it in any variant caller manual, so it's probably a "no, don't use it". It is eventually all about what the variant caller expects...or not.

Thanks for your help. Indeed from your advise, and my experience I finally find out it is better not use it, at least for variant calling. It is not recommanded or even mentioned by any variant calling pipelines, and as I mentioned above it causes unacceptable reads lost.

Log in to answer this question.