Much like we have already done for Python it would be great if any processes that require R only look within the container for the associated packages. There have been a number of issues reported where users have reported R library/package conflicts when running nf-core pipelines. Most of the time this has been resolved by just renaming/deleting ~/.Rprofile and then re-running. However, this isnt a robust solution.
An alternative as tested by @mashehu would be to add an empty R_PROFILE_USER to nextflow.config in the env scope:
// Export these variables to prevent local Python/R libraries from conflicting with those in the container
env {
PYTHONNOUSERSITE = 1
R_PROFILE_USER=""
}
Strictly speaking this variable has to point to a file but that will be quite difficult given the way in which we automate our Docker builds. Unless we add in a separate line to touch an empty file in the container but then this may cause issues with -profile conda. If left empty like this then @mashehu suggested that a warning is generated during the pipeline execution. Please fill in the blanks and add more info here @mashehu.
See R docs
Much like we have already done for Python it would be great if any processes that require
Ronly look within the container for the associated packages. There have been a number of issues reported where users have reportedRlibrary/package conflicts when running nf-core pipelines. Most of the time this has been resolved by just renaming/deleting~/.Rprofileand then re-running. However, this isnt a robust solution.An alternative as tested by @mashehu would be to add an empty
R_PROFILE_USERtonextflow.configin theenvscope:Strictly speaking this variable has to point to a file but that will be quite difficult given the way in which we automate our Docker builds. Unless we add in a separate line to touch an empty file in the container but then this may cause issues with
-profile conda. If left empty like this then @mashehu suggested that a warning is generated during the pipeline execution. Please fill in the blanks and add more info here @mashehu.See R docs