A USER ERROR has occurred: Unable to execute Rscript command: Please add the Rscript directory to your environment ${PATH}
0
0
Entering edit mode
20 months 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

GATK AnalyzeCovariates • 1.6k views
ADD COMMENT
0
Entering edit mode

Is that the only line of error message you see? GATK usually generates errors that are a lot more verbose.

ADD REPLY
0
Entering edit mode

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.

ADD REPLY
0
Entering edit mode

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 command which Rscript that will likely return Rscript 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 find Rscript, add it to $PATH manually. To do so, add the line export PATH="/path/to/Rscript:${PATH}" either to ${HOME}/.bashrc or ${HOME}/.zshrc, depending on which terminal you are using.

ADD REPLY
0
Entering edit mode

Have you installed R/Rscript and is it available in your $PATH? Since you are plotting something R is required by this tool.

ADD REPLY

Login before adding your answer.

Traffic: 1644 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6