On 27 Jul 2015, at 17:36, Patrick Reilly <[email protected]> wrote: > I'm using BWA v0.7.12-r044 and samtools v1.2-99-ge2bb18f > [...] sorting with output as BAM or SAM results in the loss of the RG header, > while the alignment RG tags remain (thereby corrupting the SAM/BAM file, > according to GATK). > > I've also noticed that the PG header is lost during the sorting procedure. > Is there a bug in the merging procedure that drops the @RG and @PG headers?
Thanks for the report. Yes, there is such a bug -- this is https://github.com/samtools/samtools/issues/416 and there is a fix soon to be merged. > The bug does not occur with samtools sort in samtools 0.1.18, so I would > guess that it resides in htslib. The bug was introduced in May in 1.2-52-g55c852f (so in particular samtools 1.2 does not suffer from this). John -- The Wellcome Trust Sanger Institute is operated by Genome Research Limited, a charity registered in England with number 1021457 and a company registered in England with number 2742969, whose registered office is 215 Euston Road, London, NW1 2BE. ------------------------------------------------------------------------------ _______________________________________________ Samtools-help mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/samtools-help
