Error was: Sequence dictionary and index contain different numbers of contigs
I saw another question with similar issues however I did not see a solution in that thread. I made these files myself using a custom genome, and the latest version of samtools/picard so unsure what is going on.
Version: (GATK) v4.1.9.0
Command: gatk PreprocessIntervals -O intervals.out -R ../hic_output.fasta -XL hic_output.repeatMasked.gff --bin-length 0 --interval-merging-rule OVERLAPPING_ONLY &> error.log
Error log:
Using GATK jar /global/u2/a/asession/SCRIPTS/GATK/gatk-4.1.9.0/gatk-package-4.1.9.0-local.jar
Running:
java -Dsamjdk.use_async_io_read_samtools=false -Dsamjdk.use_async_io_write_samtools=true -Dsamjdk.use_async_io_write_tribble=false -Dsamjdk.compression_level=2 -jar /global/u2/a/asession/SCRIPTS/GATK/gatk-4.1.9.0/gatk-package-4.1.9.0-local.jar PreprocessIntervals -O intervals.out -R ../hic_output.fasta -XL hic_output.repeatMasked.gff --bin-length 0 --interval-merging-rule OVERLAPPING_ONLY
15:13:06.943 INFO NativeLibraryLoader - Loading libgkl_compression.so from jar:file:/global/u2/a/asession/SCRIPTS/GATK/gatk-4.1.9.0/gatk-package-4.1.9.0-local.jar!/com/intel/gkl/native/libgkl_compression.so
Feb 08, 2021 3:13:07 PM shaded.cloud_nio.com.google.auth.oauth2.ComputeEngineCredentials runningOnComputeEngine
INFO: Failed to detect whether we are running on Google Compute Engine.
15:13:07.091 INFO PreprocessIntervals - ------------------------------------------------------------
15:13:07.091 INFO PreprocessIntervals - The Genome Analysis Toolkit (GATK) v4.1.9.0
15:13:07.091 INFO PreprocessIntervals - For support and documentation go to https://software.broadinstitute.org/gatk/
15:13:07.091 INFO PreprocessIntervals - Executing as asession@cori10 on Linux v4.12.14-150.63-default amd64
15:13:07.091 INFO PreprocessIntervals - Java runtime: Java HotSpot(TM) 64-Bit Server VM v1.8.0_202-b08
15:13:07.091 INFO PreprocessIntervals - Start Date/Time: February 8, 2021 3:13:06 PM PST
15:13:07.091 INFO PreprocessIntervals - ------------------------------------------------------------
15:13:07.091 INFO PreprocessIntervals - ------------------------------------------------------------
15:13:07.092 INFO PreprocessIntervals - HTSJDK Version: 2.23.0
15:13:07.092 INFO PreprocessIntervals - Picard Version: 2.23.3
15:13:07.092 INFO PreprocessIntervals - HTSJDK Defaults.COMPRESSION_LEVEL : 2
15:13:07.092 INFO PreprocessIntervals - HTSJDK Defaults.USE_ASYNC_IO_READ_FOR_SAMTOOLS : false
15:13:07.092 INFO PreprocessIntervals - HTSJDK Defaults.USE_ASYNC_IO_WRITE_FOR_SAMTOOLS : true
15:13:07.092 INFO PreprocessIntervals - HTSJDK Defaults.USE_ASYNC_IO_WRITE_FOR_TRIBBLE : false
15:13:07.092 INFO PreprocessIntervals - Deflater: IntelDeflater
15:13:07.092 INFO PreprocessIntervals - Inflater: IntelInflater
15:13:07.092 INFO PreprocessIntervals - GCS max retries/reopens: 20
15:13:07.092 INFO PreprocessIntervals - Requester pays: disabled
15:13:07.093 INFO PreprocessIntervals - Initializing engine
15:13:07.247 INFO PreprocessIntervals - Shutting down engine
[February 8, 2021 3:13:07 PM PST] org.broadinstitute.hellbender.tools.copynumber.PreprocessIntervals done. Elapsed time: 0.01 minutes.
Runtime.totalMemory()=2237661184
***********************************************************************
A USER ERROR has occurred: Couldn't read file file:///global/cscratch1/sd/asession/Rmuscosa/Assem2/Try2/GATK/../hic_output.fasta. Error was: Sequence dictionary and index contain different numbers of contigs
***********************************************************************
Set the system property GATK_STACKTRACE_ON_USER_EXCEPTION (--java-options '-DGATK_STACKTRACE_ON_USER_EXCEPTION=true') to print the stack trace.
-
Hi Adam Session,
I think you are getting this error message because a GFF file cannot be used as an interval file. Please see this resource we have on interval files: https://gatk.broadinstitute.org/hc/en-us/articles/360035531852-Intervals-and-interval-lists
Best,
Genevieve
-
This error actually shows up whether I try to filter the file using a gff, bed, or not at all. I copied the preferred command but did troubleshoot that prior.
Using GATK jar /global/u2/a/asession/SCRIPTS/GATK/gatk-4.1.9.0/gatk-package-4.1.9.0-local.jar
Running:
java -Dsamjdk.use_async_io_read_samtools=false -Dsamjdk.use_async_io_write_samtools=true -Dsamjdk.use_async_io_write_tribble=false -Dsamjdk.compression_level=2 -jar /global/u2/a/asession/SCRIPTS/GATK/gatk-4.1.9.0/gatk-package-4.1.9.0-local.jar PreprocessIntervals -O intervals.out -R ../hic_output.fasta --bin-length 0 --interval-merging-rule OVERLAPPING_ONLY
09:21:23.665 INFO NativeLibraryLoader - Loading libgkl_compression.so from jar:file:/global/u2/a/asession/SCRIPTS/GATK/gatk-4.1.9.0/gatk-package-4.1.9.0-local.jar!/com/intel/gkl/native/libgkl_compression.so
Feb 10, 2021 9:21:23 AM shaded.cloud_nio.com.google.auth.oauth2.ComputeEngineCredentials runningOnComputeEngine
INFO: Failed to detect whether we are running on Google Compute Engine.
09:21:23.859 INFO PreprocessIntervals - ------------------------------------------------------------
09:21:23.859 INFO PreprocessIntervals - The Genome Analysis Toolkit (GATK) v4.1.9.0
09:21:23.859 INFO PreprocessIntervals - For support and documentation go to https://software.broadinstitute.org/gatk/
09:21:23.859 INFO PreprocessIntervals - Executing as asession@cori08 on Linux v4.12.14-150.63-default amd64
09:21:23.859 INFO PreprocessIntervals - Java runtime: Java HotSpot(TM) 64-Bit Server VM v1.8.0_202-b08
09:21:23.860 INFO PreprocessIntervals - Start Date/Time: February 10, 2021 9:21:23 AM PST
09:21:23.860 INFO PreprocessIntervals - ------------------------------------------------------------
09:21:23.860 INFO PreprocessIntervals - ------------------------------------------------------------
09:21:23.860 INFO PreprocessIntervals - HTSJDK Version: 2.23.0
09:21:23.860 INFO PreprocessIntervals - Picard Version: 2.23.3
09:21:23.860 INFO PreprocessIntervals - HTSJDK Defaults.COMPRESSION_LEVEL : 2
09:21:23.861 INFO PreprocessIntervals - HTSJDK Defaults.USE_ASYNC_IO_READ_FOR_SAMTOOLS : false
09:21:23.861 INFO PreprocessIntervals - HTSJDK Defaults.USE_ASYNC_IO_WRITE_FOR_SAMTOOLS : true
09:21:23.861 INFO PreprocessIntervals - HTSJDK Defaults.USE_ASYNC_IO_WRITE_FOR_TRIBBLE : false
09:21:23.861 INFO PreprocessIntervals - Deflater: IntelDeflater
09:21:23.861 INFO PreprocessIntervals - Inflater: IntelInflater
09:21:23.861 INFO PreprocessIntervals - GCS max retries/reopens: 20
09:21:23.861 INFO PreprocessIntervals - Requester pays: disabled
09:21:23.861 INFO PreprocessIntervals - Initializing engine
09:21:24.017 INFO PreprocessIntervals - Shutting down engine
[February 10, 2021 9:21:24 AM PST] org.broadinstitute.hellbender.tools.copynumber.PreprocessIntervals done. Elapsed time: 0.01 minutes.
Runtime.totalMemory()=2077229056
***********************************************************************A USER ERROR has occurred: Couldn't read file file:///global/cscratch1/sd/asession/Rmuscosa/Assem2/Try2/GATK/../hic_output.fasta. Error was: Sequence dictionary and index contain different numbers of contigs
-
Hi Adam Session, is that command above when you ran it with no interval file?
Could you also provide the link to the forum you were looking at so that I do not have you re try many steps?
Thank you!
Genevieve
-
Yes, the command was " ~/SCRIPTS/GATK/gatk-4.1.9.0/gatk PreprocessIntervals -O intervals.out -R ../hic_output.fasta --bin-length 0 --interval-merging-rule OVERLAPPING_ONLY >&error.log"
Could the scaffold naming scheme cause issues if they contain specific characters? I've had some issues with other programs not liking the semicolons in the scaffold names, example copied here "ScmvaoM_5596;HRSCAF=7745".
The other thread is here: https://gatk.broadinstitute.org/hc/en-us/community/posts/360075354612-Sequence-dictionary-and-index-contain-different-numbers-of-contigs
Thanks,
Adam
-
Thanks so much. Could you try deleting the sequence dictionary for your reference file and re-creating it with CreateSequenceDictionary?
The other possible problem is an issue when you downloaded your reference, and it is truncated. You could try to re-download the reference file as well.
-
Thank you for the help. Remaking the .dict file worked.
Adam
-
Great, thank you for the update!
Please sign in to leave a comment.
7 comments