VQSR SNP ggplot error.
REQUIRED for all errors and issues:
a) GATK4.5.0 and 4.6.0
b) Exact command used:
aclab@aclab:~/tmp2$ gatk VariantRecalibrator \
-R /project/databases/common/hg19/ucsc/hg19.fa \
-V cohort.vcf \
--resource:hapmap,known=false,training=true,truth=true,prior=15.0 /project/databases/common/hg19/GATK/hapmap_3.3.hg19.sites.vcf \
--resource:omni,known=false,training=true,truth=true,prior=12.0 /project/databases/common/hg19/GATK/1000G_omni2.5.hg19.sites.vcf \
--resource:1000G,known=false,training=true,truth=false,prior=10.0 /project/databases/common/hg19/GATK/1000G_phase1.snps.high_confidence.hg19.sites.vcf \
--resource:dbsnp,known=true,training=false,truth=false,prior=2.0 /project/databases/common/hg19/GATK/dbsnp_138.hg19.vcf \
-an DP -an QD -an FS -an SOR -an MQRankSum -an ReadPosRankSum \
-mode SNP \
-O recalibrate_SNP.recal \
--tranches-file recalibrate_SNP.tranches \
--rscript-file recalibrate_SNP_plots.R
c) Entire program log:
aclab@aclab:~/tmp2$ gatk VariantRecalibrator \
-R /project/databases/common/hg19/ucsc/hg19.fa \
-V cohort.vcf \
--resource:hapmap,known=false,training=true,truth=true,prior=15.0 /project/databases/common/hg19/GATK/hapmap_3.3.hg19.sites.vcf \
--resource:omni,known=false,training=true,truth=true,prior=12.0 /project/databases/common/hg19/GATK/1000G_omni2.5.hg19.sites.vcf \
--resource:1000G,known=false,training=true,truth=false,prior=10.0 /project/databases/common/hg19/GATK/1000G_phase1.snps.high_confidence.hg19.sites.vcf \
--resource:dbsnp,known=true,training=false,truth=false,prior=2.0 /project/databases/common/hg19/GATK/dbsnp_138.hg19.vcf \
-an DP -an QD -an FS -an SOR -an MQRankSum -an ReadPosRankSum \
-mode SNP \
-O recalibrate_SNP.recal \
--tranches-file recalibrate_SNP.tranches \
--rscript-file recalibrate_SNP_plots.R
Using GATK jar /home/aclab/.local/bin/gatk-package-4.6.0.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 /home/aclab/.local/bin/gatk-package-4.6.0.0-local.jar VariantRecalibrator -R /project/databases/common/hg19/ucsc/hg19.fa -V cohort.vcf --resource:hapmap,known=false,training=true,truth=true,prior=15.0 /project/databases/common/hg19/GATK/hapmap_3.3.hg19.sites.vcf --resource:omni,known=false,training=true,truth=true,prior=12.0 /project/databases/common/hg19/GATK/1000G_omni2.5.hg19.sites.vcf --resource:1000G,known=false,training=true,truth=false,prior=10.0 /project/databases/common/hg19/GATK/1000G_phase1.snps.high_confidence.hg19.sites.vcf --resource:dbsnp,known=true,training=false,truth=false,prior=2.0 /project/databases/common/hg19/GATK/dbsnp_138.hg19.vcf -an DP -an QD -an FS -an SOR -an MQRankSum -an ReadPosRankSum -mode SNP -O recalibrate_SNP.recal --tranches-file recalibrate_SNP.tranches --rscript-file recalibrate_SNP_plots.R
09:45:25.395 INFO NativeLibraryLoader - Loading libgkl_compression.so from jar:file:/home/aclab/.local/bin/gatk-package-4.6.0.0-local.jar!/com/intel/gkl/native/libgkl_compression.so
09:45:25.593 INFO VariantRecalibrator - ------------------------------------------------------------
09:45:25.596 INFO VariantRecalibrator - The Genome Analysis Toolkit (GATK) v4.6.0.0
09:45:25.596 INFO VariantRecalibrator - For support and documentation go to https://software.broadinstitute.org/gatk/
09:45:25.596 INFO VariantRecalibrator - Executing as aclab@aclab on Linux v6.8.0-38-generic amd64
09:45:25.596 INFO VariantRecalibrator - Java runtime: Java HotSpot(TM) 64-Bit Server VM v21.0.1+12-LTS-29
09:45:25.596 INFO VariantRecalibrator - Start Date/Time: September 12, 2024, 9:45:25 AM CST
09:45:25.597 INFO VariantRecalibrator - ------------------------------------------------------------
09:45:25.597 INFO VariantRecalibrator - ------------------------------------------------------------
09:45:25.598 INFO VariantRecalibrator - HTSJDK Version: 4.1.1
09:45:25.598 INFO VariantRecalibrator - Picard Version: 3.2.0
09:45:25.598 INFO VariantRecalibrator - Built for Spark Version: 3.5.0
09:45:25.598 INFO VariantRecalibrator - HTSJDK Defaults.COMPRESSION_LEVEL : 2
09:45:25.598 INFO VariantRecalibrator - HTSJDK Defaults.USE_ASYNC_IO_READ_FOR_SAMTOOLS : false
09:45:25.599 INFO VariantRecalibrator - HTSJDK Defaults.USE_ASYNC_IO_WRITE_FOR_SAMTOOLS : true
09:45:25.599 INFO VariantRecalibrator - HTSJDK Defaults.USE_ASYNC_IO_WRITE_FOR_TRIBBLE : false
09:45:25.599 INFO VariantRecalibrator - Deflater: IntelDeflater
09:45:25.599 INFO VariantRecalibrator - Inflater: IntelInflater
09:45:25.599 INFO VariantRecalibrator - GCS max retries/reopens: 20
09:45:25.599 INFO VariantRecalibrator - Requester pays: disabled
09:45:25.600 INFO VariantRecalibrator - Initializing engine
09:45:25.747 INFO FeatureManager - Using codec VCFCodec to read file file:///project/databases/common/hg19/GATK/hapmap_3.3.hg19.sites.vcf
09:45:25.808 INFO FeatureManager - Using codec VCFCodec to read file file:///project/databases/common/hg19/GATK/1000G_omni2.5.hg19.sites.vcf
09:45:25.830 INFO FeatureManager - Using codec VCFCodec to read file file:///project/databases/common/hg19/GATK/1000G_phase1.snps.high_confidence.hg19.sites.vcf
09:45:25.902 INFO FeatureManager - Using codec VCFCodec to read file file:///project/databases/common/hg19/GATK/dbsnp_138.hg19.vcf
09:45:26.034 INFO FeatureManager - Using codec VCFCodec to read file file:///home/aclab/tmp2/cohort.vcf
09:45:26.075 INFO VariantRecalibrator - Done initializing engine
09:45:26.104 INFO TrainingSet - Found hapmap track: Known = false Training = true Truth = true Prior = Q15.0
09:45:26.104 INFO TrainingSet - Found omni track: Known = false Training = true Truth = true Prior = Q12.0
09:45:26.105 INFO TrainingSet - Found 1000G track: Known = false Training = true Truth = false Prior = Q10.0
09:45:26.105 INFO TrainingSet - Found dbsnp track: Known = true Training = false Truth = false Prior = Q2.0
09:45:26.109 WARN GATKVariantContextUtils - Can't determine output variant file format from output file extension "recal". Defaulting to VCF.
09:45:26.139 INFO ProgressMeter - Starting traversal
09:45:26.139 INFO ProgressMeter - Current Locus Elapsed Minutes Variants Processed Variants/Minute
09:45:36.622 INFO ProgressMeter - chr2:102927726 0.2 4000 22902.9
09:45:47.935 INFO ProgressMeter - chr5:63257124 0.4 9000 24776.3
09:45:59.798 INFO ProgressMeter - chr8:10469817 0.6 14000 24956.9
09:46:10.213 INFO ProgressMeter - chr11:5248243 0.7 18000 24504.8
09:46:21.664 INFO ProgressMeter - chr15:56194877 0.9 23000 24853.7
09:46:32.815 INFO ProgressMeter - chr19:50098018 1.1 29000 26096.3
09:46:39.437 INFO ProgressMeter - chrX:43603391 1.2 37944 31060.1
09:46:39.437 INFO ProgressMeter - Traversal complete. Processed 37944 total variants in 1.2 minutes.
09:46:39.447 INFO VariantDataManager - DP: mean = 7093.61 standard deviation = 4704.66
09:46:39.457 INFO VariantDataManager - QD: mean = 18.43 standard deviation = 7.21
09:46:39.462 INFO VariantDataManager - FS: mean = 0.75 standard deviation = 2.27
09:46:39.467 INFO VariantDataManager - SOR: mean = 0.75 standard deviation = 0.31
09:46:39.469 INFO VariantDataManager - MQRankSum: mean = -0.02 standard deviation = 0.47
09:46:39.472 INFO VariantDataManager - ReadPosRankSum: mean = 0.16 standard deviation = 0.66
09:46:39.531 INFO VariantDataManager - Annotation order is: [DP, QD, MQRankSum, SOR, FS, ReadPosRankSum]
09:46:39.537 INFO VariantDataManager - Training with 22493 variants after standard deviation thresholding.
09:46:39.541 INFO GaussianMixtureModel - Initializing model with 100 k-means iterations...
09:46:40.109 INFO VariantRecalibratorEngine - Finished iteration 0.
09:46:40.535 INFO VariantRecalibratorEngine - Finished iteration 5. Current change in mixture coefficients = 0.37389
09:46:40.852 INFO VariantRecalibratorEngine - Finished iteration 10. Current change in mixture coefficients = 0.38005
09:46:41.166 INFO VariantRecalibratorEngine - Finished iteration 15. Current change in mixture coefficients = 0.10071
09:46:41.488 INFO VariantRecalibratorEngine - Finished iteration 20. Current change in mixture coefficients = 0.12651
09:46:41.772 INFO VariantRecalibratorEngine - Finished iteration 25. Current change in mixture coefficients = 0.13470
09:46:42.040 INFO VariantRecalibratorEngine - Finished iteration 30. Current change in mixture coefficients = 0.06206
09:46:42.311 INFO VariantRecalibratorEngine - Finished iteration 35. Current change in mixture coefficients = 0.08005
09:46:42.597 INFO VariantRecalibratorEngine - Finished iteration 40. Current change in mixture coefficients = 0.15578
09:46:42.901 INFO VariantRecalibratorEngine - Finished iteration 45. Current change in mixture coefficients = 0.03912
09:46:43.179 INFO VariantRecalibratorEngine - Finished iteration 50. Current change in mixture coefficients = 0.04078
09:46:43.441 INFO VariantRecalibratorEngine - Finished iteration 55. Current change in mixture coefficients = 0.02248
09:46:43.705 INFO VariantRecalibratorEngine - Finished iteration 60. Current change in mixture coefficients = 0.01155
09:46:43.969 INFO VariantRecalibratorEngine - Finished iteration 65. Current change in mixture coefficients = 0.00521
09:46:44.232 INFO VariantRecalibratorEngine - Finished iteration 70. Current change in mixture coefficients = 0.00229
09:46:44.286 INFO VariantRecalibratorEngine - Convergence after 71 iterations!
09:46:44.360 INFO VariantRecalibratorEngine - Evaluating full set of 35523 variants...
09:46:44.564 INFO VariantDataManager - Selected worst 1389 scoring variants --> variants with LOD <= -5.0000.
09:46:44.564 INFO GaussianMixtureModel - Initializing model with 100 k-means iterations...
09:46:44.583 INFO VariantRecalibratorEngine - Finished iteration 0.
09:46:44.588 INFO VariantRecalibratorEngine - Finished iteration 5. Current change in mixture coefficients = 0.01642
09:46:44.593 INFO VariantRecalibratorEngine - Finished iteration 10. Current change in mixture coefficients = 0.01483
09:46:44.598 INFO VariantRecalibratorEngine - Finished iteration 15. Current change in mixture coefficients = 0.00796
09:46:44.603 INFO VariantRecalibratorEngine - Finished iteration 20. Current change in mixture coefficients = 0.00721
09:46:44.608 INFO VariantRecalibratorEngine - Finished iteration 25. Current change in mixture coefficients = 0.00486
09:46:44.613 INFO VariantRecalibratorEngine - Finished iteration 30. Current change in mixture coefficients = 0.00288
09:46:44.617 INFO VariantRecalibratorEngine - Convergence after 34 iterations!
09:46:44.622 INFO VariantRecalibratorEngine - Evaluating full set of 35523 variants...
09:46:44.813 INFO TrancheManager - Finding 4 tranches for 35523 variants
09:46:44.835 INFO TrancheManager - TruthSensitivityTranche threshold 100.00 => selection metric threshold 0.000
09:46:44.844 INFO TrancheManager - Found tranche for 100.000: 0.000 threshold starting with variant 0; running score is 0.000
09:46:44.844 INFO TrancheManager - TruthSensitivityTranche is TruthSensitivityTranche targetTruthSensitivity=100.00 minVQSLod=-39948.0342 known=(28711 @ 2.9919) novel=(6812 @ 2.7528) truthSites(16407 accessible, 16407 called), name=anonymous]
09:46:44.844 INFO TrancheManager - TruthSensitivityTranche threshold 99.90 => selection metric threshold 0.001
09:46:44.850 INFO TrancheManager - Found tranche for 99.900: 0.001 threshold starting with variant 1094; running score is 0.001
09:46:44.850 INFO TrancheManager - TruthSensitivityTranche is TruthSensitivityTranche targetTruthSensitivity=99.90 minVQSLod=-8.8767 known=(28205 @ 3.0057) novel=(6224 @ 2.6504) truthSites(16407 accessible, 16390 called), name=anonymous]
09:46:44.850 INFO TrancheManager - TruthSensitivityTranche threshold 99.00 => selection metric threshold 0.010
09:46:44.853 INFO TrancheManager - Found tranche for 99.000: 0.010 threshold starting with variant 3188; running score is 0.010
09:46:44.853 INFO TrancheManager - TruthSensitivityTranche is TruthSensitivityTranche targetTruthSensitivity=99.00 minVQSLod=0.1884 known=(26594 @ 3.0539) novel=(5741 @ 2.6759) truthSites(16407 accessible, 16242 called), name=anonymous]
09:46:44.854 INFO TrancheManager - TruthSensitivityTranche threshold 90.00 => selection metric threshold 0.100
09:46:44.856 INFO TrancheManager - Found tranche for 90.000: 0.100 threshold starting with variant 14584; running score is 0.100
09:46:44.857 INFO TrancheManager - TruthSensitivityTranche is TruthSensitivityTranche targetTruthSensitivity=90.00 minVQSLod=4.7961 known=(19802 @ 3.1178) novel=(1137 @ 2.6548) truthSites(16407 accessible, 14766 called), name=anonymous]
09:46:44.858 INFO VariantRecalibrator - Writing out recalibration table...
09:46:45.537 INFO VariantRecalibrator - Writing out visualization Rscript file...
09:46:45.548 INFO VariantRecalibrator - Building DP x QD plot...
09:46:45.551 INFO VariantRecalibratorEngine - Evaluating full set of 3660 variants...
09:46:45.891 INFO VariantRecalibratorEngine - Evaluating full set of 3660 variants...
09:46:46.071 INFO VariantRecalibrator - Building DP x MQRankSum plot...
09:46:46.074 INFO VariantRecalibratorEngine - Evaluating full set of 3660 variants...
09:46:46.384 INFO VariantRecalibratorEngine - Evaluating full set of 3660 variants...
09:46:46.535 INFO VariantRecalibrator - Building DP x SOR plot...
09:46:46.536 INFO VariantRecalibratorEngine - Evaluating full set of 3660 variants...
09:46:46.844 INFO VariantRecalibratorEngine - Evaluating full set of 3660 variants...
09:46:46.976 INFO VariantRecalibrator - Building DP x FS plot...
09:46:46.977 INFO VariantRecalibratorEngine - Evaluating full set of 3660 variants...
09:46:47.276 INFO VariantRecalibratorEngine - Evaluating full set of 3660 variants...
09:46:47.408 INFO VariantRecalibrator - Building DP x ReadPosRankSum plot...
09:46:47.409 INFO VariantRecalibratorEngine - Evaluating full set of 3600 variants...
09:46:47.728 INFO VariantRecalibratorEngine - Evaluating full set of 3600 variants...
09:46:47.854 INFO VariantRecalibrator - Building QD x MQRankSum plot...
09:46:47.855 INFO VariantRecalibratorEngine - Evaluating full set of 3721 variants...
09:46:48.156 INFO VariantRecalibratorEngine - Evaluating full set of 3721 variants...
09:46:48.289 INFO VariantRecalibrator - Building QD x SOR plot...
09:46:48.290 INFO VariantRecalibratorEngine - Evaluating full set of 3721 variants...
09:46:48.612 INFO VariantRecalibratorEngine - Evaluating full set of 3721 variants...
09:46:48.743 INFO VariantRecalibrator - Building QD x FS plot...
09:46:48.744 INFO VariantRecalibratorEngine - Evaluating full set of 3721 variants...
09:46:49.089 INFO VariantRecalibratorEngine - Evaluating full set of 3721 variants...
09:46:49.237 INFO VariantRecalibrator - Building QD x ReadPosRankSum plot...
09:46:49.238 INFO VariantRecalibratorEngine - Evaluating full set of 3660 variants...
09:46:49.594 INFO VariantRecalibratorEngine - Evaluating full set of 3660 variants...
09:46:49.742 INFO VariantRecalibrator - Building MQRankSum x SOR plot...
09:46:49.742 INFO VariantRecalibratorEngine - Evaluating full set of 3721 variants...
09:46:50.096 INFO VariantRecalibratorEngine - Evaluating full set of 3721 variants...
09:46:50.237 INFO VariantRecalibrator - Building MQRankSum x FS plot...
09:46:50.238 INFO VariantRecalibratorEngine - Evaluating full set of 3721 variants...
09:46:50.542 INFO VariantRecalibratorEngine - Evaluating full set of 3721 variants...
09:46:50.669 INFO VariantRecalibrator - Building MQRankSum x ReadPosRankSum plot...
09:46:50.670 INFO VariantRecalibratorEngine - Evaluating full set of 3660 variants...
09:46:50.965 INFO VariantRecalibratorEngine - Evaluating full set of 3660 variants...
09:46:51.089 INFO VariantRecalibrator - Building SOR x FS plot...
09:46:51.090 INFO VariantRecalibratorEngine - Evaluating full set of 3721 variants...
09:46:51.394 INFO VariantRecalibratorEngine - Evaluating full set of 3721 variants...
09:46:51.522 INFO VariantRecalibrator - Building SOR x ReadPosRankSum plot...
09:46:51.522 INFO VariantRecalibratorEngine - Evaluating full set of 3660 variants...
09:46:51.831 INFO VariantRecalibratorEngine - Evaluating full set of 3660 variants...
09:46:51.956 INFO VariantRecalibrator - Building FS x ReadPosRankSum plot...
09:46:51.957 INFO VariantRecalibratorEngine - Evaluating full set of 3660 variants...
09:46:52.277 INFO VariantRecalibratorEngine - Evaluating full set of 3660 variants...
09:46:52.514 INFO VariantRecalibrator - Executing: Rscript /home/aclab/tmp2/recalibrate_SNP_plots.R
09:46:54.114 INFO VariantRecalibrator - Shutting down engine
[September 12, 2024, 9:46:54 AM CST] org.broadinstitute.hellbender.tools.walkers.vqsr.VariantRecalibrator done. Elapsed time: 1.48 minutes.
Runtime.totalMemory()=3623878656
org.broadinstitute.hellbender.utils.R.RScriptExecutorException:
Rscript exited with 1
Command Line: Rscript -e tempLibDir = '/tmp/Rlib.16534667698759447733';source('/home/aclab/tmp2/recalibrate_SNP_plots.R');
Stdout:
Stderr: Error:
! The `space` argument of `pal_gradient_n()` only supports be "Lab" as
of scales 0.3.0.
Backtrace:
▆
1. ├─base::source("/home/aclab/tmp2/recalibrate_SNP_plots.R")
2. │ ├─base::withVisible(eval(ei, envir))
3. │ └─base::eval(ei, envir)
4. │ └─base::eval(ei, envir)
5. └─ggplot2::scale_fill_gradient(high = "green", low = "red", space = "rgb")
6. ├─ggplot2::continuous_scale(...)
7. │ └─ggplot2::ggproto(...)
8. │ └─rlang::list2(...)
9. └─scales::pal_seq_gradient(low, high, space)
10. └─scales::pal_gradient_n(c(low, high), space = space)
11. └─lifecycle::deprecate_stop("0.3.0", "pal_gradient_n(space = 'only supports be \"Lab\"')")
12. └─lifecycle:::deprecate_stop0(msg)
13. └─rlang::cnd_signal(...)
Execution halted
at org.broadinstitute.hellbender.utils.R.RScriptExecutor.getScriptException(RScriptExecutor.java:79)
at org.broadinstitute.hellbender.utils.R.RScriptExecutor.getScriptException(RScriptExecutor.java:18)
at org.broadinstitute.hellbender.utils.runtime.ScriptExecutor.executeCuratedArgs(ScriptExecutor.java:112)
at org.broadinstitute.hellbender.utils.R.RScriptExecutor.exec(RScriptExecutor.java:125)
at org.broadinstitute.hellbender.tools.walkers.vqsr.VariantRecalibrator.createVisualizationScript(VariantRecalibrator.java:1146)
at org.broadinstitute.hellbender.tools.walkers.vqsr.VariantRecalibrator.onTraversalSuccess(VariantRecalibrator.java:706)
at org.broadinstitute.hellbender.engine.GATKTool.doWork(GATKTool.java:1102)
at org.broadinstitute.hellbender.cmdline.CommandLineProgram.runTool(CommandLineProgram.java:149)
at org.broadinstitute.hellbender.cmdline.CommandLineProgram.instanceMainPostParseArgs(CommandLineProgram.java:198)
at org.broadinstitute.hellbender.cmdline.CommandLineProgram.instanceMain(CommandLineProgram.java:217)
at org.broadinstitute.hellbender.Main.runCommandLineProgram(Main.java:166)
at org.broadinstitute.hellbender.Main.mainEntry(Main.java:209)
at org.broadinstitute.hellbender.Main.main(Main.java:306)
My R version is 4.3.2
-
It's "GATK VariantRecalibrator" .
-
Hi Liam Yueng
Our tools use an old version of R and related libraries loaded by the conda environment for GATK and anything that is quite recent causes these errors. We are working on a new release to update our dependencies but in the meantime the only way to fix this issue is to resort to those older versions included in the GATK conda environment found in the docker image or you can install one for your own.
Regards.
Please sign in to leave a comment.
2 comments