Re: [galaxy-dev] R-environment Patch [was: [galaxy-iuc] RFC: R, RPy2, DESeq2 example wrapper]
On Tue, Sep 17, 2013 at 3:03 AM, Bjoern Gruening bjoern.gruen...@gmail.com wrote: Hi all, that is now implemented in: https://bitbucket.org/galaxy/galaxy-central/pull-request/219/implementation-of-the-a-r_environment-to/diff Any comments are much appreciated. Fantastic work, I like this a lot. Is it still to complicated? Greg and Dave can we refactor the set_env_var functionality so we can set this automatically for the r-environment or even the python-environment? Greg and/or Dave's comments on this point would be great. But, just to clarify this point the Python version does set its environment automatically: https://bitbucket.org/galaxy/galaxy-central/src/48fad71361b3075c85c7d365dd52c106cabad73a/lib/tool_shed/galaxy_install/tool_dependencies/fabric_util.py?at=default#cl-342 My vote is that you just add a similar command for R - even if the code for doing so is sort of verbose for right now - and then once the R/Ruby/Python (Perl?) stuff is added we revisit and refactor to remove duplicated code. Again, Greg or Dave should weigh in though :). Thanks Bjoern, great stuff! -John If that patch will be merged my plan is to write a short wiki page with a 'best practice for R package development'. Furthermore, I will try to create a small script that will obtain the dependency tree of all the required tarballs. Speaking of tarballs, currently I just download them and host them in a separate github repository. That is not ideal and I will start a new discussion in one of my next mails about one central place. Thanks! Bjoern Cool work. I was thinking something like this would be needed (https://github.com/viking/Renv), but I like your approach better. The one think I would say is that, like Python with setup_venv, if this is best practices Galaxy should provide some high level support for this. I was thinking your package install could look something like this: package name=deseq2 version=1.0.17 install version=1.0 actions action type=setup_r_environment base_r changeset_revision=bae5c9880b71 name=package_r_3_0_1 owner=bgruening toolshed=http://testtoolshed.g2.bx.psu.edu; / r_packagehttps://github.com/bgruening/download_store/raw/master/DESeq2-1_0_18/BiocGenerics_0.6.0.tar.gz/r_package r_packagehttps://github.com/bgruening/download_store/raw/master/DESeq2-1_0_18/IRanges_1.18.2.tar.gz/r_package r_packagehttps://github.com/bgruening/download_store/raw/master/DESeq2-1_0_18/GenomicRanges_1.12.4.tar.gz/r_package r_packagehttps://github.com/bgruening/download_store/raw/master/DESeq2-1_0_18/Rcpp_0.10.4.tar.gz/r_package r_packagehttps://github.com/bgruening/download_store/raw/master/DESeq2-1_0_18/RcppArmadillo_0.3.900.0.tar.gz/r_package r_packagehttps://github.com/bgruening/download_store/raw/master/DESeq2-1_0_18/locfit_1.5-9.1.tar.gz/r_package r_packagehttps://github.com/bgruening/download_store/raw/master/DESeq2-1_0_18/Biobase_2.20.1.tar.gz/r_package r_packagehttps://github.com/bgruening/download_store/raw/master/DESeq2-1_0_18/DBI_0.2-7.tar.gz/r_package r_packagehttps://github.com/bgruening/download_store/raw/master/DESeq2-1_0_18/RSQLite_0.11.4.tar.gz/r_package r_packagehttps://github.com/bgruening/download_store/raw/master/DESeq2-1_0_18/AnnotationDbi_1.22.6.tar.gz/r_package r_packagehttps://github.com/bgruening/download_store/raw/master/DESeq2-1_0_18/xtable_1.7-1.tar.gz/r_package r_packagehttps://github.com/bgruening/download_store/raw/master/DESeq2-1_0_18/XML_3.98-1.1.tar.gz/r_package r_packagehttps://github.com/bgruening/download_store/raw/master/DESeq2-1_0_18/annotate_1.38.0.tar.gz/r_package r_packagehttps://github.com/bgruening/download_store/raw/master/DESeq2-1_0_18/genefilter_1.42.0.tar.gz/r_package r_packagehttps://github.com/bgruening/download_store/raw/master/DESeq2-1_0_18/RColorBrewer_1.0-5.tar.gz/r_package r_packagehttps://github.com/bgruening/download_store/raw/master/DESeq2-1_0_18/DESeq2_1.0.18.tar.gz/r_package /action !-- Galxay provides plumbing for making package directory, settings PATH and R_LIBS and running install.packages via Rscript -- /actions /install /package Obviously, someone would need to implement the action type setup_r_environment, but frankly I believe you have already done most (or at least a large amount) of the work in demonstrating how it should be implemented and that it is feasible. -John On Mon, Aug 5, 2013 at 11:10 AM, Bjoern Gruening bjoern.gruen...@gmail.com wrote: Dear Commissioners, I have spent some time in prototyping an R wrapper for DESeq2 and RPy2. In the end I will skip RPy2 as dependency, because I will include a pure R-script. Currently it's more or less a prototype. My main Aim was to make R and RPy2 a first class citizen in the Tool Shed
Re: [galaxy-dev] R-environment Patch [was: [galaxy-iuc] RFC: R, RPy2, DESeq2 example wrapper]
Hi John, On Tue, Sep 17, 2013 at 3:03 AM, Bjoern Gruening bjoern.gruen...@gmail.com wrote: Hi all, that is now implemented in: https://bitbucket.org/galaxy/galaxy-central/pull-request/219/implementation-of-the-a-r_environment-to/diff Any comments are much appreciated. Fantastic work, I like this a lot. Is it still to complicated? Greg and Dave can we refactor the set_env_var functionality so we can set this automatically for the r-environment or even the python-environment? Greg and/or Dave's comments on this point would be great. But, just to clarify this point the Python version does set its environment automatically: https://bitbucket.org/galaxy/galaxy-central/src/48fad71361b3075c85c7d365dd52c106cabad73a/lib/tool_shed/galaxy_install/tool_dependencies/fabric_util.py?at=default#cl-342 My vote is that you just add a similar command for R - even if the code for doing so is sort of verbose for right now - and then once the R/Ruby/Python (Perl?) stuff is added we revisit and refactor to remove duplicated code. Again, Greg or Dave should weigh in though :). implemented it and pushed it in the same pull request. Its now working for me. Thanks for encourage me. Nevertheless, I added a todo item, so that we eventually remember to refactor it at some point (when all patches are integrated?!). Thanks Bjoern, great stuff! :) thanks! Bjoern -John If that patch will be merged my plan is to write a short wiki page with a 'best practice for R package development'. Furthermore, I will try to create a small script that will obtain the dependency tree of all the required tarballs. Speaking of tarballs, currently I just download them and host them in a separate github repository. That is not ideal and I will start a new discussion in one of my next mails about one central place. Thanks! Bjoern Cool work. I was thinking something like this would be needed (https://github.com/viking/Renv), but I like your approach better. The one think I would say is that, like Python with setup_venv, if this is best practices Galaxy should provide some high level support for this. I was thinking your package install could look something like this: package name=deseq2 version=1.0.17 install version=1.0 actions action type=setup_r_environment base_r changeset_revision=bae5c9880b71 name=package_r_3_0_1 owner=bgruening toolshed=http://testtoolshed.g2.bx.psu.edu; / r_packagehttps://github.com/bgruening/download_store/raw/master/DESeq2-1_0_18/BiocGenerics_0.6.0.tar.gz/r_package r_packagehttps://github.com/bgruening/download_store/raw/master/DESeq2-1_0_18/IRanges_1.18.2.tar.gz/r_package r_packagehttps://github.com/bgruening/download_store/raw/master/DESeq2-1_0_18/GenomicRanges_1.12.4.tar.gz/r_package r_packagehttps://github.com/bgruening/download_store/raw/master/DESeq2-1_0_18/Rcpp_0.10.4.tar.gz/r_package r_packagehttps://github.com/bgruening/download_store/raw/master/DESeq2-1_0_18/RcppArmadillo_0.3.900.0.tar.gz/r_package r_packagehttps://github.com/bgruening/download_store/raw/master/DESeq2-1_0_18/locfit_1.5-9.1.tar.gz/r_package r_packagehttps://github.com/bgruening/download_store/raw/master/DESeq2-1_0_18/Biobase_2.20.1.tar.gz/r_package r_packagehttps://github.com/bgruening/download_store/raw/master/DESeq2-1_0_18/DBI_0.2-7.tar.gz/r_package r_packagehttps://github.com/bgruening/download_store/raw/master/DESeq2-1_0_18/RSQLite_0.11.4.tar.gz/r_package r_packagehttps://github.com/bgruening/download_store/raw/master/DESeq2-1_0_18/AnnotationDbi_1.22.6.tar.gz/r_package r_packagehttps://github.com/bgruening/download_store/raw/master/DESeq2-1_0_18/xtable_1.7-1.tar.gz/r_package r_packagehttps://github.com/bgruening/download_store/raw/master/DESeq2-1_0_18/XML_3.98-1.1.tar.gz/r_package r_packagehttps://github.com/bgruening/download_store/raw/master/DESeq2-1_0_18/annotate_1.38.0.tar.gz/r_package r_packagehttps://github.com/bgruening/download_store/raw/master/DESeq2-1_0_18/genefilter_1.42.0.tar.gz/r_package r_packagehttps://github.com/bgruening/download_store/raw/master/DESeq2-1_0_18/RColorBrewer_1.0-5.tar.gz/r_package r_packagehttps://github.com/bgruening/download_store/raw/master/DESeq2-1_0_18/DESeq2_1.0.18.tar.gz/r_package /action !-- Galxay provides plumbing for making package directory, settings PATH and R_LIBS and running install.packages via Rscript -- /actions /install /package Obviously, someone would need to implement the action type setup_r_environment, but frankly I believe you have already done most (or at least a large amount) of the work in demonstrating how it should be implemented and that it is feasible. -John On Mon, Aug