CollectInsertSizeMetrics can't find R
I'm running Picard 3.0.0 in a docker container. I have installed R which on findable via `which R`. When I run `picard CollectInsertSizeMetrics ...` it fails with this error:
R is not installed on this machine. It is required for creating the chart.
Is there something I need to configure to let picard know that R is actually installed?
-
Hi Craig Amundsen,
Picard specifically requires the RScript executable to be in your shell PATH. What is the output of `which RScript` ?
Regards,
David
-
Thank you for the response.
That's not found. There is an Rscript (lower case s) in /usr/bin. It's world executable. I tried copying it to /usr/bin/RScript. I'm still getting the same R is not installed error.
$ which RScript
/usr/bin/RScript$ which Rscript
/usr/bin/Rscript -
Hi Craig Amundsen,
The way Picard checks for whether R is installed is to attempt to run the "Rscript" (lowercase "s") command from the PATH on the script:
https://github.com/broadinstitute/picard/blob/master/src/main/resources/picard/analysis/checkRInstallation.R
If this returns a non-zero exit code, it throws the "R is not installed on this machine." error you are getting. Are you able to run this script manually from the command line, and does Rscript exit with 0 when you run it?
One way to avoid this error, by the way, is to not specify anything for the "Histogram_FILE" argument -- this will cause Picard to bypass the R installation check.Regards,
David
-
Running Rscript from the command line has an exit code of 1.
I tried running without setting H=histogram_name.pdf, but I get the message that HISTOGRAM_FILE is required.
It looks like the root of the problem is that Rscript doesn't seem to be looking in /usr/bin for R (which is where R is located).
-
Hi Craig Amundsen,
This seems like a configuration issue with the R environment in your docker image. If you can get to the point where running Rscript on Picard's checkRInstallation.R exits with 0, then the CollectInsertSizeMetrics error should go away.
Regards,
David
-
Thank you so much for your help.
Please sign in to leave a comment.
6 comments