GuyTeichman / RNAlysis

Analyze your RNA sequencing data without writing a single line of code
https://guyteichman.github.io/RNAlysis/
MIT License
129 stars 13 forks source link

Bug Report: Failed to find R executable (MacOS stand-alone app) #29

Closed dlijavetzky closed 1 year ago

dlijavetzky commented 1 year ago

Describe the bug

When I try to run the DESeq2 program, the module tries to detect the folder where the R executable is installed. But on MacOS, there is only one app (R.app) installed in the application folder. As a result, an error message entitled "Failed to find R executable" appears. Please make sure your R installation folder is correct. (For example: 'C:/Program Files/R/R-4.2.3')"

Full description of the error in "Steps To Reproduce"

Steps To Reproduce

  1. Go to "DESeq2 differential expression setup"
  2. Click on "Start DESeq2"
  3. Get the Error message:

Traceback (most recent call last): File "rnalysis/utils/io.py", line 1418, in run_r_script File "rnalysis/utils/io.py", line 1482, in run_subprocess File "subprocess.py", line 1026, in init File "subprocess.py", line 1950, in _execute_child FileNotFoundError: [Errno 2] No such file or directory: 'Rscript'

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "rnalysis/gui/gui.py", line 4168, in finish_generic_job File "rnalysis/gui/gui_widgets.py", line 375, in run File "rnalysis/filtering.py", line 2882, in differential_expression_deseq2 File "rnalysis/utils/differential_expression.py", line 123, in run_deseq2_analysis File "rnalysis/utils/differential_expression.py", line 81, in install_deseq2 File "rnalysis/utils/io.py", line 1423, in run_r_script FileNotFoundError: Failed to find R executable. Please make sure your R installation folder is correct. (For example: 'C:/Program Files/R/R-4.2.3')

Expected behavior

Start the DESeq2 analysis

Screenshots

Captura de pantalla 2023-08-24 a la(s) 16 57 57

How did you install RNAlysis?

Stand-alone app

RNAlysis version

3.9.2

Operating system

iOS 13.4.1

Additional context

No response

GuyTeichman commented 1 year ago

Hi dlijavetzky, Thanks for reporting this issue.

Can you please try setting the value of r_installation_folder to 'auto', and see if that resovles your issue?

Best, Guy.

dlijavetzky commented 1 year ago

Hi Guy,

I've tried it and I got the same error

Thanks,

Diego

GuyTeichman commented 1 year ago

My apologies for the late response, I have just moved into a new apartment and am still settling in.

When you install R on MacOS, in addition to the R.app file under Applications, there should also be an additional folder containing the R binary files (which RNAlysis uses). This is often located in /usr/bin (for example: /usr/bin/Rscript), or /anaconda/lib/ (if you install R through Anaconda). I would check these two locations (either manually, or setting them as the r_installation_foler and see if that solves your problem.

dlijavetzky commented 1 year ago

Nor has it worked with these alternatives. My installation is directly from CRAN. I tried to use the directory that supposedly contains the files (/Library/Frameworks/R.framework/Versions/4.2-arm64), but failed.

It would be nice to know how other Mac users have done...

Cheers

Diego

GuyTeichman commented 1 year ago

Hi Diego,

A few more follow-up questions:

  1. What version of R are you running?
  2. What path is displayed when you run the command R.home()?

Best, Guy.

dlijavetzky commented 1 year ago

Hi Guy,

Good news!

  1. 4.2-arm64
  2. /Library/Frameworks/R.framework/Versions/4.2-arm64/Resources...and it worked!!

I'll keep going on with the analysis, but so far, I'm a step forward!

All the best,

Diego

GuyTeichman commented 1 year ago

I'm glad to hear! Feel free to write again if you run into any issues or have any questions.

Good luck with your analysis, Guy.