gatk
gatk copied to clipboard
Update VariantRecalibrator RScript Compatibility with Newer ggplot2 Versions
Hi,
I've encountered an issue with the R script generated by VariantRecalibrator during my analysis. The generated R script uses color functions (scale_fill_gradient) where the RGB color space is still being employed to calculate the gradient. However, in newer versions of R, the ggplot2 and scales libraries have deprecated the RGB color space, and the library now requires the "Lab" color space to calculate the gradient.
This issue causes the R script to fail unless it is later modified by the user to use scale_fill_gradient(..., space = "Lab"). Updating the script generation in VariantRecalibrator would prevent this problem and make the R script compatible with newer versions of R, and ggplot2. an scales libraries.
Here is the suggested change:
update : scale_fill_gradient(..., space = "rgb") to : scale_fill_gradient(..., space = "Lab")
Versions:
The Genome Analysis Toolkit (GATK) v4.6.0.0 HTSJDK Version: 4.1.1 Picard Version: 3.2.0
RStudio 2024.04.2+764 "Chocolate Cosmos" Release (e4392fc9ddc21961fd1d0efd47484b43f07a4177, 2024-06-05) for Ubuntu Jammy Library scales 1.3.0 library ggplot2 3.51