Attention:
The frontline support team will be unavailable to answer questions until May27th 2019. We will be back soon after. Thank you for your patience and we apologize for any inconvenience!

Running MuTect2 without knowing my BAM header

I have BAM files that were generated elsewhere and I'm trying to run MuTect2 on tumor/normal pairs, but I keep getting the following message:

A USER ERROR has occurred: Bad input: Sample Sample1.IS.noPG is not in BAM header: []

I'm not sure what the header actually is, and I'm having no luck using 'samtools reheader' to rename the header.

Any suggestions?

Answers

  • bhanuGandhambhanuGandham Cambridge MAMember, Administrator, Broadie, Moderator admin

    @dcraig01

    BAM files contain a header section and an alignment section:

    ▶ Header—Contains information about the entire file, such as sample name, sample length, and alignment method. Alignments in the alignments section are associated with specific information in the header section.
    ▶ Alignments—Contains read name, read sequence, read quality, alignment information, and custom tags. The read name includes the chromosome, start coordinate, alignment quality, and the match descriptor string.

    From the error it looks like the sample name in the header and the same name you provide in your mutect2 command do not match.

  • dcraig01dcraig01 Member
    Hi bhanu,

    I'm wondering if there's either (a) a way to rename the header so that it matches my input (I don't know what the name in the BAM header is, or (b) have MuTect ignore the differing headers (by deleting them).

    Thanks
  • AdelaideRAdelaideR Unconfirmed, Member, Broadie, Moderator admin

    @dcraig01

    It is possible to use Picard tools to rename your headers.

    java -jar AddOrReplaceReadGroups I=withoutgroups.bam O=withgroups.bam LB=yourgroup PL=illumina PU=yourgroup SM=yourgroup

Sign In or Register to comment.