Question - RealignerTargetCreator : incompatible contigs
1
0
Entering edit mode
3.9 years ago
sd6471 • 0

I have question. I do not understand why GATK-RealignerTargetCreator is not working. I downloaded the vcf file from hg38 bundle which is supported by GATK(https://console.cloud.google.com/storage/browser/genomics-public-data/resources/broad/hg38/v0?pli=1).

To resolve this, I confirmed the files - vcf and hg38.fa(even dbNSP), and all files use 'chr+N' names. I also tried to do the method in COSMIC vcf file compatibility for Mutect2, but it does not work.

Does anyone have good solutions?


(I am using the GATK 3.7 version.)

java -Xmx20g -jar GenomeAnalysisTK.jar -T RealignerTargetCreator -R hg38.fa -I sample_dedup.bam -known Mills_and_1000G_gold_standard.indels.hg38.vcf -o sample.intervals

ERROR MESSAGE: Input files Mills_and_1000G_gold_standard.indels.hg38.vcf and reference have incompatible contigs. Please see https://software.broadinstitute.org/gatk/documentation/article?id=63for more information. Error details: The contig order in Mills_and_1000G_gold_standard.indels.hg38.vcf and reference is not the same; to fix this please see: (https://www.broadinstitute.org/gatk/guide/article?id=1328), which describes reordering contigs in BAM and VCF files..
ERROR Mills_and_1000G_gold_standard.indels.hg38.vcf contigs = [chr1, chr2, chr3, chr4, chr5, chr6, chr7, chr8, chr9, chr10, chr11, chr12, chr13, chr14, chr15, chr16, chr17, chr18, chr19, chr20, chr21, chr22, chrX, chrY, chr1_KI270706v1_random, chr4_GL000008v2_random, chr14_GL000009v2_random, chr14_KI270726v1_random, chrUn_KI270742v1, chr1_KI270766v1_alt, chr7_KI270803v1_alt, chr8_KI270811v1_alt, chr8_KI270821v1_alt, chr14_KI270846v1_alt, chr15_KI270850v1_alt, chr17_KI270862v1_alt, chr17_KI270857v1_alt, chr22_KI270875v1_alt, chr22_KI270879v1_alt, chr2_KI270894v1_alt, chr17_KI270909v1_alt, chr19_KI270938v1_alt]
ERROR reference contigs = [chr1, chr10, chr11, chr11_KI270721v1_random, chr12, chr13, chr14, chr14_GL000009v2_random, chr14_GL000225v1_random, chr14_KI270722v1_random, chr14_GL000194v1_random, chr14_KI270723v1_random, chr14_KI270724v1_random, chr14_KI270725v1_random, chr14_KI270726v1_random, chr15, chr15_KI270727v1_random, chr16, chr16_KI270728v1_random, chr17, chr17_GL000205v2_random, chr17_KI270729v1_random, chr17_KI270730v1_random, chr18, chr19, chr1_KI270706v1_random, chr1_KI270707v1_random, chr1_KI270708v1_random, chr1_KI270709v1_random, chr1_KI270710v1_random, chr1_KI270711v1_random, chr1_KI270712v1_random, chr1_KI270713v1_random, chr1_KI270714v1_random, chr2, chr20, chr21, chr22, chr22_KI270731v1_random, chr22_KI270732v1_random, chr22_KI270733v1_random, chr22_KI270734v1_random, chr22_KI270735v1_random, chr22_KI270736v1_random, chr22_KI270737v1_random, chr22_KI270738v1_random, chr22_KI270739v1_random, chr2_KI270715v1_random, chr2_KI270716v1_random, chr3, chr3_GL000221v1_random, chr4, chr4_GL000008v2_random, chr5, chr5_GL000208v1_random, chr6, chr7, chr8, chr9, chr9_KI270717v1_random, chr9_KI270718v1_random, chr9_KI270719v1_random, chr9_KI270720v1_random, chr1_KI270762v1_alt, chr1_KI270766v1_alt, chr1_KI270760v1_alt, chr1_KI270765v1_alt, chr1_GL383518v1_alt, chr1_GL383519v1_alt, chr1_GL383520v2_alt, chr1_KI270764v1_alt, chr1_KI270763v1_alt, chr1_KI270759v1_alt, chr1_KI270761v1_alt, chr2_KI270770v1_alt, chr2_KI270773v1_alt, chr2_KI270774v1_alt, chr2_KI270769v1_alt, chr2_GL383521v1_alt, chr2_KI270772v1_alt, chr2_KI270775v1_alt, chr2_KI270771v1_alt, chr2_KI270768v1_alt, chr2_GL582966v2_alt, chr2_GL383522v1_alt, chr2_KI270776v1_alt, chr2_KI270767v1_alt, chr3_JH636055v2_alt, chr3_KI270783v1_alt, chr3_KI270780v1_alt, chr3_GL383526v1_alt, chr3_KI270777v1_alt, chr3_KI270778v1_alt, chr3_KI270781v1_alt, chr3_KI270779v1_alt, chr3_KI270782v1_alt, chr3_KI270784v1_alt, chr4_KI270790v1_alt, chr4_GL383528v1_alt, chr4_KI270787v1_alt, chr4_GL000257v2_alt, chr4_KI270788v1_alt, chr4_GL383527v1_alt, chr4_KI270785v1_alt, chr4_KI270789v1_alt, chr4_KI270786v1_alt, chr5_KI270793v1_alt, chr5_KI270792v1_alt, chr5_KI270791v1_alt, chr5_GL383532v1_alt, chr5_GL949742v1_alt, chr5_KI270794v1_alt, chr5_GL339449v2_alt, chr5_GL383530v1_alt, chr5_KI270796v1_alt, chr5_GL383531v1_alt, chr5_KI270795v1_alt, chr6_GL000250v2_alt, chr6_KI270800v1_alt, chr6_KI270799v1_alt, chr6_GL383533v1_alt, chr6_KI270801v1_alt, chr6_KI270802v1_alt, chr6_KB021644v2_alt, chr6_KI270797v1_alt,.........]
software error genome next-gen • 1.0k views
ADD COMMENT
0
Entering edit mode

Hey, how did you modify VCF files' chr name? I would recommend use _bcftools_ annotate command instead of by-hand.

ADD REPLY
0
Entering edit mode

I did not modify the file. It has inherently used the chr name. Thus, I do not understand this problem.

ADD REPLY
1
Entering edit mode
3.9 years ago

The gatk error message is quite clear. your dictionaries (@SQ lines in the BAM header and the ##contig= lines in the VCF header) should be the very same, in the same order, and all contigs in a dictionary must be present in the other dictionary (eg see chr11_KI270721v1_random)

but it looks like your BAM don't have the same dictionary [chr1, chr10, chr11, ... as in the file Mills_and_1000G_gold_standard.indels.hg38.vcf

ADD COMMENT
0
Entering edit mode

Thanks. I am confirming the files.

ADD REPLY

Login before adding your answer.

Traffic: 2551 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