gatk报错
12:23:54.895 WARN IndexUtils - Feature file "/public/biosoft/GATK/resources/bundle/hg38/dbsnp_146.hg38.vcf.gz" appears to contain no sequence dictionary. Attempting to retrieve a sequence dictionary from the associated index file
# 这并不是报错问题,因为有的可以运行成功
Exception in thread "main" java.lang.IncompatibleClassChangeError: Inconsistent constant pool data in classfile for class org/broadinstitute/hellbender/transformers/ReadTransformer. Method lambda$identity$d67512bf$1(Lorg/broadinstitute/hellbender/utils/read/GATKRead;)Lorg/broadinstitute/hellbender/utils/read/GATKRead; at index 65 is CONSTANT_MethodRef and should be CONSTANT_InterfaceMethodRef
解决思路
解决了两台电脑上出现的这个问题,原因均是gatk安装有问题,调取失败
解决方法1
conda --help # 安装好conda
conda create -n wes python=2 # 创建wes环境,已创建请忽略
source activate wes # 激活/进入环境
conda install gatk4 # 在conda镜像里搜索gatk
gatk --help # 查看是否安装成功
which gatk
解决方法2
# 尝试用成功安装的gatk运行命令
$ cat tmp.sh
sample="7E5241"
ref="/public/biosoft/GATK/resources/bundle/hg38/Homo_sapiens_assembly38.fasta"
snp="/public/biosoft/GATK/resources/bundle/hg38/dbsnp_146.hg38.vcf.gz"
indel="/public/biosoft/GATK/resources/bundle/hg38/Mills_and_1000G_gold_standard.indels.hg38.vcf.gz"
~qmcui/software/gatk/gatk-4.0.6.0/gatk --java-options "-Xmx20G -Djava.io.tmpdir=./" BaseRecalibrator -R $ref -I /home/qmcui/test_boy/6.gatk_vcf/0.FixMateInformation/7E5241.mk.fixed.bam --known-sites $snp --known-sites $indel -O ${sample}_recal.table
如果还在报错,我觉得可能需要核查一下gatk的路径,将他的调取路径放在$PATH最前面
详细报错内容
vip18 12:23:52 ~
$ ~qmcui/software/gatk/gatk-4.0.6.0/gatk --java-options "-Xmx20G -Djava.io.tmpdir=./" BaseRecalibrator -R $ref -I /home/qmcui/test_boy/6.gatk_vcf/0.FixMateInformation/7E5241.mk.fixed.bam --known-sites $snp --known-sites $indel -O ${sample}_recal.table
Using GATK jar /home/qmcui/software/gatk/gatk-4.0.6.0/gatk-package-4.0.6.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 -Xmx20G -Djava.io.tmpdir=./ -jar /home/qmcui/software/gatk/gatk-4.0.6.0/gatk-package-4.0.6.0-local.jar BaseRecalibrator -R /public/biosoft/GATK/resources/bundle/hg38/Homo_sapiens_assembly38.fasta -I /home/qmcui/test_boy/6.gatk_vcf/0.FixMateInformation/7E5241.mk.fixed.bam --known-sites /public/biosoft/GATK/resources/bundle/hg38/dbsnp_146.hg38.vcf.gz --known-sites /public/biosoft/GATK/resources/bundle/hg38/Mills_and_1000G_gold_standard.indels.hg38.vcf.gz -O 7E5241_recal.table
12:23:54.394 INFO NativeLibraryLoader - Loading libgkl_compression.so from jar:file:/home/qmcui/software/gatk/gatk-4.0.6.0/gatk-package-4.0.6.0-local.jar!/com/intel/gkl/native/libgkl_compression.so
12:23:54.489 INFO BaseRecalibrator - ------------------------------------------------------------
12:23:54.489 INFO BaseRecalibrator - The Genome Analysis Toolkit (GATK) v4.0.6.0
12:23:54.489 INFO BaseRecalibrator - For support and documentation go to https://software.broadinstitute.org/gatk/
12:23:54.489 INFO BaseRecalibrator - Executing as vip18@pc-System-Product-Name on Linux v4.15.0-42-generic amd64
12:23:54.489 INFO BaseRecalibrator - Java runtime: OpenJDK 64-Bit Server VM v11.0.1+13-LTS
12:23:54.490 INFO BaseRecalibrator - Start Date/Time: December 18, 2018 at 12:23:54 PM CST
12:23:54.490 INFO BaseRecalibrator - ------------------------------------------------------------
12:23:54.490 INFO BaseRecalibrator - ------------------------------------------------------------
12:23:54.490 INFO BaseRecalibrator - HTSJDK Version: 2.16.0
12:23:54.490 INFO BaseRecalibrator - Picard Version: 2.18.7
12:23:54.490 INFO BaseRecalibrator - HTSJDK Defaults.COMPRESSION_LEVEL : 2
12:23:54.490 INFO BaseRecalibrator - HTSJDK Defaults.USE_ASYNC_IO_READ_FOR_SAMTOOLS : false
12:23:54.490 INFO BaseRecalibrator - HTSJDK Defaults.USE_ASYNC_IO_WRITE_FOR_SAMTOOLS : true
12:23:54.490 INFO BaseRecalibrator - HTSJDK Defaults.USE_ASYNC_IO_WRITE_FOR_TRIBBLE : false
12:23:54.490 INFO BaseRecalibrator - Deflater: IntelDeflater
12:23:54.490 INFO BaseRecalibrator - Inflater: IntelInflater
12:23:54.490 INFO BaseRecalibrator - GCS max retries/reopens: 20
12:23:54.490 INFO BaseRecalibrator - Using google-cloud-java patch 6d11bef1c81f885c26b2b56c8616b7a705171e4f from https://github.com/droazen/google-cloud-java/tree/dr_all_nio_fixes
12:23:54.491 INFO BaseRecalibrator - Initializing engine
12:23:54.744 INFO FeatureManager - Using codec VCFCodec to read file file:///public/biosoft/GATK/resources/bundle/hg38/dbsnp_146.hg38.vcf.gz
12:23:54.809 INFO FeatureManager - Using codec VCFCodec to read file file:///public/biosoft/GATK/resources/bundle/hg38/Mills_and_1000G_gold_standard.indels.hg38.vcf.gz
12:23:54.895 WARN IndexUtils - Feature file "/public/biosoft/GATK/resources/bundle/hg38/dbsnp_146.hg38.vcf.gz" appears to contain no sequence dictionary. Attempting to retrieve a sequence dictionary from the associated index file
12:23:54.975 INFO BaseRecalibrator - Done initializing engine
12:23:54.978 INFO BaseRecalibrationEngine - The covariates being used here:
12:23:54.978 INFO BaseRecalibrationEngine - ReadGroupCovariate
12:23:54.978 INFO BaseRecalibrationEngine - QualityScoreCovariate
12:23:54.978 INFO BaseRecalibrationEngine - ContextCovariate
12:23:54.978 INFO BaseRecalibrationEngine - CycleCovariate
12:23:55.031 INFO ProgressMeter - Starting traversal
12:23:55.032 INFO ProgressMeter - Current Locus Elapsed Minutes Reads Processed Reads/Minute
12:23:55.034 INFO BaseRecalibrator - Shutting down engine
[December 18, 2018 at 12:23:55 PM CST] org.broadinstitute.hellbender.tools.walkers.bqsr.BaseRecalibrator done. Elapsed time: 0.01 minutes.
Runtime.totalMemory()=1266679808
Exception in thread "main" java.lang.IncompatibleClassChangeError: Inconsistent constant pool data in classfile for class org/broadinstitute/hellbender/transformers/ReadTransformer. Method lambda$identity$d67512bf$1(Lorg/broadinstitute/hellbender/utils/read/GATKRead;)Lorg/broadinstitute/hellbender/utils/read/GATKRead; at index 65 is CONSTANT_MethodRef and should be CONSTANT_InterfaceMethodRef
at org.broadinstitute.hellbender.transformers.ReadTransformer.identity(ReadTransformer.java:30)
at org.broadinstitute.hellbender.engine.GATKTool.makePreReadFilterTransformer(GATKTool.java:290)
at org.broadinstitute.hellbender.engine.GATKTool.getTransformedReadStream(GATKTool.java:319)
at org.broadinstitute.hellbender.engine.ReadWalker.traverse(ReadWalker.java:88)
at org.broadinstitute.hellbender.engine.GATKTool.doWork(GATKTool.java:984)
at org.broadinstitute.hellbender.cmdline.CommandLineProgram.runTool(CommandLineProgram.java:135)
at org.broadinstitute.hellbender.cmdline.CommandLineProgram.instanceMainPostParseArgs(CommandLineProgram.java:180)
at org.broadinstitute.hellbender.cmdline.CommandLineProgram.instanceMain(CommandLineProgram.java:199)
at org.broadinstitute.hellbender.Main.runCommandLineProgram(Main.java:160)
at org.broadinstitute.hellbender.Main.mainEntry(Main.java:203)
at org.broadinstitute.hellbender.Main.main(Main.java:289)