How to setup R into seqmonk when R is intalled via Anaconda?
1
0
Entering edit mode
3.9 years ago
waisman86 • 0

I installed R in my machine through Anaconda. However, I cannot find the R executable to open an R console alone, outside of the Anaconda Prompt. For this reason, I cannot setup R into the SeqMonk program to perform RNA-seq analysis.

Does anybody know how to setup R into seqmonk when it is installed this way?

Thanks a lot!

seqmonk Anaconda R • 1.7k views
0
Entering edit mode
3.9 years ago
mmfansler ▴ 370

If R is installed into your path, such that you can just type 'R' in a command shell and see an R session started then you don't need to tell SeqMonk where it is. If it's installed in a location not in the path then you need to go to Edit > Preferences > Programs in SeqMonk and select the R executable (either just called R, or R.exe on windows).

Typically, Anaconda/Miniconda adds its root environment bin directory to PATH, so R should already be accessible from terminal. If that isn't the case, or you have R installed to a specific conda environment, you can add that path (typically, ~/anaconda/bin for former, ~/anaconda/envs/<your_env_with_r>/bin for latter) as indicated above. You can also try which anaconda to find the path to the anaconda bin directory.

Finally, the statistical filters in SeqMonk rely on a number of non-core packages in R. To make it easy to install all of the packages you need there is an R script at the top level of the seqmonk installation folder which will install all of the dependencies for you. To run this simply start an R session and then run:

source("/path/to/seqmonk/load_required_modules.r")

..where you replace /path/to/seqmonk with the actual path to the seqmonk installation folder. You should repeat this with every new version of seqmonk you load in case new dependencies have been introduced.

Again, if R is installed in the root conda environment, you can simply launch R from terminal, and then execute the line above with your path adjusted as indicated. If in a different environment, first activate that environment from the terminal:

source activate <your_env_with_r>


Then launch R, and continue as above. You can leave the environment using source deactivate.