2011 useR

ExampleSlideShow

# Web 2.0 for R scripts & workflows: Tiki & PluginR

Xavier de Pedro, Ŕlex Sánchez (UB, VHIR)- http://ueb.ir.vhebron.net/2011+UseR

# 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.
Quote:
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

1. Web interfaces for R scripts (& reports)
   (~ Sweave or org-mode: mixing templates with R code but with simpler syntax, for the crowds)
2. Using some multipurpose-versatile tool: for Bioinformatics and for anything
   1. free/libre open source software (FLOSS)
   2. multi-platform & multi-browser
   3. mature & maintained software
   4. documented
   5. standard technology & programing languages
   6. extend-able by us or by others easily
   7. versatile enough for multi-purpose with single learning curve,
   8. 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

http://www.hiv.lanl.gov/content/sequence/HEATMAP/heatmap.html?sample_input=1&log_data=$log_data_checked

### (Ex. 3) What we have, need & do.

We have

1. Heatmaps R package (local or remote *.tgz)
2. R script to use functions from the package and to produce some figure and/or report

We need

1. Table describing parameters which need to be fed to R by the web interface
2. Tiki (FLOSS Web 2.0 engine) + PluginR set up on a server.

We do

1. Convert html table and its rows into a Tiki tracker and its fields (web database with forms and reports).
2. Create a simple Wiki page to
   1. display a form to collect the data from the user for the Tracker
   2. display a list of items already created in that tracker
3. Validate the potentially unsafe R calls from wiki pages (admin or user with enough permissions required)
4. Create a Smarty template (~ Sweave template but for web pages) to combine Tracker data (input from the user stored in a tracker)
5. Edit the simple wiki page to convert it into a Pretty Tracker page for the report display (instead of simple table with tracker data)
6. 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 (viii): Creating a figure

### (Ex. 3) Web HeatMaps (ix): Results and edition

### 6.2. Tiki & PluginR internals

### 6.3. Example 4 - Microarray Pipe Line Workflow

### 6.4. Example 5 - Other Goodies (i): Website for "local" R community (ES)

Proposal (currently in review by the Spanish R users community)

1. Documentation with syntax highlighting:
   1. in wiki pages
   2. blog posts
   3. potentially forums (nor used right now, since an email list seems to be the preferred option)
2. Job offers (blog)
3. RSS feeds (offered, and fetched)
4. freetags
5. i18n (internationalization) tools

http://r-es.pangea.org

### 6.5. Example 6 - Other Goodies (ii): UEB Knowledge Base (Intranet)

1. Wiki & tracker based project management
2. Documentation
3. ToDo lists
4. several levels of user groups, with fine-grained permission system

http://ueb.ir.vhebron.net

## 7. Similarities between R & Tiki

R & Tiki Softwares

1. SVN
2. FLOSS (Free/Libre...)
3. Distributed model (R packages and Tiki mods)
4. Frequent releases of stable versions (6 months, + LTS in Tiki every few years)
5. Stable version 1.0 released around a decade ago (2000 in R; 2002 in Tiki).
6. Multilatform (runs on GNU/Linux, Mac, Windows, ...).
7. Oriented towards console users typing on keyboards as much as possible: scripting in R & wiki-wiki writing (quick) in Tiki.
8. 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).
9. "InfoWorld Bossie Awards 2010" for both of them: R & Tiki!

R & Tiki Communities

1. Open
2. Supportive
3. International
4. Mailman e-mail lists
5. Irc channel
6. Using your own software for your internal needs ("dogfooding")

## 8. Differences between R & Tiki: Software

R

1. Package system for most features
2. Core team to accept changes in core
3. Allows writing code on web pages (Rapid application Development & documentation) with R-Studio (*in theory*)
4. Documentation: highly structured & compulsory
5. License: GPL
6. Ohloh:
   1. Lines: 660 k
   2. Weight: 22 Mb (40Mb .exe) - 260 Mb (svn R 2.14)
   3. Estimated cost: $ 7 M (179 person-years)

Tiki

1. All-in-one approach for most features
   also highly integrated among them.
2. Wiki-way of doing software
3. Allows writing code on web pages (Rapid application Development & documentation) + its web interface
4. Documentation: Loose and community-wide effort.
5. License: LGPL
6. Ohloh:
   1. Lines: 1.300 k
   2. Weight: 23Mb (.tgz) - 460 Mb (svn 7x)
   3. Estimated cost: $ 20 M (367 person-years)
7. Fine-grained permission management (user groups)
   1. 3 levels: object, content category, global
8. Configuration profiles
   1. Community-created
   2. Applicable in one click
   3. Hosted at profiles.tiki.org (public)

## 9. Differences between R & Tiki: Community

R

1. R core team (20) manages R roadmap
   "R core team is a self-perpetuating oligarchy" [Brian Ripley]
2. Not needed for LTS branch (!!!, ~ "all" are supported 2 y.)
3. Many bloggers about R developments
4. Many printed books

Tiki

1. 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.
2. LTS evey few years: 3.x (2009), 6.x (2011)... (9.x likely 2013)
3. Just a few bloggers about Tiki (afaik)
4. Just 2 printed books (so far)
   BUT extensive wiki collaborative documentation early days ("dogfooding!"); 1000+ pp.

## 10. Thanks. Questions?

- PDF: http://www.warwick.ac.uk/statsdept/useR-2011/abstracts/030411-depedroxavier_sanchezalex.pdf
- Slides: http://ueb.ir.vhebron.net/2011+UseR
- contact: xavier.depedro@vhir.org

Acknowledgements

- Tiki Devs
  - Sylvie Greverend (FR, USA)
  - Jonny Bradley (UK)
  - Robert Plummer (USA)
  - Louis-Philippe Huberdeau (CA)

## 11. References

1. 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
2. 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
3. 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
4. De Pedro, X. (2011). Tiki documentation: Plugin R. https://doc.tiki.org/PluginR
5. Nakano, J. and E.-j. Nakama (2009). Web interface to r for high-performance computing. In The R UseR Conference 2009, Rennes.
6. Ooms, J. (2009). Building web applications with r. In The R UseR Conference 2009, Rennes.
7. R (2011). R faq. cran.r-project.org/doc/FAQ/R-FAQ.html#R-Web-Interfaces.
8. Saunders, N. (2009). A brief survey of r web interfaces. http://nsaunders.wordpress.com/2009/11/30/a-brief-survey-of-r-web-interfaces/
9. Tiki (2011). Development model. https://tiki.org/Model.