Question: how to output the best alignment rather than multiple alignments for each read in BWA
0
gravatar for zhangdengwei
16 months ago by
zhangdengwei130
zhangdengwei130 wrote:

Dear all, I would like to use BWA mem to output the best alignment for each read instead of all alignments, just like the "-k" argument below in Bowtie2, however, I haven't found the same function in BWA mem, which my version is 0.7.17-r1188, did I miss something or how can I tackle it?

  -k <int>           report up to <int> alns per read; MAPQ not meaningful
   OR
  -a/--all           report all alignments; very slow, MAPQ not meaningful
alignment • 616 views
ADD COMMENTlink modified 16 months ago by d-cameron2.2k • written 16 months ago by zhangdengwei130
1
gravatar for d-cameron
16 months ago by
d-cameron2.2k
Australia
d-cameron2.2k wrote:

did I miss something

Reporting only the best alignment is the default in bwa mem (and bowtie2). By default, bwa reports some alternate alignments in the XA tag but you can ignore that. Note that for some reads the best alignment is chimeric so multiple alignment record will be reported for that read, linked by the SA tag. Note that these record collectively form a single alignment and are not considered to be alternate alignments.

ADD COMMENTlink written 16 months ago by d-cameron2.2k

XA and SA tags are independent, is that right?

ADD REPLYlink written 4 months ago by kmzhou40

Yes.

XA indicates an alternative alignment location. Read with XA indicate there could be other equally/almost as good alignment locations for this read.

SA indicates that this alignment is part of a chimeric alignment (aka split read alignment). Reads with SA imply the read spans a structural variant with a partial alignment on either side.

ADD REPLYlink written 4 months ago by d-cameron2.2k
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: 1408 users visited in the last hour