Error With Gatk Unified Genotyper And Picard Bam File
1
3
Entering edit mode
12.8 years ago

Hi,

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 -stand_call_conf 30.0 -stand_emit_conf 15.0 -dcov 500

it always return this error:

SAM/BAM file SAMFileReader{/home/edoardo/LabProgs/GATK/chr13mapping.sorted.bam} is malformed: Read GA2*0099*FC: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 http://www.broadinstitute.org/gsa/wiki/index.php/ReplaceReadGroups 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 SORT_ORDER=coordinate RGLB=001 RGPL=illumina RGSM=edo RGPU=GA2*0099

but this time the following error occured:

Exception in thread "main" java.lang.RuntimeException: SAM validation error: ERROR: Record 3, Read name GA2_0099_FC: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?

picard gatk bam • 5.0k views
ADD COMMENT
4
Entering edit mode
12.8 years ago

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 COMMENT
0
Entering edit mode

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

ADD REPLY

Login before adding your answer.

Traffic: 1556 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6