Print Reads --sample_name option doesn't apply to BAM header @RG SM:

tyamaguchityamaguchi CanadaPosts: 3Member


I use --sample_name option to restrict output reads for PintReads walker (GATK version - 2.4.9).
This option works well but the output BAM header @RG still contains sample name (SM) that was not included.
Is there a way to apply this --sample_name option to BAM header at the same time?
I could reheader the BAM files using samtools but I'm looking for a better and easier way.

Thank you,


Best Answer


  • tyamaguchityamaguchi CanadaPosts: 3Member
    edited March 2014

    Hi Geraldine,

    Thanks for the reply. I see. Is there a plan to add this function (sample level print reads and reheader at the same time when --sample_name is used) in newer GATK?


    Post edited by tyamaguchi on
  • Geraldine_VdAuweraGeraldine_VdAuwera Posts: 8,688Administrator, GATK Dev admin

    I'm not aware of any such plan, sorry.

    Geraldine Van der Auwera, PhD

  • tyamaguchityamaguchi CanadaPosts: 3Member

    No worries. Thank you for the quick reply!

  • dklevebringdklevebring Posts: 79Member

    Here's +1 for cleaning up the header within PrintReads when using --sample_name. OR add a flag to HC so it can be run when header elements for multiple samples exist... How about adding --sample_name to HC? Would be even more useful now that I think about it.

  • SheilaSheila Broad InstitutePosts: 2,381Member, GATK Dev, Broadie, Moderator, DSDE Dev admin
    edited June 2014


    Thanks for the insight. It is good to know things that make GATK more user - friendly.


    Post edited by Sheila on
Sign In or Register to comment.