21
KNIME UGM 2015 Antje Janosch – Technology Development Studio MPI-CBG Dresden Scripting Integration Workshop

KNIME UGM 2015 Antje Janosch – Technology Development Studio MPI-CBG Dresden

Embed Size (px)

Citation preview

Page 1: KNIME UGM 2015 Antje Janosch – Technology Development Studio MPI-CBG Dresden

KNIME UGM 2015

Antje Janosch – Technology Development Studio MPI-CBG Dresden

Scripting IntegrationWorkshop

Page 2: KNIME UGM 2015 Antje Janosch – Technology Development Studio MPI-CBG Dresden

2

History

Antje Janosch, MPI-CBG, Dresden, Germany

2009 2015?R-Scripting, Python Scripting,

Matlab Scripting2010?

2013 / 2014

Page 3: KNIME UGM 2015 Antje Janosch – Technology Development Studio MPI-CBG Dresden

R integration vs. R integration

• Better editor (undo, redo)• Better attribute name insertion• Preserve column names• UI templates + centralized user template repositories• Dynamic repainting of plots• OpenInR nodes for rapid prototyping• (Support for ggplot2 and lattice plots)• Faster table conversion (~2x)• Flow-variable support in scripts• Generic nodes to process arbitrary R data structures

Page 4: KNIME UGM 2015 Antje Janosch – Technology Development Studio MPI-CBG Dresden

Antje Janosch, MPI-CBG, Dresden, Germany 4

General Features

• Server/Client based solution• Parallel execution• Centralized setup

• Remote template repositories• Template configuration via “KNIME-like” GUI

• Deployment of KNIME-nodes with scripting behind

Page 5: KNIME UGM 2015 Antje Janosch – Technology Development Studio MPI-CBG Dresden

Antje Janosch, MPI-CBG, Dresden, Germany 5

Short news

R• ROW-ID support (one direction KNIME > R)• Improved error messages (syntax errors, other errors)• generic R-port summary

Python• Support of pandas data frame

Page 6: KNIME UGM 2015 Antje Janosch – Technology Development Studio MPI-CBG Dresden

6

Client-(server) model

Antje Janosch, MPI-CBG, Dresden, Germany

RServe

remote or local

Matlab-Server

local

remote or local

local

Pyth

on-

Serv

er

remote or local

Page 7: KNIME UGM 2015 Antje Janosch – Technology Development Studio MPI-CBG Dresden

Antje Janosch, MPI-CBG, Dresden, Germany 7

Getting started (Client)

• Install Scripting plugins from “Trusted Community Contributions” update site (KNIME >= 2.10 recommended)

Page 8: KNIME UGM 2015 Antje Janosch – Technology Development Studio MPI-CBG Dresden

Antje Janosch, MPI-CBG, Dresden, Germany 8

Preferences

Page 9: KNIME UGM 2015 Antje Janosch – Technology Development Studio MPI-CBG Dresden

Antje Janosch, MPI-CBG, Dresden, Germany 9

Node Types

• Plot• Snippet• OpenIn…• Generic nodes (R)

Page 10: KNIME UGM 2015 Antje Janosch – Technology Development Studio MPI-CBG Dresden

Antje Janosch, MPI-CBG, Dresden, Germany 10

Plot / Snippet – Script editor tab

Page 11: KNIME UGM 2015 Antje Janosch – Technology Development Studio MPI-CBG Dresden

Plot / Snippet – Template tab

Template Repository

Template Description / Source

Page 12: KNIME UGM 2015 Antje Janosch – Technology Development Studio MPI-CBG Dresden

Script editor tab – template view

Antje Janosch, MPI-CBG, Dresden, Germany 12

RGG interface of the selected template

Page 13: KNIME UGM 2015 Antje Janosch – Technology Development Studio MPI-CBG Dresden

Antje Janosch, MPI-CBG, Dresden, Germany 13

Script editor tab – template view

modify template (dev)

RGG (XML)

Page 14: KNIME UGM 2015 Antje Janosch – Technology Development Studio MPI-CBG Dresden

Antje Janosch, MPI-CBG, Dresden, Germany 14

Tips and Tricks for Editing (R)

• Mouse click = ”Column name” • Alt + Mouse click = kIn$”Column name”• Ctrl + Mouse click = Displays possible domain values of the

column and offers to insert a selection (comma separated• Press Apple/Windows key and select multiple = as soon as

you release the key, the selected column names will be inserted “column 1”,”column 2”,...

• FLOWVAR(currentColumnName) placeholder to enable the use of flow variables

Page 15: KNIME UGM 2015 Antje Janosch – Technology Development Studio MPI-CBG Dresden

Antje Janosch, MPI-CBG, Dresden, Germany 15

Plot – Output Options tab

Page 16: KNIME UGM 2015 Antje Janosch – Technology Development Studio MPI-CBG Dresden

Antje Janosch, MPI-CBG, Dresden, Germany 16

Template repositories

Template.txt################################################### name: A very cool method# author: Antje Janosch# category: KNIME-UGM/# preview: niceImage.png (optional)

This is my template description.######

R/Python/Matlab code Optionally emmbedded in RGG

################################################### name: Another very cool method# author: Antje Janosch...

Page 17: KNIME UGM 2015 Antje Janosch – Technology Development Studio MPI-CBG Dresden

Antje Janosch, MPI-CBG, Dresden, Germany 17

RGG

• R GUI Generator

• Additional element<panellistbox label="Label" items="item1,item2,item3" span="full"/>

http://rgg.r-forge.r-project.org/RGG: a general GUI Framework for R scripts.BMC Bioinformatics. 2009 Mar 2 ;10:74. doi: 10.1186/1471-2105-10-74.

<rgg>some interface elements definitions<![CDATA[R-script]]> </rgg>

Page 18: KNIME UGM 2015 Antje Janosch – Technology Development Studio MPI-CBG Dresden

Antje Janosch, MPI-CBG, Dresden, Germany 18

RGG

• Placeholders$$$NUM_ATTRIBUTES$$$ - for all numeric columns$$$STR_ATTRIBUTES$$$ - for all string columns$$$ALL_ATTRIBUTES$$$ - for all columns

Page 19: KNIME UGM 2015 Antje Janosch – Technology Development Studio MPI-CBG Dresden

Antje Janosch, MPI-CBG, Dresden, Germany 19

Demos (R)

1. I want to use templates

2. I want to write my own R-scripts

3. I want to create knimeR-workflows (generic nodes)

4. I want to create templates

5. I want to create a KNIME node with R behind

Page 20: KNIME UGM 2015 Antje Janosch – Technology Development Studio MPI-CBG Dresden

Antje Janosch, MPI-CBG, Dresden, Germany 20

Outlook

• Support of row IDs for all integrations and in both directions

• Console output view for R nodes• Keep offline copy of template files• Push KNIME color, size, shape descriptors• Support of domain values• …

Page 21: KNIME UGM 2015 Antje Janosch – Technology Development Studio MPI-CBG Dresden

Antje Janosch, MPI-CBG, Dresden, Germany 21

Contact us!

[email protected]@mpi-cbg.de