8
$\begingroup$

BWA mem has the -S and -P tags for skip mate rescue and skip pairing; mate rescue performed unless -S also in use.

What do these do? I presume -P aligns read pairs independently of each other. Is that correct?

And what does -S do?

$\endgroup$
2
  • $\begingroup$ What version of BWA mem are you using? Have you looked at the manual that gets installed with bwa? "Please `man ./bwa.1' for the manual." $\endgroup$
    – Bioathlete
    Nov 26, 2018 at 19:59
  • 2
    $\begingroup$ 0.7.17; I did look at the manual page but the explanation is somewhat cryptic: "-P: In the paired-end mode, perform SW to rescue missing hits only but do not try to find hits that fit a proper pair." $\endgroup$
    – juniper-
    Nov 26, 2018 at 20:11

2 Answers 2

6
$\begingroup$

Using -SP is equivalent to running bwa mem on each of the two mates as if they are single-end reads, but it formats the output as a proper paired-end output, i.e. with all pair-related flags added properly. Without -SP, by default bwa mem forces an alignment of a poorly aligned read if its mate is aligned somewhere. -SP turns off the forced alignment. We use -SP for mapping Hi-C reads.

$\endgroup$
2
$\begingroup$

If one read maps and the other doesn't, BWA attempts to rescue the other read by performing Smith-Waterman alignment with the unmapped mate, -S disables this mate rescue.

-P does indeed disables pairing, but mate rescues is still enabled - I think -P disables the setting of the proper pair flag. If you set -P and -S, BWA maps the paired reads essentially as single reads.

$\endgroup$
1
  • $\begingroup$ What does "attempts to rescue" mean? Why would the second read map using Smith-Waterman and not using the original algorithm? $\endgroup$
    – juniper-
    Nov 27, 2018 at 1:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.