biod / sambamba

Tools for working with SAM/BAM data
http://thebird.nl/blog/D_Dragon.html
GNU General Public License v2.0
563 stars 105 forks source link

additional header columns are removed #462

Closed tolot27 closed 3 years ago

tolot27 commented 3 years ago

Sambamba removes additional header columns like DS:T added by Salmon of input files in sam format.

How to reproduce:

Samtools:

echo -e "@SQ\tSN:NM_000014.6\tLN:4610\tDS:T" | samtools view -H -
@SQ     SN:NM_000014.6  LN:4610 DS:T

Sambamba:

echo -e "@SQ\tSN:NM_000014.6\tLN:4610\tDS:T" | sambamba view -q -S -H /dev/stdin
@HD     VN:1.3
@SQ     SN:NM_000014.6  LN:4610

Expected: All header information should be retained even if it is converted to BAM.

pjotrp commented 3 years ago

Hi @tolot27, thanks for pointing that out. Do you feel like submitting a patch yourself? It should not be too hard. First look in the code and see where the header gets parsed. Follow what happens with the contents and the writer.