At the moment, RapMap always prints unaligned reads, even if the -u flag is not given.
The writeUnmapped variable seems to be set according to the flag, but is later ignored.
Whenever such an unaligned read entry is read by samtools for sam->bam conversion, samtools terminates with a "parse error on line xxxxx".
Happens on current master branch and with current samtools version.