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!

Did you remember to?

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!

Surround blocks of code, error messages and BAM/VCF snippets--especially content with hashes (#)--with lines with three backticks ( ``` ) each to make a code block.
Powered by Vanilla. Made with Bootstrap.
Picard 2.9.0 is now available. Download and read release notes here.
GATK 3.7 is here! Be sure to read the Version Highlights and optionally the full Release Notes.

ERROR MESSAGE: Badly formed genome loc

HomaHoma Member Posts: 25


I am using IndelRealigner. I get this error:
ERROR MESSAGE: Badly formed genome loc: Contig ENSGALG00000024490|ENSGALT00000041403|3|651|852 given as location, but this contig isn't present in the Fasta sequence dictionary

I checked in the .dict and .bam files, indeed, the last line of .bam file which contains the above contig is missing from .dict file:

.bam file:
@SQ SN:ENSGALG00000024480|ENSGALT00000041393|22|309|366 LN:2220
@SQ SN:ENSGALG00000024481|ENSGALT00000041394|1|231|231 LN:1946
@SQ SN:ENSGALG00000024482|ENSGALT00000041395|25|342|342 LN:3194
@SQ SN:ENSGALG00000024483|ENSGALT00000041396|33|191|213 LN:1252
@SQ SN:ENSGALG00000024484|ENSGALT00000041397|139|203|288 LN:1146
@SQ SN:ENSGALG00000024487|ENSGALT00000041400|1|245|258 LN:294
@SQ SN:ENSGALG00000024488|ENSGALT00000041401|336|531|531 LN:2755
@SQ SN:ENSGALG00000024490|ENSGALT00000041403|3|651|852 LN:1693
@RG ID:1 PL:Illumina PU:3 LB:SX165_1.1 SM:1
@PG ID:bwa PN:bwa VN:0.6.2-r126


.dict file:
@SQ SN:ENSGALG00000024480|ENSGALT00000041393|22|309|366 LN:2220 UR:file:/proj/b2011033/private/assembly/GG_gap/scamelus_oases31_newbler_gg_gap.fa M5:a1d6d352f572b6c869d5d4196ba818b1
@SQ SN:ENSGALG00000024481|ENSGALT00000041394|1|231|231 LN:1946 UR:file:/proj/b2011033/private/assembly/GG_gap/scamelus_oases31_newbler_gg_gap.fa M5:9a90cffed9374c371cad87b962e2d9e0
@SQ SN:ENSGALG00000024482|ENSGALT00000041395|25|342|342 LN:3194 UR:file:/proj/b2011033/private/assembly/GG_gap/scamelus_oases31_newbler_gg_gap.fa M5:997affbb2c6e0e90de28446927c5b1cf
@SQ SN:ENSGALG00000024483|ENSGALT00000041396|33|191|213 LN:1252 UR:file:/proj/b2011033/private/assembly/GG_gap/scamelus_oases31_newbler_gg_gap.fa M5:d03d3553e20bb0fe30b87ac359a681f6
@SQ SN:ENSGALG00000024484|ENSGALT00000041397|139|203|288 LN:1146 UR:file:/proj/b2011033/private/assembly/GG_gap/scamelus_oases31_newbler_gg_gap.fa M5:1e9db17274efd2c147be4a339cba7ffd
@SQ SN:ENSGALG00000024487|ENSGALT00000041400|1|245|258 LN:294 UR:file:/proj/b2011033/private/assembly/GG_gap/scamelus_oases31_newbler_gg_gap.fa M5:8d2f3543543c8b3dfb62df3e89fa9791
@SQ SN:ENSGALG00000024488|ENSGALT00000041401|336|531|531 LN:2755 UR:file:/proj/b2011033/private/assembly/GG_gap/scamelus_oases31_newbler_gg_gap.fa M5:fe62d9e99cc89b45fe43d8522ab589cc

My question is that how is it possible that my .bam file contains a contig that does not exist in the .dict file? And how I can solve this problem. I used the picard utility, CreatSequenceDictionary, to recreat the .dict file but the problem is still there.

Thank you very much in advance for any help.

Homa- Uppsala University


Best Answer


  • HomaHoma Member Posts: 25

    Yes, I created the .bam files myself, thank you for your explanation, it is more clear to me now what I should do, I will track the problem.

Sign In or Register to comment.