Scripting Integration Workshop Antje Janosch Technology - - PowerPoint PPT Presentation

scripting integration workshop
SMART_READER_LITE
LIVE PREVIEW

Scripting Integration Workshop Antje Janosch Technology - - PowerPoint PPT Presentation

KNIME SUMMIT 2016 Scripting Integration Workshop Antje Janosch Technology Development Studio MPI-CBG Dresden History ? ? R-Scrip4ng, Python Scrip4ng, Matlab Scrip4ng 2009 2010 2016 2013 / 2014 2 Antje Janosch, MPI-CBG, Dresden,


slide-1
SLIDE 1

KNIME SUMMIT 2016

Antje Janosch – Technology Development Studio MPI-CBG Dresden

Scripting Integration Workshop

slide-2
SLIDE 2

History

Antje Janosch, MPI-CBG, Dresden, Germany

2

2009 2016

?

R-Scrip4ng, Python Scrip4ng, Matlab Scrip4ng

2010

?

2013 / 2014

slide-3
SLIDE 3

General Features

  • Server/Client based solu4on
  • Parallel execu4on
  • Centralized setup
  • Remote template repositories
  • Template configura4on via “KNIME-like” GUI
  • Deployment of KNIME-nodes with scrip4ng

behind

Antje Janosch, MPI-CBG, Dresden, Germany

3

slide-4
SLIDE 4

Short news

R

  • RowID support (both direc4ons)
  • Domain values
  • Color / Size / Shape model support
  • Flow variable support
  • Chunked transfer
  • ‘Open external’
  • R-workspace as generic R port

Antje Janosch, MPI-CBG, Dresden, Germany

4

slide-5
SLIDE 5

Client-(server) model

Antje Janosch, MPI-CBG, Dresden, Germany

5

RServe

remote or local

Matlab- Server

local remote or local local

Python- Server

remote or local

slide-6
SLIDE 6

Getting started (Client)

  • Install Scrip4ng plugins from “Trusted Community

Contribu4ons” update site (KNIME >= 3.0 recommended)

Antje Janosch, MPI-CBG, Dresden, Germany

6

slide-7
SLIDE 7

Preferences

Antje Janosch, MPI-CBG, Dresden, Germany

7

slide-8
SLIDE 8

Node Types

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

Antje Janosch, MPI-CBG, Dresden, Germany

8

slide-9
SLIDE 9

Plot / Snippet – Script editor tab

Antje Janosch, MPI-CBG, Dresden, Germany

9

Column names Scripting area

slide-10
SLIDE 10

Plot / Snippet – Template tab

slide-11
SLIDE 11

Plot / Snippet – Template tab

Template Repository

slide-12
SLIDE 12

Plot / Snippet – Template tab

Template Repository

slide-13
SLIDE 13

Plot / Snippet – Template tab

Template Repository

slide-14
SLIDE 14

Plot / Snippet – Template tab

Template Repository Template Description / Source

slide-15
SLIDE 15

Plot / Snippet – Template tab

Template Repository Template Description / Source

slide-16
SLIDE 16

Script editor tab – template view

Antje Janosch, MPI-CBG, Dresden, Germany

16

slide-17
SLIDE 17

Script editor tab – template view

Antje Janosch, MPI-CBG, Dresden, Germany

17

RGG interface of the selected template

slide-18
SLIDE 18

Script editor tab – template view

Antje Janosch, MPI-CBG, Dresden, Germany

18

RGG interface of the selected template

slide-19
SLIDE 19

Script editor tab – template view

Antje Janosch, MPI-CBG, Dresden, Germany

19

RGG interface of the selected template

slide-20
SLIDE 20

Script editor tab – template view

Antje Janosch, MPI-CBG, Dresden, Germany

20

RGG interface of the selected template

slide-21
SLIDE 21

Script editor tab – template view

Antje Janosch, MPI-CBG, Dresden, Germany

21

slide-22
SLIDE 22

Script editor tab – template view

Antje Janosch, MPI-CBG, Dresden, Germany

22

modify template (dev)

slide-23
SLIDE 23

Script editor tab – template view

Antje Janosch, MPI-CBG, Dresden, Germany

23

modify template (dev) RGG (XML)

slide-24
SLIDE 24

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 selec4on (comma separated

  • Press Apple/Windows key

and select mul4ple = 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

Antje Janosch, MPI-CBG, Dresden, Germany

24

slide-25
SLIDE 25

Plot – Output Options tab

Antje Janosch, MPI-CBG, Dresden, Germany

25

Placeholders for filename $$DATE$$ - yymmdd $$USER$$ - user name $$WS$$ - knime.workspace FLOWVAR(varName) – flow variable

slide-26
SLIDE 26

Plot - View options (R)

  • Dynamic repain4ng acer mouse click

Antje Janosch, MPI-CBG, Dresden, Germany

26

slide-27
SLIDE 27

KNIME tables in R

  • Input ports (kIn or kIn1, kIn2, …)
  • R data.frame
  • RowIDs as row names
  • Domain values as factor levels
  • Color model (kIn.color.model)
  • R data.frame
  • Colors as hex-values
  • Shape model (kIn.shape.model)
  • R data.frame
  • Shapes as pch and their KNIME name

Antje Janosch, MPI-CBG, Dresden, Germany

27

slide-28
SLIDE 28

KNIME tables in R

  • Size model (kIn.size.model + kIn.size.model.fun)
  • Name of the column having a size model
  • Func4on to calculate the size

based on the KNIME size model

  • Flow variables

(knime.flow.in)

  • R list

Antje Janosch, MPI-CBG, Dresden, Germany

28

slide-29
SLIDE 29

KNIME tables in R

  • Size model (kIn.size.model + kIn.size.model.fun)
  • Name of the column having a size model
  • Func4on to calculate the size

based on the KNIME size model

  • Flow variables

(knime.flow.in)

  • R list

Antje Janosch, MPI-CBG, Dresden, Germany

29

slide-30
SLIDE 30

KNIME tables in R

  • Size model (kIn.size.model + kIn.size.model.fun)
  • Name of the column having a size model
  • Func4on to calculate the size

based on the KNIME size model

  • Flow variables

(knime.flow.in)

  • R list

Antje Janosch, MPI-CBG, Dresden, Germany

30

slide-31
SLIDE 31

Template repositories Template.txt

Antje Janosch, MPI-CBG, Dresden, Germany

31

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

slide-32
SLIDE 32

RGG

  • R GUI Generator
  • Addi4onal element

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


Antje Janosch, MPI-CBG, Dresden, Germany

32

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>

slide-33
SLIDE 33

RGG

  • Placeholders

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

Antje Janosch, MPI-CBG, Dresden, Germany

33

slide-34
SLIDE 34

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

Antje Janosch, MPI-CBG, Dresden, Germany

34

slide-35
SLIDE 35

Outlook

  • Support of row IDs for Python/Matlab and for

both direc4ons

  • Console output view for R nodes
  • Keep offline copy of template files

Antje Janosch, MPI-CBG, Dresden, Germany

35

slide-36
SLIDE 36

Contact us!

antje.janosch@mpi-cbg.de stoeter@mpi-cbg.de

Antje Janosch, MPI-CBG, Dresden, Germany

36