BaseRecalibrator - Input files knownSites and reference have incompatible contigs

I am trying to use GATK BaseRecalibrator but I get this error:
"Input files knownSites and reference have incompatible contigs"

" ##### ERROR MESSAGE: Input files knownSites and reference have incompatible contigs. Please see more information. Error details: The contig order in knownSites and reference is not the same; to fix this please see: (, which describes reordering contigs in BAM and VCF files..

ERROR knownSites contigs = [chr1, chr10, chr10_GL383545v1_alt, chr10_GL383546v1_alt, chr10_KI270824v1_alt, chr10_KI270825v1_alt, chr11, chr11_GL383547v1_alt, chr11_JH159136v1_alt, chr11_JH159137v1_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, .....

I searched the Internet and found out that I should use the compatible vcf file and reference, but I downloaded vcf file from hg38 bundle so I suppose it should be compatible. My reference uses 'chr1,etc.', while the vcf file uses '1,2,etc.', so I added chr to the vcf file. I also used Picard ReorderSam on my BAM file and SortVcf on vcf file as described here
Now it looks like my reference is sorted differently (lexicographically sorted). I have no idea how can I fix this problem, should I sort my reference or download other reference file?


Sign In or Register to comment.