The current GATK version is 3.7-0
Examples: Monday, today, last week, Mar 26, 3/26/04

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Get notifications!

You can opt in to receive email notifications, for example when your questions get answered or when there are new announcements, by following the instructions given here.

Got a problem?

1. Search using the upper-right search box, e.g. using the error message.
2. Try the latest version of tools.
3. Include tool and Java versions.
4. Tell us whether you are following GATK Best Practices.
5. Include relevant details, e.g. platform, DNA- or RNA-Seq, WES (+capture kit) or WGS (PCR-free or PCR+), paired- or single-end, read length, expected average coverage, somatic data, etc.
6. For tool errors, include the error stacktrace as well as the exact command.
7. For format issues, include the result of running ValidateSamFile for BAMs or ValidateVariants for VCFs.
8. For weird results, include an illustrative example, e.g. attach IGV screenshots according to Article#5484.
9. For a seeming variant that is uncalled, include results of following Article#1235.

Did we ask for a bug report?

Then follow instructions in Article#1894.

Formatting tip!

Wrap blocks of code, error messages and BAM/VCF snippets--especially content with hashes (#)--with lines with three backticks ( ``` ) each to make a code block as demonstrated here.

Jump to another community
Picard 2.10.4 has MAJOR CHANGES that impact throughput of pipelines. Default compression is now 1 instead of 5, and Picard now handles compressed data with the Intel Deflator/Inflator instead of JDK.
GATK version 4.beta.2 (i.e. the second beta release) is out. See the GATK4 BETA page for download and details.

Input files reads and reference have incompatible contigs while Running GATK:RealignerTargetCreator

sarkarsarkar SwitzerlandMember
edited April 2014 in Ask the GATK team

Hello All,

I am running RealignerTargetCreator using GATK version GenomeAnalysisTK-1.2-4-gd9ea764 and I am getting the following error:

ERROR MESSAGE: Input files reads and reference have incompatible contigs: Found contigs with the same name but different lengths:
ERROR contig reads = scaffold69676_size1796 / 3149
ERROR contig reference = scaffold69676_size1796 / 1758.
ERROR reads contigs = [scaffold1_size320545, scaffold2_size291774, scaffold3_size284740..........`

I already checked that I am using the right Reference FASTA file and the correct .bam file, that I have used for alignment before. Therefore, I am clueless why I am getting this error?
I would appreciate your help regarding this problem. Any suggestion is welcome?



  • SheilaSheila Broad InstituteMember, Broadie, Moderator

    @sarkar Hi Namrata,

    First, you should try using our newest GATK version 3.1. Version 1.2 is very old!

    Secondly, assuming the number for the reference is correct (based on contig name), you should re-index the bam file. Sometimes the index file gets corrupted, so re-creating a fresh index file fixes the issue.

    Let me know if this helps.

  • sarkarsarkar SwitzerlandMember

    Hi Sheila,

    Thanks for your feedback. I created a new Index file and tried again but still it is giving me the same error.

    Do you have any other suggestions?

    Many Thanks,

  • SheilaSheila Broad InstituteMember, Broadie, Moderator

    Hi Namrata @sarkar‌

    You can try to check the length of the contig in the reference genome and the length of the contig in the bam file to see if they match.

    You can do this by using samtools view -h yourfile.bam You will need to use something like grep to get the actual line of the sequence dictionary that corresponds to the contig. If you do not know how to do this, please ask your IT department for help.

    Which version are you using now? 3.1?


  • sarkarsarkar SwitzerlandMember

    Hi Sheila,

    The length of the contig in the reference genome is 1758. And when by doing
    samtools view -h myfile.bam | grep scaffold69676_size1796 i got @SQ SN:scaffold69676_size1796 LN:3149. These lengths are consistant with the Error message I got previously.

    I tried with a later version GATK 2.6 but it still gave the same error.
    I tried to reorderSam but was not of any help.

  • SheilaSheila Broad InstituteMember, Broadie, Moderator
    edited April 2014


    I see that the length of the reference contig is different from the length of the input file contig. Unfortunately, this means you probably used the wrong version of the reference for aligning your reads. The best advice I can give you is to redo everything starting at the alignment step.

    Version 2.6 is better than 1.2, but while you are at it, you should upgrade to version 3.1.

    Good luck!

  • sarkarsarkar SwitzerlandMember

    Hi Sheila,

    Thanks very much.


Sign In or Register to comment.