brentp / bwa-meth

fast and accurate alignment of BS-Seq reads using bwa-mem and a 3-letter genome
https://arxiv.org/abs/1401.1129
MIT License
139 stars 53 forks source link

Fix default read group to respect SAM spec #45

Closed nsoranzo closed 6 years ago

nsoranzo commented 6 years ago

When using bwameth with bwa >=0.7.16 and not specifying --read-group, I'm getting the error already reported in

https://github.com/brentp/bwa-meth/issues/44#issuecomment-334573644

i.e.:

[E::bwa_set_rg] the read group line contained literal <tab> characters -- replace with escaped tabs: \t
Traceback (most recent call last):
  File "/path/bin/bwa-meth-0.10/bwameth.py", line 601, in <module>
    main(sys.argv[1:])
  File "/path/bin/bwa-meth-0.10/bwameth.py", line 586, in main
    set_as_failed=args.set_as_failed)
  File "/path/bwa-meth-0.10/bwameth.py", line 259, in bwa_mem
    as_bam(cmd, fa, prefix, calmd, set_as_failed)
  File "/path/bin/bwa-meth-0.10/bwameth.py", line 293, in as_bam
    raise Exception("bad or empty fastqs")
Exception: bad or empty

This is due to the following change in bwa:

https://github.com/lh3/bwa/pull/84

brentp commented 6 years ago

thanks for the fix.