44
Transformando Big Data en conocimiento: gotas de sistemas biológicos en la Nube Turning Big data into knowledge: systems biology droplets in the cloud IMPACT BioBITs Marco Aldinucci, Computer Science Dept., University of Torino, Italy FUNDACIÓN RAMÓN ARECES Jornada: El impacto de la Nube y el Big Data en la Ciencia Ciencias de la Vida y de la Materia Madrid, 21 de marzo de 2013

Bio BITs - unipi.it

  • Upload
    others

  • View
    6

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Bio BITs - unipi.it

Transformando Big Data en conocimiento: gotas de sistemas biológicos en la Nube

Turning Big data into knowledge: systems biology droplets in the cloud

IMPACT BioBITs

Marco Aldinucci,Computer Science Dept., University of Torino, Italy

FUNDACIÓN RAMÓN ARECESJornada: El impacto de la Nube y el Big Data en la CienciaCiencias de la Vida y de la MateriaMadrid, 21 de marzo de 2013

Page 2: Bio BITs - unipi.it

RationaleExtract information from the apparent chaos. In parallel, (also) exploiting the cloud. Focus on app development not on middleware.

2

?

Page 3: Bio BITs - unipi.it

noise 70% restored

originalM. Aldinucci et al. A parallel edge preserving algorithm for salt and pepper image denoising. Intl. IEEE Conference on Image Processing Theory Tools and Applications (IPTA). 2012

Page 4: Bio BITs - unipi.it

Questions answered at this point in time

• What is a cloud?

• how a cloud look-like at the hardware level• which nice pictures :-)

• what services are available in the cloud

• What is big data?

• which scientific domains are likely to produce large amount of data

• Parallel computing

• the urgency of novel programming models4

Page 5: Bio BITs - unipi.it

There are not free lunches in nature

• Multiplying by N the number of virtual cores and disks does not automatically turns in dividing computing time by N

• Cloud (oversimplified)• cluster of multi-core and many-core, with an a

number of storage architectures

• What is the cost, the complexity to support so many different architecture styles?

• and what is the efficiency of the application?

5

Page 6: Bio BITs - unipi.it

More questions• What cloud usage model?

• Grid-like (PaaS, IaaS)• not appealing for bio-scientist• not interactive, requires IT expertise

• enqueue tasks, wait for your turn, run the simulation, store data, transfer data, analyze data locally, interpret results, if something wrong, restart from begin

• Offload much of the complexity on the app programmer

• As a service (SaaS)• the whole simulation-analysis pipeline should be moved to the cloud• The whole software pipeline and all tools should be ported and

optimized for the cloud

6

Page 7: Bio BITs - unipi.it

Example: systems biology

Page 8: Bio BITs - unipi.it

Systems Biology & Gillespie’s algorithm

• Traditionally studied with continuous Ordinary Differential Equations (ODE)

• bulk reactions, i.e. average behavior

• Alternative approach: discrete and stochastic simulation of a systems via explicit simulation of each reaction

• Gillespie algorithm• More informative than ODE

• multi-stability, divergent or rare behaviors, peaks, ...

• More computing demanding

8

Page 9: Bio BITs - unipi.it

... a switch, when formalised

Courtesy of Luca Cardelli

On Switches and Oscillators Program

Equivalence in Biology?

http://lucacardelli.name

50

100

150

200

250

300

350

400

450

500

550

600

0 5 10 15 20

K-m

eans

clu

ster

s on

mol

ecul

es (a

)

time

Page 10: Bio BITs - unipi.it

Example: HIV and immune response(progression to AIDS)

U

V4

Z5T

Z4

V5

F

I4

λδuf

δut

δuz

δtf

I5βX4

βR5

γR5

γX4

σ2

σ2

δiz

δiz

σ3

π

π

μ

V virus, all phenotypes (V4,V5)

the spike suggests the mutation V5 →V4 (more aggressive)

immune response Z=Z4+Z5 remain stable (but for the peak).

now Z4 decrease and Z5 increase

i.e. HIV is turning intoAIDS more rapidly

M. Aldinucci, A. Bracciali, P. Liò, A. Sorathiya, and M. Torquati. StochKit-FF: Efficient systems biology on multicore architectures. In High Performance Bioinformatics and Biomedicine (HiBB), vol. 6586 of LNCS, 2011. Springer.

Page 11: Bio BITs - unipi.it

• Peaks are informative events,• virus mutation triggers AIDS progression• hardly detected with ODEs

• high resolution required to detect spikes,• each trajectory can be over 6G Bytes of data• The more precision the more data

• and thousands of trajectories are needed• compute everything, save everything, move and join

all data, analyse all data, then get first results• often to discover parameters was wrong ...

Page 12: Bio BITs - unipi.it

• It is Monte Carlo,• well understood

• easy to parallelize

• it is Monte Carlo w Markov Chains models (CTMC)• compute time ≠ simulation time

• compute time for different trajectories heavily unbalanced

• it is Monte Carlo and data analysis• data is big, analysis very expensive and it typically starts

after the simulation

• the whole workflow is perceived too “slow” by bio-scientists to be really useful

Page 13: Bio BITs - unipi.it

Simulated timeSimulated time Simulation dataSimulation dataSimulation data Seq Parallel (16 core Intel SandyBridge)Parallel (16 core Intel SandyBridge)Parallel (16 core Intel SandyBridge)

time resolution raw data size

output size MonteCarlo step latency

total time total time Throughput speedup

Neurospora 1 month ~ 25 s ~8 GB ~6.5MB 600 ns 20 min 93 s ~20 MB/s ~16

Neurospora 4 days ~1 s ~80 GB ~65MB 1600 ns 60 min ~5 min ~280 MB/s ~16

Neurospora 1 month ~1 s 640 GB 520 MB 1600 ns 8 hours ~30 min ~280 MB/s ~16

(Neurospora) Leloup J, Gonze D, Goldbeter A: Limit cycle models for circadian rhythms based on transcriptional regulation in Drosophila and Neurospora. Journal of Biological Rhythms 1999, 14(6):433.

what you need to storeand re-read with off-line filtering filtered data

15

Parallel simulation

(e.g. Monte Carlo)

Parallel analysis

(e.g. statistics and mining methods)

Display of results(e.g. GUI)

disksdisks

Page 14: Bio BITs - unipi.it

CollectorTraiectories

Post-processinge.g. parsing

Disk

Data analysis is not for free

RebalanceSchedulerParameter

Sweep

Model description

Pre-processinge.g. parsing

Worker nrun simulations

Worker 1run simulations

one or moresimulationinstance

one or moresimulationinstance

Disk 1

Disk n

16

Page 15: Bio BITs - unipi.it

CollectorTraiectories

Post-processinge.g. parsing

Disk

Data analysis is not for free

Rebalance

In BioSims the whole trajectory is needed, easily

GB of data

The whole dataset, TB of data, should be re-read to extract statistical estimators

SchedulerParameter

Sweep

Model description

Pre-processinge.g. parsing

Worker nrun simulations

Worker 1run simulations

one or moresimulationinstance

one or moresimulationinstance

Disk 1

Disk n

16

Page 16: Bio BITs - unipi.it

Example: NGS

Page 17: Bio BITs - unipi.it

DNA alignment• DNA sequencer output is composed by

short unordered sequences (reads)• Problem: mapping of read onto the right

position in the DNA• Very soon: Personalized drug design• Several existing tools:

• e.g. Bowtie, Shrimp, ...• Developed for multi-core servers, not for the

cloud

18

Page 18: Bio BITs - unipi.it

DNA alignment: Load distribution(human genome mapping, real clinical data)

19

0.1

1

10

100

1000

10000

100000

0 5000 10000 15000 20000 25000 30000

Tim

e (m

s)

Read number

ms per read

many very small tasks (<1ms)memory intensive, disk intensiverequires fine-grain techniques

few medium tasks (10 s)CPU intensive

requires load balancing

... and you don’tknow in advance whichone you are processing

Tim

e pe

r ta

sk (

ms)

Page 19: Bio BITs - unipi.it

How software is build?• Parallel computing

• already assessed

• Typically using platform specific methodologies

• Pthreads, MPI,

• Can this software run on the cloud?• Might need a complete re-design and re-

development• Does the users trust in the correctness of the

porting?

20

Page 20: Bio BITs - unipi.it

Programming for portabilitythe FastFlow example

http://mc-fastflow.sourceforge.net/University of Torino and Pisa, Italy

Page 21: Bio BITs - unipi.it

FastFlow

Streaming network patternsSkeletons: pipeline, map farm, reduce, D&C, ...

Arbitrary streaming networksLock-free SPSC/MPMC queues + FF nodes

Simple streaming networksLock-free SPSC queues + threading model

FastFlow

Multicore and manycoreSMP: cc-UMA & cc-NUMA

Applications on multicore, many core & distributed platforms of multicoresEfficient and portable - designed with high-level patterns

Distributed platformsClouds, clusters of SMPs

Simple streaming networksZero copy networking + processes model

Arbitrary streaming networksCollective communications + FF Dnodes

Page 22: Bio BITs - unipi.it

• farm• on CPU - master-worker - parallelism exploitation

• on GPU - CUDA streams - automatic exploitation of asynch comm

• pipeline• on CPU - pipeline

• on GPU - sequence of kernel calls or global mem synch

• map• on CPU - master-worker - parallelism exploitation

• on GPU - CUDA SIMT - parallelism exploitation

• reduce• on CPU - master-worker - parallelism exploitation

• on GPU - CUDA SIMT (reduction tree) - parallelism exploitation

• D&C• on CPU - master-worker with feedback - // exploitation

• on GPU - working on it, maybe loop+farm

Layer 3: streaming networks patterns

stream[k]

copy_D2H

kernel

copy_H2D

stream[0]

farm_start

stream[1] stream[n]

farm_start

23

Page 23: Bio BITs - unipi.it

Streaming networks patterns • Composition via C++ template meta-programming

• CPU: Graph composition

• GPU: CUDA streams

• CPU+GPU: offloading

• farm{ pipe }

• pipe(farm, farm)

• pipe(map, reduce)

• ....24

copy_D2H

kernel

copy_H2D

farm_start

copy_D2H

kernel

copy_H2D

copy_D2H

kernel

copy_H2D

farm_start

Multi-core& distributed

GPGPU

i.e. Google’s MapReduce

Page 24: Bio BITs - unipi.it

FastFlow-SWPS3 - Smith-Waterman(among the fastest SW implementation around)

SW1

SW2

SWn

UniProtKBSwiss-Prot

471472 sequences 167326533 amino-acids

QuerySequences

Results

25

bette

r

Page 25: Bio BITs - unipi.it

A bio test caseCWC parallel simulation-analisys pipeline

http://mc-fastflow.sourceforge.net/

Page 26: Bio BITs - unipi.it

simeng

gath

er

simeng

disp

tach

incomplete simulation tasks (with load balancing)

farm

alig

nmen

t of

traje

ctor

ies

gene

ratio

n of

si

mul

atio

n ta

sks

simulation pipeline

start new simulations, steer and terminate running simulations

stateng

gath

er

disp

tach

farm

gene

ratio

n of

sl

idin

g w

indo

ws

of tr

ajec

torie

sraw simulation

results display ofresults

---Graphical

UserInterface

meanvariance k-means

filtered simulation

results

stateng

analysis pipelinemain pipeline

Monte Carlo sim for system bio

27

fast shared-memorychannel

parallel simulation pipeline analysis pipeline

Aldinucci et al. IEEE PDP 2011, HiBB 2011, IEEE PDP 2013

Page 27: Bio BITs - unipi.it

simeng

gath

er

simeng

disp

tach

incomplete simulation tasks (with load balancing)

farm

alig

nmen

t of

traje

ctor

ies

gene

ratio

n of

si

mul

atio

n ta

sks

simulation pipeline

start new simulations, steer and terminate running simulations

stateng

gath

er

disp

tach

farm

gene

ratio

n of

sl

idin

g w

indo

ws

of tr

ajec

torie

sraw simulation

results display ofresults

---Graphical

UserInterface

meanvariance k-means

filtered simulation

results

stateng

analysis pipelinemain pipeline

reducereduce reducereduce

a1 a2 a3 a4 b1 b2 b3 b4

c1 c2 c3 c4 d1 d2 d3 d4

e1 e2 e3 e4 f1 f2 f3 f4

{a,b}@P1

{c,d}@P2

{e,f}@P3

a1 b1

c1

e1

d1

f1

b2

c2

e2 f2

b3

a2

d2

e3 f3

c3

b4

d3

a3 e4

f4c4 d4

a4

{a,b}@P1

{c,d}@P2

{e,f}@P3

idle

F(a,...,f)

F(a,...,f)

idle

a1 b1

c1

e1

d1

f1

b2

c2

e2 f2

b3

a2

d2

e3 f3

c3

b4

d3

a3 e4

f4c4 d4

a4

{a,b}@P1

{c,d}@P2

{e,f}@P3

F2(a,...f)

simulationwall-clocktime

trajectory reduction

gainF1(a,...f)

F3(a,...f)

F4(a,...f)

ii)

iii)

i)

1's runs 2's runs 4's 3's

M. Aldinucci, M. Coppo, F. Damiani, M. Drocco, M. Torquati, A. Troina. On designing multicore-aware simulators for biological systems. PDP 2011. 2011. IEEE.28

Page 28: Bio BITs - unipi.it

simeng

gather

simeng

disp

tach

Scat

ter c

onsu

mer

From

Any

prod

ucer

mean variance

quantiles

QT clusters

k-means

M. Aldinucci, M. Coppo, F. Damiani, M. Drocco, E. Sciacca, S. Spinella, M. Torquati, A. Troina. On parallelizing on-line statistics for stochastic biological simulations. In Euro-Par 2011 Workshops, HiBB, vol 7155 of LNCS.

simeng

gath

er

simeng

disp

tach

incomplete simulation tasks (with load balancing)

farm

alig

nmen

t of

traje

ctor

ies

gene

ratio

n of

si

mul

atio

n ta

sks

simulation pipeline

start new simulations, steer and terminate running simulations

stateng

gath

er

disp

tach

farm

gene

ratio

n of

sl

idin

g w

indo

ws

of tr

ajec

torie

sraw simulation

results display ofresults

---Graphical

UserInterface

meanvariance k-means

filtered simulation

results

stateng

analysis pipelinemain pipeline

29

Page 29: Bio BITs - unipi.it

simeng

gather

simeng

disp

tach

Scat

ter c

onsu

mer

From

Any

prod

ucersim

eng

gath

er

simeng

disp

tach

sim farm

gene

ratio

n of

si

mul

atio

n ta

sks

(sca

tter p

rodu

cer)

Scat

ter c

onsu

mer

From

Any

prod

ucer

simulation pipeline (host 1)

simeng

gath

er

simeng

disp

tach

sim farm

Scat

ter c

onsu

mer

From

Any

prod

ucer

simulation pipeline (host n) alig

nmen

t of

traje

ctor

ies

(sca

tter c

ons)

farm of simulation pipelines

(distributed)

main pipeline (host 0)

stateng

gath

er

disp

tach

farm

gene

ratio

n of

sl

idin

g w

indo

ws

of tr

ajec

torie

sraw simulation

results display ofresults

---Graphical

UserInterface

meanvariance k-means

filtered simulation

results

stateng

analysis pipelinemain pipeline

gene

ratio

n of

si

mul

atio

n ta

sks

(sca

tter p

rodu

cer)

Scat

ter c

onsu

mer

Scat

ter c

onsu

mer

From

Any

prod

ucer

From

Any

prod

ucer

alig

nmen

t of

traje

ctor

ies

(sca

tter c

ons)

stream scatter network channel

stream join network channel

simeng

gath

er

simeng

disp

tach

incomplete simulation tasks (with load balancing)

farm

alig

nmen

t of

traje

ctor

ies

gene

ratio

n of

si

mul

atio

n ta

sks

simulation pipeline

start new simulations, steer and terminate running simulations

stateng

gath

er

disp

tach

farm

gene

ratio

n of

sl

idin

g w

indo

ws

of tr

ajec

torie

sraw simulation

results display ofresults

---Graphical

UserInterface

meanvariance k-means

filtered simulation

results

stateng

analysis pipelinemain pipeline

30

Distributed

Page 30: Bio BITs - unipi.it

The key points• exactly the same code: pipeline(farm,farm)• the porting problem is moved from the

programmers to development tools• with good performance portability

31

0

5

10

15

20

25

30

35

5 10 15 20 25 30

spee

dup

n. sim. workers

ideal128 trajectories512 trajectories

1024 trajectories 0

5

10

15

20

25

30

35

5 10 15 20 25 30

spee

dup

n. sim. workers

ideal128 trajectories512 trajectories

1024 trajectories

1 stat engine 4 stat engines

Page 31: Bio BITs - unipi.it

32

simeng

gath

er

simeng

disp

tach

farm

Scat

ter c

onsu

mer

From

Any

prod

ucer

simulation pipelinevirtual multi-core host 1

stateng

gather

disptach

farm

alignment oftrajectories

mean

variancek-m

eans

stateng

analysis pipeline

simeng

gath

er

simeng

disp

tach

farm

Scat

ter c

onsu

mer

From

Any

prod

ucer

simulation pipelinevirtual multi-core host ...

simeng

gath

er

simeng

disp

tach

farm

Scat

ter c

onsu

mer

From

Any

prod

ucer

simulation pipelinevirtual multi-core host n-1

virtualmulti-core

host 0

IaaS cloud

stream of filtered simulation results

biological model

model dispatch(scatter)

web port web port

graphicaluser

interface

streams of raw simulation

trajectories

simeng

gath

er

simeng

disp

tach

farm

gene

ratio

n of

sim

ulat

ion

task

s

gath

er o

f par

tial

resu

lts

simulation pipeline

virtual multi-core host n

... and on the cloud running as a service(and exactly with the same code)

Page 32: Bio BITs - unipi.it

33

Amazon EC2 performances

Page 33: Bio BITs - unipi.it

Involved data

• Simple examples (neurospora, ...)• 2-4 double * n. of variables * n. of samples x n.

of trajectories * cases in sensitivity analysis• e.g.4*8*4*1M*1k*8 ~ 1 TBytes

• HIV 6GB x 1024 trajectories ~ 6TB• The more observed variables,

resolution/precision, cases for sensitivity analysis, the more data

34

Page 34: Bio BITs - unipi.it

Extracting knowledgeas fully on-line process

Page 35: Bio BITs - unipi.it

Rationale• Working on data as soon as they are

produced (in pipeline)• immediate answer to the bio-scientist• when you see the first page of a Google

search the searching is still on going

• Work on sliding windows of data instead of the full dataset

• many standard mining techniques still applicable

36

Page 36: Bio BITs - unipi.it

time

trajectories Trajectory 1

Trajectory n

...

simeng

gath

er

simeng

disp

tach

incomplete simulation tasks (with load balancing)

farm

alig

nmen

t of

traje

ctor

ies

gene

ratio

n of

si

mul

atio

n ta

sks

simulation pipeline

start new simulations, steer and terminate running simulations

stateng

gath

er

disp

tach

farm

gene

ratio

n of

sl

idin

g w

indo

ws

of tr

ajec

torie

sraw simulation

results display ofresults

---Graphical

UserInterface

meanvariance k-means

filtered simulation

results

stateng

analysis pipelinemain pipeline

37

Page 37: Bio BITs - unipi.it

time

trajectories

simulation-time aligned trajectories

simeng

gath

er

simeng

disp

tach

incomplete simulation tasks (with load balancing)

farm

alig

nmen

t of

traje

ctor

ies

gene

ratio

n of

si

mul

atio

n ta

sks

simulation pipeline

start new simulations, steer and terminate running simulations

stateng

gath

er

disp

tach

farm

gene

ratio

n of

sl

idin

g w

indo

ws

of tr

ajec

torie

sraw simulation

results display ofresults

---Graphical

UserInterface

meanvariance k-means

filtered simulation

results

stateng

analysis pipelinemain pipeline

37

Page 38: Bio BITs - unipi.it

time

trajectories

simeng

gath

er

simeng

disp

tach

incomplete simulation tasks (with load balancing)

farm

alig

nmen

t of

traje

ctor

ies

gene

ratio

n of

si

mul

atio

n ta

sks

simulation pipeline

start new simulations, steer and terminate running simulations

stateng

gath

er

disp

tach

farm

gene

ratio

n of

sl

idin

g w

indo

ws

of tr

ajec

torie

sraw simulation

results display ofresults

---Graphical

UserInterface

meanvariance k-means

filtered simulation

results

stateng

analysis pipelinemain pipeline

37

Page 39: Bio BITs - unipi.it

time

trajectories

dispatch

task

task

task

simeng

gath

er

simeng

disp

tach

incomplete simulation tasks (with load balancing)

farm

alig

nmen

t of

traje

ctor

ies

gene

ratio

n of

si

mul

atio

n ta

sks

simulation pipeline

start new simulations, steer and terminate running simulations

stateng

gath

er

disp

tach

farm

gene

ratio

n of

sl

idin

g w

indo

ws

of tr

ajec

torie

sraw simulation

results display ofresults

---Graphical

UserInterface

meanvariance k-means

filtered simulation

results

stateng

analysis pipelinemain pipeline

37

Page 40: Bio BITs - unipi.it

50

100

150

200

250

300

350

400

450

500

550

600

0 5 10 15 20

K-m

eans

clu

ster

s on

mol

ecul

es (a

)

time

0

100

200

300

400

500

600

700

0 5 10 15 20

num

ber o

f "a"

mol

ecul

es

time

raw simulationsstandard deviation

mean

Schlögl modelautocatalytic, tri-molecular reaction scheme (bistable)

Notice this is a clustering of curves and is done while the curves are not yet fully produced.

It can be done on-line with very good approximation.

38

Page 41: Bio BITs - unipi.it

Bacteriophage λ life cycleintegration of a strand of DNA in the molecule of E. coli DNA(multi-stable)

0

10

20

30

40

50

60

70

0 20 40 60 80 100 120

# M

olec

ules

(CI)

time

5

10

15

20

25

30

35

40

45

50

0 20 40 60 80 100 120

QT

clu

ste

rs w

ith t

ren

ds

(CI)

time

39

Page 42: Bio BITs - unipi.it

Transcriptional regulation in Neurospora(circadian clock period detection)

0.026

0.028

0.03

0.032

0.034

0.036

0.038

0.04

dark light dark light

Peak

freq

uenc

y

Light condition phases

0

200

400

600

800

1000

Ligh

t Con

ditio

n

0

200

400

600

800

1000

0 50 100 150 200

Dar

k C

ondi

tion

Time in hours

40

Page 43: Bio BITs - unipi.it

Conclusions• Cloud will have a huge impact on other sciences• The more clouds, the more rain fall onto programmers

• programming models can hardly dominate heterogeneity• performance portability is still a big issue

• Design with high-level approach• help the porting from multi-core to cloud

• with performance portability

• MapReduce is an example, not the only one

• Data analysis is more difficult than simulation• not embarrassingly parallel• MapReduce will not be enough, we need a programming model

41

Page 44: Bio BITs - unipi.it

• Projects• Paraphrase: Parallel Patterns for Adaptive Heterogeneous Multicore Systems (EU-FP7

STREP, 2011-2014, 3.5 M€)• IMPACT: Innovative Methods for Particle Colliders at the Terascale (2012-2015, 400 K

€)• HiPEAC: High Performance and Embedded Architecture and Compilation (EU

Network of Excellence, 2012-2016)• BETTY: Behavioral Types for Reliable Large-Scale Software Systems (EU Cost Action,

2012-2016)• BioBITS: Converging technologies: Biotechnology-ICT (2008-2012)

• Contributions from my group• Guilherme Peretti Pezzi, Irfan Uddin, Fabio Tordini, Claudia Misale, Maurizio Drocco

• Contributions for HPC from• Massimo Torquati (Pisa), Massimiliano Meneghin (IBM Research), Marco Danelutto

(Pisa), Peter Kilpatrick (Belfast),

• Contributions for biological models from• Luca Cardelli (Microsoft), Pietro Liò (Cambridge), Andrea Bracciali (Stirling), Eva

Sciacca, Salvatore Spinella, Mario Coppo, Angelo Troina, Ferruccio Damiani, Cristina Calcagno (Torino)

Acknowledgements

IMPACT

BioBITs

42