29
Understanding cancer behaviour with F# Evelina Gabasova F# eXchange 2015

Understanding cancer behaviour with F# · Sigma [ [m]] [ , k] R programming language Tap to add notes sqrt (1/Tau[ [m ... NOTES COMMENTS . Paste Clipboard HOME New Slide INSERT Layout

  • Upload
    others

  • View
    4

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Understanding cancer behaviour with F# · Sigma [ [m]] [ , k] R programming language Tap to add notes sqrt (1/Tau[ [m ... NOTES COMMENTS . Paste Clipboard HOME New Slide INSERT Layout

Understanding cancer behaviour with F#

Evelina Gabasova

F# eXchange 2015

Page 2: Understanding cancer behaviour with F# · Sigma [ [m]] [ , k] R programming language Tap to add notes sqrt (1/Tau[ [m ... NOTES COMMENTS . Paste Clipboard HOME New Slide INSERT Layout

Traditional medicine

Page 3: Understanding cancer behaviour with F# · Sigma [ [m]] [ , k] R programming language Tap to add notes sqrt (1/Tau[ [m ... NOTES COMMENTS . Paste Clipboard HOME New Slide INSERT Layout

Precision medicine

Page 4: Understanding cancer behaviour with F# · Sigma [ [m]] [ , k] R programming language Tap to add notes sqrt (1/Tau[ [m ... NOTES COMMENTS . Paste Clipboard HOME New Slide INSERT Layout
Page 5: Understanding cancer behaviour with F# · Sigma [ [m]] [ , k] R programming language Tap to add notes sqrt (1/Tau[ [m ... NOTES COMMENTS . Paste Clipboard HOME New Slide INSERT Layout

Integrative clusteringBreastcancer

Gene expression

microRNA expression

Methylation data

Reverse-phase protein array

Page 6: Understanding cancer behaviour with F# · Sigma [ [m]] [ , k] R programming language Tap to add notes sqrt (1/Tau[ [m ... NOTES COMMENTS . Paste Clipboard HOME New Slide INSERT Layout

Integrative clusteringBreastcancer

Data

Data Data

Data

Page 7: Understanding cancer behaviour with F# · Sigma [ [m]] [ , k] R programming language Tap to add notes sqrt (1/Tau[ [m ... NOTES COMMENTS . Paste Clipboard HOME New Slide INSERT Layout

Scientific programming

Scripting languages fast prototyping, easy to use

R, Python, Matlab

Page 8: Understanding cancer behaviour with F# · Sigma [ [m]] [ , k] R programming language Tap to add notes sqrt (1/Tau[ [m ... NOTES COMMENTS . Paste Clipboard HOME New Slide INSERT Layout

Why F#?

Page 9: Understanding cancer behaviour with F# · Sigma [ [m]] [ , k] R programming language Tap to add notes sqrt (1/Tau[ [m ... NOTES COMMENTS . Paste Clipboard HOME New Slide INSERT Layout

Why F#?

Vector? Matrix? List? Array? Data frame?

Page 10: Understanding cancer behaviour with F# · Sigma [ [m]] [ , k] R programming language Tap to add notes sqrt (1/Tau[ [m ... NOTES COMMENTS . Paste Clipboard HOME New Slide INSERT Layout

Why F#?

Page 11: Understanding cancer behaviour with F# · Sigma [ [m]] [ , k] R programming language Tap to add notes sqrt (1/Tau[ [m ... NOTES COMMENTS . Paste Clipboard HOME New Slide INSERT Layout

Case studyRewrite an algorithm from Matlab into F#

adaptive rejection sampling

Page 12: Understanding cancer behaviour with F# · Sigma [ [m]] [ , k] R programming language Tap to add notes sqrt (1/Tau[ [m ... NOTES COMMENTS . Paste Clipboard HOME New Slide INSERT Layout

Case study

Matlab

Page 13: Understanding cancer behaviour with F# · Sigma [ [m]] [ , k] R programming language Tap to add notes sqrt (1/Tau[ [m ... NOTES COMMENTS . Paste Clipboard HOME New Slide INSERT Layout

Pattern matching

Matlab

F#

Page 14: Understanding cancer behaviour with F# · Sigma [ [m]] [ , k] R programming language Tap to add notes sqrt (1/Tau[ [m ... NOTES COMMENTS . Paste Clipboard HOME New Slide INSERT Layout

Pattern matching

Matlab

F#

Page 15: Understanding cancer behaviour with F# · Sigma [ [m]] [ , k] R programming language Tap to add notes sqrt (1/Tau[ [m ... NOTES COMMENTS . Paste Clipboard HOME New Slide INSERT Layout

Legibility

Page 16: Understanding cancer behaviour with F# · Sigma [ [m]] [ , k] R programming language Tap to add notes sqrt (1/Tau[ [m ... NOTES COMMENTS . Paste Clipboard HOME New Slide INSERT Layout

Legibility

Page 17: Understanding cancer behaviour with F# · Sigma [ [m]] [ , k] R programming language Tap to add notes sqrt (1/Tau[ [m ... NOTES COMMENTS . Paste Clipboard HOME New Slide INSERT Layout

Legibility

Page 18: Understanding cancer behaviour with F# · Sigma [ [m]] [ , k] R programming language Tap to add notes sqrt (1/Tau[ [m ... NOTES COMMENTS . Paste Clipboard HOME New Slide INSERT Layout

Breastcancer

Gene expression

microRNA expression

Methylation data

Reverse-phase protein array

Typical workflow

Problem

Page 19: Understanding cancer behaviour with F# · Sigma [ [m]] [ , k] R programming language Tap to add notes sqrt (1/Tau[ [m ... NOTES COMMENTS . Paste Clipboard HOME New Slide INSERT Layout

Typical workflow

Problem

Model

Page 20: Understanding cancer behaviour with F# · Sigma [ [m]] [ , k] R programming language Tap to add notes sqrt (1/Tau[ [m ... NOTES COMMENTS . Paste Clipboard HOME New Slide INSERT Layout

Typical workflow

Problem

Model Evaluation

Page 21: Understanding cancer behaviour with F# · Sigma [ [m]] [ , k] R programming language Tap to add notes sqrt (1/Tau[ [m ... NOTES COMMENTS . Paste Clipboard HOME New Slide INSERT Layout

Typical workflow

Problem Data

Model Evaluation

Page 22: Understanding cancer behaviour with F# · Sigma [ [m]] [ , k] R programming language Tap to add notes sqrt (1/Tau[ [m ... NOTES COMMENTS . Paste Clipboard HOME New Slide INSERT Layout

Typical workflow

Problem Data

Model Evaluation

Usually takes much more time

than it should

Page 23: Understanding cancer behaviour with F# · Sigma [ [m]] [ , k] R programming language Tap to add notes sqrt (1/Tau[ [m ... NOTES COMMENTS . Paste Clipboard HOME New Slide INSERT Layout

Dealing with real-world data

Page 24: Understanding cancer behaviour with F# · Sigma [ [m]] [ , k] R programming language Tap to add notes sqrt (1/Tau[ [m ... NOTES COMMENTS . Paste Clipboard HOME New Slide INSERT Layout

Type providers

F# Data - typed access to external data sources

Csv files

JSON, XML, HTML

Page 25: Understanding cancer behaviour with F# · Sigma [ [m]] [ , k] R programming language Tap to add notes sqrt (1/Tau[ [m ... NOTES COMMENTS . Paste Clipboard HOME New Slide INSERT Layout

RProvider

Page 26: Understanding cancer behaviour with F# · Sigma [ [m]] [ , k] R programming language Tap to add notes sqrt (1/Tau[ [m ... NOTES COMMENTS . Paste Clipboard HOME New Slide INSERT Layout

Results

Page 27: Understanding cancer behaviour with F# · Sigma [ [m]] [ , k] R programming language Tap to add notes sqrt (1/Tau[ [m ... NOTES COMMENTS . Paste Clipboard HOME New Slide INSERT Layout

Results

Page 28: Understanding cancer behaviour with F# · Sigma [ [m]] [ , k] R programming language Tap to add notes sqrt (1/Tau[ [m ... NOTES COMMENTS . Paste Clipboard HOME New Slide INSERT Layout

So… why F#?• The best of both worlds: fast scripting & type system

• Easy access to data of different types

• Using R only for what it is good at

• Provide types for all the things!

Page 29: Understanding cancer behaviour with F# · Sigma [ [m]] [ , k] R programming language Tap to add notes sqrt (1/Tau[ [m ... NOTES COMMENTS . Paste Clipboard HOME New Slide INSERT Layout

Thank you

@evelgab

evelinag.com

[email protected]