Friday 10 June 2011

BWA to support multiple hits as separate lines in SAM with addon pl script

This is the reason why I love open source communities / software.
After a brief discussion and request for BWA to also report multiple hits as separate entries in sam/bam files. The author of BWA (Li Heng) promptly released a addon perl script to allow for this feature.

commercial providers: try to beat that for speed for new feature release!

Anyway if you are interested on the usage:

A new script xa2multi.pl is added to convert XA:Z tag to multiple lines.

   
  bwa samse ref.fa reads.sai reads.fq.gz | xa2multi.pl > out.sam


A related question was also posted on biostars

Question: How to force 'bwa samse' to output multiple hits in .sam format?
http://www.biostars.org/p/45430/


3 comments:

  1. the link is not valid. Where can we find the script? (thanks)

    ReplyDelete
  2. Hi,
    So,this link doesn't never work...
    Has anyobody known where can we find it or similar?

    ReplyDelete
  3. Terribly sorry the comments were in spam folder have updated the post

    link is at https://github.com/lh3/bwa/blob/master/xa2multi.pl

    ReplyDelete

Datanami, Woe be me