Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update VariantRecalibrator RScript Compatibility with Newer ggplot2 Versions #8992

Open
Nanderson246 opened this issue Oct 3, 2024 · 1 comment

Comments

@Nanderson246
Copy link

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

@gokalpcelik
Copy link
Contributor

Hi @Nanderson246
This is a known issue that requires us to update the conda environment and its dependencies on our end which all rely on older versions of certain R and python tools. Direct intervention and changing this code breaks certain unit tests which result in failure to build our conda and docker environments. This is a works in progress for our newer conda and docker environment however for the time being you may manually edit your R scripts to solve it or use R from our conda or docker environments to generate images.

I hope this helps.

Regards.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants