Entering edit mode
2.3 years ago
Hayler Edu
▴
40
Hello everyone, today I'm trying to do an AnalyzeCovariate with GATK but I have an error and I don't know how to solve it.
This is my script:
gatk AnalyzeCovariates -before SEC9.table -after SEC9_post_recal_data.table -plots AnalyzeCovariates.pdf
When I run the script I have this error:
A USER ERROR has occurred: Unable to execute Rscript command: Please add the Rscript directory to your environment ${PATH}
I would appreciate if someone can help me
Is that the only line of error message you see? GATK usually generates errors that are a lot more verbose.
I have this line to: Set the system property GATK_STACKTRACE_ON_USER_EXCEPTION (--java-options '-DGATK_STACKTRACE_ON_USER_EXCEPTION=true') to print the stack trace.
The error message itself is quite evident: It misses the
Rscript
executable, which it apparently uses under the hood to generate the plot. You can corroborate this with the commandwhich Rscript
that will likely returnRscript not found
instead of something like/usr/local/bin/Rscript
.Since I presume that GATK usually installs all its dependencies, the easiest would probably be to reinstall GATK on your system and let it sort out the dependencies itself.
The other option would be to install R manually. If
which Rscript
after the installation still can't findRscript
, add it to$PATH
manually. To do so, add the lineexport PATH="/path/to/Rscript:${PATH}"
either to${HOME}/.bashrc
or${HOME}/.zshrc
, depending on which terminal you are using.Have you installed
R/Rscript
and is it available in your$PATH
? Since you are plotting something R is required by this tool.