introduction to biological network analysis and visualization with cytoscape part 2

44
Introduction to Biological Network Analysis and Visualization with Cytoscape Keiichiro Ono Cytoscape Core Developer Team UC, San Diego Trey Ideker Lab / National Resource for Network Biology 5/12/2016 The Scripps Research Institute Lecture 2: Reproducible Workflows with Jupyter Notebook

Upload: keiichiro-ono

Post on 15-Apr-2017

987 views

Category:

Science


4 download

TRANSCRIPT

Page 1: Introduction to Biological Network Analysis and Visualization with Cytoscape Part 2

Introduction to Biological Network Analysis and Visualization with Cytoscape

Keiichiro OnoCytoscape Core Developer TeamUC, San Diego Trey Ideker Lab / National Resource for Network Biology

5/12/2016 The Scripps Research Institute

Lecture 2: Reproducible Workflows with Jupyter Notebook

Page 2: Introduction to Biological Network Analysis and Visualization with Cytoscape Part 2

Lecture slides are available here:

http://www.slideshare.net/keiono

Page 3: Introduction to Biological Network Analysis and Visualization with Cytoscape Part 2

Agenda

• Lecture 1: Introduction to Biological Network Analysis and Visualization

• What is the benefits of biological network analysis and visualization?

• Introduction to Cytoscape

• Preview of Lecture 2: cyREST

• Lecture 2 (Today):Reproducible Analysis & Visualization

• Introduction to Jupyter Notebook

• Create a reproducible network visualization workflows with Python

Page 4: Introduction to Biological Network Analysis and Visualization with Cytoscape Part 2

Review of Lecture 1

- Network analysis / visualization is a powerful method to get biological insights from your screening result

- Cytoscape is the de-facto standard tool to perform this type of analysis

Page 5: Introduction to Biological Network Analysis and Visualization with Cytoscape Part 2

Review of Lecture 1

-Core features of Cytoscape -Navigation (Pan/Zoom/Select) -Network / Table Data Import -Automatic Layout -Visual Style

Page 6: Introduction to Biological Network Analysis and Visualization with Cytoscape Part 2

Recap

Cytoscape Session File — for sharing results

But what about process?

Page 7: Introduction to Biological Network Analysis and Visualization with Cytoscape Part 2

Reproducibility

Page 8: Introduction to Biological Network Analysis and Visualization with Cytoscape Part 2

http://www.the-scientist.com/?articles.view/articleNo/43632/title/Get-With-the-Program/

https://theconversation.com/how-computers-broke-science-and-what-we-can-do-to-fix-it-49938http://www.nature.com/nature/journal/v483/n7391/full/483531a.html

Reproducibility…it’s a known issue

Page 9: Introduction to Biological Network Analysis and Visualization with Cytoscape Part 2

Problems- Reproducibility of biological research, especially for in vivo/vitro

experiments, is a hard problem

- But this is true even for in silico analysis! - OS version - Revision of scripts - Data analysis software versions - Version of data files - Command line parameters written on a paper napkin - “Black magic” only a grad student knows

- This is something we need to fix, using latest technologies and best practices

Page 10: Introduction to Biological Network Analysis and Visualization with Cytoscape Part 2

Typical Workflow

Page 11: Introduction to Biological Network Analysis and Visualization with Cytoscape Part 2

Data Preparation Analysis Visualization

Page 12: Introduction to Biological Network Analysis and Visualization with Cytoscape Part 2

Data Preparation

Page 13: Introduction to Biological Network Analysis and Visualization with Cytoscape Part 2

Data Preparation

- Cleansing

- Normalization

- Missing values

- Corrupted values

- Reformat

- Conversion

Page 14: Introduction to Biological Network Analysis and Visualization with Cytoscape Part 2

Data Preparation Analysis Visualization

Page 15: Introduction to Biological Network Analysis and Visualization with Cytoscape Part 2

Analysis

Page 16: Introduction to Biological Network Analysis and Visualization with Cytoscape Part 2

Analysis

- Filtering

- Standard graph statistics

- Density

- Betweenness - Centrality

- Clustering

- Community Detection

- GO enrichment analysis

Page 17: Introduction to Biological Network Analysis and Visualization with Cytoscape Part 2

Data Preparation Analysis Visualization

Page 18: Introduction to Biological Network Analysis and Visualization with Cytoscape Part 2

Visualization

Page 19: Introduction to Biological Network Analysis and Visualization with Cytoscape Part 2

Visualization

- Mapping

- Data points to visual variables

- Layout

- For graphs:

- Force-directed

- Tree

Page 20: Introduction to Biological Network Analysis and Visualization with Cytoscape Part 2

Data Preparation Analysis Visualization

Page 21: Introduction to Biological Network Analysis and Visualization with Cytoscape Part 2

Data Preparation

Analysis Visualization

Page 22: Introduction to Biological Network Analysis and Visualization with Cytoscape Part 2

Data Preparation

Analysis Visualization

Page 23: Introduction to Biological Network Analysis and Visualization with Cytoscape Part 2

Cytoscape for Interactive Visualization

Python for Data Manipulation / Analysis

Page 24: Introduction to Biological Network Analysis and Visualization with Cytoscape Part 2

Lab Notebook for in silico Experiments

Page 25: Introduction to Biological Network Analysis and Visualization with Cytoscape Part 2

Interactive Command-Line +

Markdown-based Documents

Page 26: Introduction to Biological Network Analysis and Visualization with Cytoscape Part 2

IPython Notebook? Jupyter?

Page 27: Introduction to Biological Network Analysis and Visualization with Cytoscape Part 2

IPython Notebook

Notebook UI

+ Python Kernel

Jupyter Notebook UI

+

Language Kernel

(R/Julia/etc.)

Page 28: Introduction to Biological Network Analysis and Visualization with Cytoscape Part 2

Language-Agnostic

- From next version (4.x), Python Notebook will be an implementation of Jupyter

- You can switch to other language kernels

- In this lecture, we will use Python, but you can use language of your choice to control Cytoscape

Page 29: Introduction to Biological Network Analysis and Visualization with Cytoscape Part 2
Page 30: Introduction to Biological Network Analysis and Visualization with Cytoscape Part 2

Question

• Cytoscape is a desktop application

• Point & click GUI operation

• Easy to use, but how can we make our workflow reproducible?

Page 31: Introduction to Biological Network Analysis and Visualization with Cytoscape Part 2

REST

Page 32: Introduction to Biological Network Analysis and Visualization with Cytoscape Part 2

What is cyREST?

- Platform-independent, RESTful API module for Cytoscape - Means you can access basic Cytoscape data objects

programmatically - Now it’s a Cytoscape Core feature!

REST

Page 33: Introduction to Biological Network Analysis and Visualization with Cytoscape Part 2

Interactive Data Analysis Environments

In-House Databases External Computing Resources

- Graph Layout- Statistical Analysis- Data Pre-processing

RStudio

- NumPy- SciPy- Pandas- NetworkX

IPython Notebook

File / Code Hosting ServicesPublic Data Repository

PSICQUIC Services

EBI RDF Platform

Other Bioinformatics Web Applications / Services

- igraph- rCurl

Command Line Tools

> sed> awk> grep> curl

Web Browsers

Data Repository & Collaboration Service

Data Bus (Internet)

Your Workstation

Cytoscape App Store

Cytoscape Desktop

Apps

Core

REST

Page 34: Introduction to Biological Network Analysis and Visualization with Cytoscape Part 2

REST

Cytoscape 3.1+Clients

POST

PUT

DELETE

GET

How cyREST Works

Page 35: Introduction to Biological Network Analysis and Visualization with Cytoscape Part 2

Mapping Cytoscape API to HTTP Methods

Create

Read

Update

Delete

Cytoscape Operations

POST

GET

PUT

DELETE

HTTP Methods

Page 36: Introduction to Biological Network Analysis and Visualization with Cytoscape Part 2

Get full network with unique ID 52 as JSON

GET http://localhost:1234/v1/networks/52

Page 37: Introduction to Biological Network Analysis and Visualization with Cytoscape Part 2

http://localhost:1234/v1/networks/52

Page 38: Introduction to Biological Network Analysis and Visualization with Cytoscape Part 2

Language-Specific Shims

For Python For R

Page 39: Introduction to Biological Network Analysis and Visualization with Cytoscape Part 2

REST

Page 40: Introduction to Biological Network Analysis and Visualization with Cytoscape Part 2

RESTLab notebook to record

your workflow

Make Cytoscape controllable via scripts

Manage multiple versions of your

notebooks and other scripts

Page 41: Introduction to Biological Network Analysis and Visualization with Cytoscape Part 2

-

- Two Google Groups

- [email protected]

- [email protected]

- ANY question is OK!

Getting Help

Page 42: Introduction to Biological Network Analysis and Visualization with Cytoscape Part 2

Further Readings

Page 43: Introduction to Biological Network Analysis and Visualization with Cytoscape Part 2

Further Readings

• My presentation slides

• http://www.slideshare.net/keiono

• cyREST web sites

• http://apps.cytoscape.org/apps/cyrest

• https://github.com/idekerlab/cyREST/wiki

• py2cytoscape — https://github.com/idekerlab/py2cytoscape