Question: Error With Gatk Unified Genotyper And Picard Bam File
gravatar for Edoardo Giacopuzzi
7.7 years ago by
Brescia, Italy
Edoardo Giacopuzzi60 wrote:


I'm trying to use GATK to identify genomic variants from my .bam file. When I use the command java -jar GenomeAnalysisTK.jar -R chr13.fa -I chr13fixed.bam -o SNP.raw.vcf -T UnifiedGenotyper -standcallconf 30.0 -standemitconf 15.0 -dcov 500

it always return this error: SAM/BAM file SAMFileReader{/home/edoardo/LabProgs/GATK/chr13mapping.sorted.bam} is malformed: Read GA20099FC:4:17:6565:3099#TTTCCC/1 is either missing the read group or its read group is not defined in the BAM header, both of which are required by the GATK. Please use to fix this problem

I've tried to apply the solution suggested using Picard AddOrReplaceReadGroups java -jar picard/AddOrReplaceReadGroups.jar I= chr13.sorted.bam O= chr13.fixed.bam SORTORDER=coordinate RGLB=001 RGPL=illumina RGSM=edo RGPU=GA20099

but this time the following error occured: Exception in thread "main" java.lang.RuntimeException: SAM validation error: ERROR: Record 3, Read name GA20099FC:4:26:12470:9587#CATCCA, Mate Alignment start should be 0 because reference name = *.

I've also tried to sort my bam file again using picard SortSam instead of samtools (as suggested in some forums) but the same error return.

Anyone know how to solve this problem? Does it depend on the software used to align the reads and generate the bam file or can it be corrected in some other (and quicker) way?

gatk picard file bam • 3.7k views
ADD COMMENTlink written 7.7 years ago by Edoardo Giacopuzzi60
gravatar for Sean Davis
7.7 years ago by
Sean Davis25k
National Institutes of Health, Bethesda, MD
Sean Davis25k wrote:

I would suggest running Picard using VALIDATION_STRINGENCY=LENIENT or SILENT. Many of the validation errors reported by Picard are "technically" errors, but do not have any impact for the vast majority of downstream processing.

ADD COMMENTlink written 7.7 years ago by Sean Davis25k

Thanks! It seems that adding VALIDATION_STRINGENCY option as you indicated solved the problem with Picard and now also GATK works fine.

ADD REPLYlink written 7.7 years ago by Edoardo Giacopuzzi60
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1561 users visited in the last hour