Web 2.0 for R scripts & workflows: Tiki & PluginR
Web 2.0 for R scripts & workflows: Tiki & PluginR
- UseR 2011
Xavier de Pedro Puente
*, Ph.D; Ŕlex Sánchez Pla, Ph.D.
- Department of Statistics. Faculty of Biology. University of Barcelona
(UB).
- Statistics and Bioinformatics Unit (UEB). Vall d'Hebron Research Institute
(VHIR).
Catalonia. Spain
http://ueb.ir.vhebron.net
* xavier.depedro
@vhir.org
Outline
Slides:
http://ueb.ir.vhebron.net/2011+UseR
Keywords: GUI, Web 2.0, Free/libre Software, Tiki Wiki CMS
Groupware, PluginR.
Abstract
The need to work with colleagues from other institutions is very common around
Academia and Science. Teams often find tools to communicate and coordinate with
other web platforms to improve collaboration across space and time. Although
analysis and visualization of data with R is becoming very popular, development
teams frequently look also for web-based graphical user interfaces for the end
users of those R scripts. The list of prototypes and publicly announced free
tools (R 2011) includes programs of all kinds. However, a quick review of these
tools led us to similar conclusion reached by other researchers such as
Saunders (2009): most of these programs seem to present problems in the short
to medium term. Those problems arise from the fact that either such programs no
longer work with current stable versions of standard and free web technology,
because its development seems to have been discontinued for years. Or because
they are too difficult to install or use for most scientists or people who are
not professionals in web technology. Therefore, we decided in our research
groups to contribute to the development of a relatively new approach, different
from the latest approaches presented in the latest years (Ooms 2009, Nakano and
Nakama 2009 and others): a plugin for Tiki Wiki CMS Groupware (also known as
â€Tikiâ€), a mature collaborative web 2.0 framework
released as free/libre open source software, somewhat similar to the R
extension for Mediawiki, but with all the extra features from this
“Tightly Integrated Knowledge
Infrastructure“ that Tiki represents), along with its
decentralized but truly successful development model (Tiki 2011). This new
PluginR (De Pedro 2011), has so far allowed the development of a Web
application of use in research on the Teaching and Learning field (De Pedro
et al. 2010), as well as to develop web interfaces for Basic Pipelines
in Bioinformatics for medical research (De Pedro & Ŕlex Sánchez
2011). The communication will highlight the main advantages (and disadvantages)
found up to date with the use of Tiki + PluginR to solve many of the needs of
our research groups, including the new progresses achieved after the
presentation at the last Spanish R Users meeting (De Pedro &
Ŕlex Sánchez 2010)
1. Introduction: Our
goal
- Web interfaces for R scripts (& reports)
(~ Sweave or org-mode: mixing
templates with R code but with simpler syntax, for the crowds)
- Using some multipurpose-versatile tool: for Bioinformatics and for anything
- free/libre open source software (FLOSS)
- multi-platform & multi-browser
- mature & maintained software
- documented
- standard technology & programing languages
- extend-able by us or by others easily
- versatile enough for multi-purpose with single learning curve,
- quick & easy web output or reports
2. Web GUIs for R (i): many but (apparently) unreliable
- A few listed in R FAQ's, but...
- most seem either unmaintained (= risky in the mid term)
- or doesn't work anymore,
- or too difficult (for an averaged researcher or technician)
Reinvention of the wheel (once more)?
- diversity of designs: let evolution rule...
(we ended up extended a previous development branch in php)
3. Web GUIs for R (ii): similar conclusions by others*
Software |
Brief notes |
Rweb |
Page last updated 1999. Of the 3 example links on the page
one ran very slowly, the second not at all and the third is broken. |
R-Online |
Or rather, not online. Unless this CGI form is the same
thing. I tried Example 1, it returned a server error. |
Rcgi |
Links to several CGI forms, none of which worked for me. |
CGI-based R access |
Link did not load. |
CGIwithR |
Package now maintained at Omegahat. Did not attempt
installation. Last updated 2005. |
Rpad |
I could not connect to this URL. |
RApache |
The pick of the bunch. Provides server-side access to R
through an Apache module. I was able to install RApache on 32-bit (but not
64-bit) Ubuntu 9.10 and get it running. Could use more documentation. |
Rserve |
Serves R via TCP/IP. Last updated 2006. |
OpenStatServer |
Broken link. No longer exists, so far as I can tell. |
R PHP Online |
Link out of date (but you can follow it to the newer page).
Last updated 2003, so unlikely to be much use. |
R-php |
Last updated 2006; the example that I tried gave a server
error. |
webbioc |
A Bioconductor package. Did not investigate further. |
Rwui |
An application to create R web interfaces. My browser hung at
'waiting for cache'. I gave up. |
* Table 1. From Neil Saunders, personal communication in his blog
4. Our choice (i): "Tiki" as a base application &
framework
Tiki: "
Tightly Integrated Knowledge Infrastructure" (
tiki.org)
5. Our
choice (ii): Tiki + PluginR (external mod)
6. Examples
A few examples of usage
follow after the parameter list.
PluginR params
Example 1a
- "Hello world" (Basic R syntax)
Example 1b
- "Hello world" (Basic R syntax)
Example 1c: "Risky"
calls?
Example 1c: "Risky" calls - only after RR & admin
validation
Example 2
- PluginR with (optional) params
Example 3 - R Scripts: Web-based Easy Heatmaps
(Ex. 3) What we
have, need & do.
- Heatmaps R package (local or remote *.tgz)
- R script to use functions from the package and to produce some figure
and/or report
- Table describing parameters which need to be fed to R by the web
interface
- Tiki (FLOSS Web 2.0 engine) + PluginR set up on a server.
- Convert html table and its rows into a Tiki tracker and its fields (web
database with forms and reports).
- Create a simple Wiki page to
- display a form to collect the data from the user for the Tracker
- display a list of items already created in that tracker
- Validate the potentially unsafe R calls from wiki pages (admin or user with
enough permissions required)
- Create a Smarty template (~ Sweave template but for web pages) to combine
Tracker data (input from the user stored in a tracker)
- Edit the simple wiki page to convert it into a Pretty Tracker page for the
report display (instead of simple table with tracker data)
- Feed the web interface and see the results
(Ex. 3)
Web HeatMaps (i): descriptive table
(Ex. 3)
Web HeatMaps (ii): Tracker & fields
6.1. Web HeatMaps (iii): descriptive table with tracker field
Ids
(Ex. 3) Web HeatMaps (iv): Wiki page1 "HeatMaps" (code)
(Ex. 3) Web HeatMaps (v): Wiki page1 "HeatMaps" (output)
(Ex. 3) Web HeatMaps (vi): Wiki page2 "HeatMaps Edition"
(code)
(Ex. 3) Web HeatMaps (vii): Wiki page3 "HeatMaps Template"
(code)
(Ex. 3)
Web HeatMaps (ix): Results and edition
6.2. Tiki & PluginR
internals
6.3.
Example 4 - Microarray Pipe Line Workflow
Proposal (currently in review by the Spanish R users community)
- Documentation with syntax highlighting:
- in wiki pages
- blog posts
- potentially forums (nor used right now, since an email list seems to be
the preferred option)
- Job offers (blog)
- RSS feeds (offered, and fetched)
- freetags
- i18n (internationalization) tools
6.5. Example 6 - Other Goodies (ii): UEB Knowledge Base
(Intranet)
- Wiki & tracker based project management
- Documentation
- ToDo lists
- several levels of user groups, with fine-grained permission system
7. Similarities between R & Tiki
- SVN
- FLOSS (Free/Libre...)
- Distributed model (R packages and Tiki mods)
- Frequent releases of stable versions (6 months, + LTS in Tiki every few
years)
- Stable version 1.0 released around a decade ago (2000 in R; 2002 in
Tiki).
- Multilatform (runs on GNU/Linux, Mac, Windows, ...).
- Oriented towards console users typing on keyboards as much
as possible: scripting in R & wiki-wiki writing (quick) in Tiki.
- Powerful reporting system based on layout templates and R code (R: using
Sweave .Rnw files in R alone; Tiki: using Smarty .tpl files (or Wiki pages) with
Trackers and R code).
- "InfoWorld Bossie Awards 2010" for both
of them: R & Tiki!
- Open
- Supportive
- International
- Mailman e-mail lists
- Irc channel
- Using your own software for your internal needs ("dogfooding")
8.
Differences between R & Tiki:
Software
- Package system for most features
- Core team to accept changes in core
- Allows writing code on web pages (Rapid application Development &
documentation) with R-Studio (*in theory*)
- Documentation: highly structured & compulsory
- License: GPL
- Ohloh:
- Lines: 660 k
- Weight: 22 Mb (40Mb .exe) - 260 Mb (svn R 2.14)
- Estimated cost: $ 7 M (179 person-years)
- All-in-one approach for most features
also highly integrated among them.
- Wiki-way of doing software
- Allows writing code on web pages (Rapid application Development &
documentation) + its web interface
- Documentation: Loose and community-wide effort.
- License: LGPL
- Ohloh:
- Lines: 1.300 k
- Weight: 23Mb (.tgz) - 460 Mb (svn 7x)
- Estimated cost: $ 20 M (367 person-years)
- Fine-grained permission management (user groups)
- 3 levels: object, content category, global
- Configuration profiles
- Community-created
- Applicable in one click
- Hosted at profiles.tiki.org (public)
- R core team (20) manages R roadmap
"R core team is a self-perpetuating oligarchy" [Brian Ripley]
- Not needed for LTS branch (!!!, ~ "all" are supported 2
y.)
- Many bloggers about R developments
- Many printed books
- Tiki: Self-managed Community
using Tiki + (devel) email list to help community management.
Tiki Software Community Association (created in 2010)
protecting trademarks, hosting of community servers, etc.
- LTS evey few years: 3.x (2009), 6.x (2011)... (9.x likely 2013)
- Just a few bloggers about Tiki (afaik)
- Just 2 printed books (so far)
BUT extensive wiki collaborative documentation early days
("dogfooding!"); 1000+ pp.
10. Thanks. Questions?
Acknowledgements
- Tiki Devs
- Sylvie Greverend (FR, USA)
- Jonny Bradley (UK)
- Robert Plummer (USA)
- Louis-Philippe Huberdeau (CA)
11. References
- De Pedro, X.; Sánchez, A. (2010). Usando de forma segura R
vía web con Tiki. Presentacií³ comunicacií³,
II Jornadas (I Congreso) de Usuarios de R en castellano. Mieres, Oviedo, Spain.
http://r-es.pangea.org/II+Jornadas - Full text | Slides
- De Pedro, X.; Calvo, M.; Carnicer, A.; Cuadros, J.; Mií±arro,
A. (2010). Assessing student activity through log analysis from computer
supported learning assignments. Presentació comunicació, 6ş Congreso Internacional de Docencia
Universitaria e Innovación - VI CIDUI. Barcelona, Spain. http://cochise.bib.ub.es
- De Pedro, X.; Sánchez, A. (2011). Using R through a Tiki web
interface to implement bioinformatics pipelines. Poster, 19th Annual
International Conference on Intelligent Systems for Molecular Biology and 10th
European Conference on Computational Biology 2011 (ISMB/ECCB), N36. Vienna,
í€USTRIA. http://posters.f1000.com/P1816
- De Pedro, X. (2011). Tiki documentation: Plugin R. https://doc.tiki.org/PluginR
- Nakano, J. and E.-j. Nakama (2009). Web interface to r for high-performance
computing. In The R UseR Conference 2009, Rennes.
- Ooms, J. (2009). Building web applications with r. In The R UseR Conference
2009, Rennes.
- R (2011). R faq. cran.r-project.org/doc/FAQ/R-FAQ.html#R-Web-Interfaces.
- Saunders, N. (2009). A brief survey of r web interfaces. http://nsaunders.wordpress.com/2009/11/30/a-brief-survey-of-r-web-interfaces/
- Tiki (2011). Development model. https://tiki.org/Model.