This is a test version of Biostars. For the public version, visit https://www.biostars.org.
bwa mem + GATK +mutect

align with bwa mem

realign and BQSR with GATK

then got the final bam

but when I use muTect to call somatic snv,I got an error.

command:

java -Xmx2g -jar muTect.jar \
       --analysis_type MuTect \
       --reference_sequence human_g1k_v37_decoy.fasta
       --cosmic b37_cosmic_v54_120711.vcf
       --dbsnp dbsnp_132_b37.leftAligned.vcf \
       --intervals region.bed \
       --input_file:normal N.bam \
       --input_file:tumor T.bam \
       --out  . \
       --coverage_file coverage.wig.txt

error:

##### ERROR ------------------------------------------------------------------------------------------
##### ERROR A USER ERROR has occurred (version 2.2-25-g2a68eab): 
##### ERROR The invalid arguments or inputs must be corrected before the GATK can proceed
##### ERROR Please do not post this error to the GATK forum
##### ERROR
##### ERROR See the documentation (rerun with -h) for this tool to view allowable command-line arguments.
##### ERROR Visit our website and forum for extensive documentation and answers to 
##### ERROR commonly asked questions http://www.broadinstitute.org/gatk
##### ERROR
##### ERROR MESSAGE: SAM/BAM file T.bam is malformed: Error parsing SAM header. Problem parsing @PG key:value pair ID:139160T clashes with ID:bwa. Line:
##### ERROR @PG ID:bwa  PN:bwa  VN:0.7.8-r455   CL:bwa mem -t 8 -M -R @RG       ID:139160T      SM:139160T      LB:DHE00038     PU:DHE00038_L6  PL:illumina     CN:novogene human_g1k_v37_decoy.fasta T_1.clean.fq T_2.clean.fq; File T.bam; Line number 89
##### ERROR ------------------------------------------------------------------------------------------

Should anyone offer a help to point why the error occurred?

alignment software-error

1 answer

I think that's a problem with the parsing of the BAM header. GATK tries to parse the @PG line but it also find a @RG tag. I would try to export the header of the BAM with "samtools view -H" in the @PG line remove everything after VN:0.7.8-r455 and use samtools reheader to insert the new header.

Log in to answer this question.