pattern recognition introduction to bioinformatics 2006 lecture 4

51
Pattern Recognition Introduction to bioinformatics 2006 Lecture 4

Upload: peter-powers

Post on 13-Jan-2016

220 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Pattern Recognition Introduction to bioinformatics 2006 Lecture 4

Pattern Recognition

Introduction to bioinformatics 2006

Lecture 4

Page 2: Pattern Recognition Introduction to bioinformatics 2006 Lecture 4

PatternsSome are easy some are not

• Knitting patterns

• Cooking recipes

• Pictures (dot plots)

• Colour patterns

• Maps

In 2D and 3D humans are hard to be beat by a computational pattern recognition technique, but humans are not so consistent

Page 3: Pattern Recognition Introduction to bioinformatics 2006 Lecture 4

Example of algorithm reuse: Data clustering

• Many biological data analysis problems can be formulated as clustering problems– microarray gene expression data analysis– identification of regulatory binding sites (similarly, splice

junction sites, translation start sites, ......)– (yeast) two-hybrid data analysis (experimental technique

for inference of protein complexes)– phylogenetic tree clustering (for inference of horizontally

transferred genes)– protein domain identification– identification of structural motifs– prediction reliability assessment of protein structures– NMR peak assignments – ......

Page 4: Pattern Recognition Introduction to bioinformatics 2006 Lecture 4

Data Clustering Problems

• Clustering: partition a data set into clusters so that data points of the same cluster are “similar” and points of different clusters are “dissimilar”

• Cluster identification -- identifying clusters with significantly different features than the background

Page 5: Pattern Recognition Introduction to bioinformatics 2006 Lecture 4

Application Examples• Regulatory binding site identification: CRP (CAP) binding site

• Two hybrid data analysis Gene expression data analysis

These problems are all solvable by a clustering algorithm

Page 6: Pattern Recognition Introduction to bioinformatics 2006 Lecture 4

Multivariate statistics – Cluster analysis

12345

C1 C2 C3 C4 C5 C6 ..

Raw tableAny set of numbers per column

•Multi-dimensional problems

•Objects can be viewed as a cloud of points in a multidimensional space

•Need ways to group the data

Page 7: Pattern Recognition Introduction to bioinformatics 2006 Lecture 4

Multivariate statistics – Cluster analysis

Dendrogram

Scores

Similaritymatrix

5×5

12345

C1 C2 C3 C4 C5 C6 ..

Raw table

Similarity criterion

Cluster criterion

Any set of numbers per column

Page 8: Pattern Recognition Introduction to bioinformatics 2006 Lecture 4

Comparing sequences - Similarity Score -

Many properties can be used:

• Nucleotide or amino acid composition

• Isoelectric point

• Molecular weight

• Morphological characters

• But: molecular evolution through sequence alignment

Page 9: Pattern Recognition Introduction to bioinformatics 2006 Lecture 4

Multivariate statistics – Cluster analysisNow for sequences

Phylogenetic tree

Scores

Similaritymatrix

5×5

Multiple sequence alignment

12345

Similarity criterion

Cluster criterion

Page 10: Pattern Recognition Introduction to bioinformatics 2006 Lecture 4

Human -KITVVGVGAVGMACAISILMKDLADELALVDVIEDKLKGEMMDLQHGSLFLRTPKIVSGKDYNVTANSKLVIITAGARQ Chicken -KISVVGVGAVGMACAISILMKDLADELTLVDVVEDKLKGEMMDLQHGSLFLKTPKITSGKDYSVTAHSKLVIVTAGARQ Dogfish –KITVVGVGAVGMACAISILMKDLADEVALVDVMEDKLKGEMMDLQHGSLFLHTAKIVSGKDYSVSAGSKLVVITAGARQLamprey SKVTIVGVGQVGMAAAISVLLRDLADELALVDVVEDRLKGEMMDLLHGSLFLKTAKIVADKDYSVTAGSRLVVVTAGARQ Barley TKISVIGAGNVGMAIAQTILTQNLADEIALVDALPDKLRGEALDLQHAAAFLPRVRI-SGTDAAVTKNSDLVIVTAGARQ Maizey casei -KVILVGDGAVGSSYAYAMVLQGIAQEIGIVDIFKDKTKGDAIDLSNALPFTSPKKIYSA-EYSDAKDADLVVITAGAPQ Bacillus TKVSVIGAGNVGMAIAQTILTRDLADEIALVDAVPDKLRGEMLDLQHAAAFLPRTRLVSGTDMSVTRGSDLVIVTAGARQ Lacto__ste -RVVVIGAGFVGASYVFALMNQGIADEIVLIDANESKAIGDAMDFNHGKVFAPKPVDIWHGDYDDCRDADLVVICAGANQ Lacto_plant QKVVLVGDGAVGSSYAFAMAQQGIAEEFVIVDVVKDRTKGDALDLEDAQAFTAPKKIYSG-EYSDCKDADLVVITAGAPQ Therma_mari MKIGIVGLGRVGSSTAFALLMKGFAREMVLIDVDKKRAEGDALDLIHGTPFTRRANIYAG-DYADLKGSDVVIVAAGVPQ Bifido -KLAVIGAGAVGSTLAFAAAQRGIAREIVLEDIAKERVEAEVLDMQHGSSFYPTVSIDGSDDPEICRDADMVVITAGPRQ Thermus_aqua MKVGIVGSGFVGSATAYALVLQGVAREVVLVDLDRKLAQAHAEDILHATPFAHPVWVRSGW-YEDLEGARVVIVAAGVAQ Mycoplasma -KIALIGAGNVGNSFLYAAMNQGLASEYGIIDINPDFADGNAFDFEDASASLPFPISVSRYEYKDLKDADFIVITAGRPQ

Lactate dehydrogenase multiple alignment

Distance Matrix 1 2 3 4 5 6 7 8 9 10 11 12 13 1 Human 0.000 0.112 0.128 0.202 0.378 0.346 0.530 0.551 0.512 0.524 0.528 0.635 0.637 2 Chicken 0.112 0.000 0.155 0.214 0.382 0.348 0.538 0.569 0.516 0.524 0.524 0.631 0.651 3 Dogfish 0.128 0.155 0.000 0.196 0.389 0.337 0.522 0.567 0.516 0.512 0.524 0.600 0.655 4 Lamprey 0.202 0.214 0.196 0.000 0.426 0.356 0.553 0.589 0.544 0.503 0.544 0.616 0.669 5 Barley 0.378 0.382 0.389 0.426 0.000 0.171 0.536 0.565 0.526 0.547 0.516 0.629 0.575 6 Maizey 0.346 0.348 0.337 0.356 0.171 0.000 0.557 0.563 0.538 0.555 0.518 0.643 0.587 7 Lacto_casei 0.530 0.538 0.522 0.553 0.536 0.557 0.000 0.518 0.208 0.445 0.561 0.526 0.501 8 Bacillus_stea 0.551 0.569 0.567 0.589 0.565 0.563 0.518 0.000 0.477 0.536 0.536 0.598 0.495 9 Lacto_plant 0.512 0.516 0.516 0.544 0.526 0.538 0.208 0.477 0.000 0.433 0.489 0.563 0.485 10 Therma_mari 0.524 0.524 0.512 0.503 0.547 0.555 0.445 0.536 0.433 0.000 0.532 0.405 0.598 11 Bifido 0.528 0.524 0.524 0.544 0.516 0.518 0.561 0.536 0.489 0.532 0.000 0.604 0.614 12 Thermus_aqua 0.635 0.631 0.600 0.616 0.629 0.643 0.526 0.598 0.563 0.405 0.604 0.000 0.641 13 Mycoplasma 0.637 0.651 0.655 0.669 0.575 0.587 0.501 0.495 0.485 0.598 0.614 0.641 0.000

How can you see that this is a distance matrix?

Page 11: Pattern Recognition Introduction to bioinformatics 2006 Lecture 4
Page 12: Pattern Recognition Introduction to bioinformatics 2006 Lecture 4

Multivariate statistics – Cluster analysis

Dendrogram/tree

Scores

Similaritymatrix

5×5

12345

C1 C2 C3 C4 C5 C6 ..

Data table

Similarity criterion

Cluster criterion

Page 13: Pattern Recognition Introduction to bioinformatics 2006 Lecture 4

Multivariate statistics – Cluster analysis

Why do it?• Finding a true typology• Model fitting• Prediction based on groups• Hypothesis testing• Data exploration• Data reduction• Hypothesis generation But you can never prove a

classification/typology!

Page 14: Pattern Recognition Introduction to bioinformatics 2006 Lecture 4

Cluster analysis – data normalisation/weighting

12345

C1 C2 C3 C4 C5 C6 ..

Raw table

Normalisation criterion

12345

C1 C2 C3 C4 C5 C6 ..

Normalised table

Column normalisation x/max

Column range normalise (x-min)/(max-min)

Page 15: Pattern Recognition Introduction to bioinformatics 2006 Lecture 4

Cluster analysis – (dis)similarity matrix

Scores

Similaritymatrix

5×5

12345

C1 C2 C3 C4 C5 C6 ..

Raw table

Similarity criterion

Di,j = (k | xik – xjk|r)1/r Minkowski metrics

r = 2 Euclidean distancer = 1 City block distance

Page 16: Pattern Recognition Introduction to bioinformatics 2006 Lecture 4

Cluster analysis – Clustering criteria

Dendrogram (tree)

Scores

Similaritymatrix

5×5

Cluster criterion

Single linkage - Nearest neighbour

Complete linkage – Furthest neighbour

Group averaging – UPGMA

Ward

Neighbour joining – global measure

Page 17: Pattern Recognition Introduction to bioinformatics 2006 Lecture 4

Cluster analysis – Clustering criteria

1. Start with N clusters of 1 object each

2. Apply clustering distance criterion iteratively until you have 1 cluster of N objects

3. Most interesting clustering somewhere in between

Dendrogram (tree)

distance

N clusters1 cluster

Page 18: Pattern Recognition Introduction to bioinformatics 2006 Lecture 4

Single linkage clustering (nearest neighbour)

Char 1

Char 2

Page 19: Pattern Recognition Introduction to bioinformatics 2006 Lecture 4

Single linkage clustering (nearest neighbour)

Char 1

Char 2

Page 20: Pattern Recognition Introduction to bioinformatics 2006 Lecture 4

Single linkage clustering (nearest neighbour)

Char 1

Char 2

Page 21: Pattern Recognition Introduction to bioinformatics 2006 Lecture 4

Single linkage clustering (nearest neighbour)

Char 1

Char 2

Page 22: Pattern Recognition Introduction to bioinformatics 2006 Lecture 4

Single linkage clustering (nearest neighbour)

Char 1

Char 2

Page 23: Pattern Recognition Introduction to bioinformatics 2006 Lecture 4

Single linkage clustering (nearest neighbour)

Char 1

Char 2

Distance from point to cluster is defined as the smallest distance between that point and any point in the cluster

Page 24: Pattern Recognition Introduction to bioinformatics 2006 Lecture 4

Single linkage clustering (nearest neighbour)

Single linkage dendrograms typically show chaining behaviour (i.e., all the time a single object is added to existing cluster)

Let Ci and Cj be two disjoint clusters:

di,j = Min(dp,q), where p Ci and q Cj

Page 25: Pattern Recognition Introduction to bioinformatics 2006 Lecture 4

Complete linkage clustering (furthest neighbour)

Char 1

Char 2

Page 26: Pattern Recognition Introduction to bioinformatics 2006 Lecture 4

Complete linkage clustering (furthest neighbour)

Char 1

Char 2

Page 27: Pattern Recognition Introduction to bioinformatics 2006 Lecture 4

Complete linkage clustering (furthest neighbour)

Char 1

Char 2

Page 28: Pattern Recognition Introduction to bioinformatics 2006 Lecture 4

Complete linkage clustering (furthest neighbour)

Char 1

Char 2

Page 29: Pattern Recognition Introduction to bioinformatics 2006 Lecture 4

Complete linkage clustering (furthest neighbour)

Char 1

Char 2

Page 30: Pattern Recognition Introduction to bioinformatics 2006 Lecture 4

Complete linkage clustering (furthest neighbour)

Char 1

Char 2

Page 31: Pattern Recognition Introduction to bioinformatics 2006 Lecture 4

Complete linkage clustering (furthest neighbour)

Char 1

Char 2

Page 32: Pattern Recognition Introduction to bioinformatics 2006 Lecture 4

Complete linkage clustering (furthest neighbour)

Char 1

Char 2

Distance from point to cluster is defined as the largest distance between that point and any point in the cluster

Page 33: Pattern Recognition Introduction to bioinformatics 2006 Lecture 4

Complete linkage clustering (furthest neighbour)

More ‘structured’ clusters than with single linkage clustering

Let Ci and Cj be two disjoint clusters:

di,j = Max(dp,q), where p Ci and q Cj

Page 34: Pattern Recognition Introduction to bioinformatics 2006 Lecture 4

Clustering algorithm

1. Initialise (dis)similarity matrix2. Take two points with smallest distance

as first cluster 3. Merge corresponding rows/columns in

(dis)similarity matrix4. Repeat steps 2. and 3.

using appropriate clustermeasure until last two clusters are merged

Page 35: Pattern Recognition Introduction to bioinformatics 2006 Lecture 4

Average linkage clustering (Unweighted Pair Group Mean Averaging -UPGMA)

Char 1

Char 2

Distance from cluster to cluster is defined as the average distance over all within-cluster distances

Page 36: Pattern Recognition Introduction to bioinformatics 2006 Lecture 4

UPGMA

Let Ci and Cj be two disjoint clusters:

1di,j = ———————— pq dp,q, where p Ci and q Cj

|Ci| × |Cj|

In words: calculate the average over all pairwise inter-cluster distances

Ci Cj

Page 37: Pattern Recognition Introduction to bioinformatics 2006 Lecture 4

Multivariate statistics – Cluster analysis

Phylogenetic tree

Scores

Similaritymatrix

5×5

12345

C1 C2 C3 C4 C5 C6 ..

Data table

Similarity criterion

Cluster criterion

Page 38: Pattern Recognition Introduction to bioinformatics 2006 Lecture 4

Multivariate statistics – Cluster analysis

Scores

5×5

12345

C1 C2 C3 C4 C5 C6

Similarity criterion

Cluster criterion

Scores

6×6

Cluster criterion

Make two-way ordered

table using dendrograms

Page 39: Pattern Recognition Introduction to bioinformatics 2006 Lecture 4

Multivariate statistics – Two-way cluster analysis

14253

C4 C3 C6 C1 C2 C5

Make two-way (rows, columns) ordered table using dendrograms; This shows ‘blocks’ of numbers that are similar

Page 40: Pattern Recognition Introduction to bioinformatics 2006 Lecture 4

Multivariate statistics – Two-way cluster analysis

Page 41: Pattern Recognition Introduction to bioinformatics 2006 Lecture 4

Multivariate statistics – Principal Component Analysis (PCA)

12345

C1 C2 C3 C4 C5 C6 Similarity Criterion:Correlations

6×6

Calculate eigenvectors with greatest eigenvalues:

•Linear combinations

•Orthogonal

Correlations

Project datapoints ontonew axes (eigenvectors)

12

Page 42: Pattern Recognition Introduction to bioinformatics 2006 Lecture 4

Multivariate statistics – Principal Component Analysis (PCA)

Page 43: Pattern Recognition Introduction to bioinformatics 2006 Lecture 4

Multidimensional Scaling

• Multidimensional scaling (MDS) can be considered to be an alternative to factor analysis

• It starts using a set of distances (distance matrix)

• MDS attempts to arrange "objects" in a space with a particular number of dimensions so as to reproduce the observed distances. As a result, we can "explain" the distances in terms of underlying dimensions

Page 44: Pattern Recognition Introduction to bioinformatics 2006 Lecture 4

Multidimensional Scaling

Measures of goodness-of-fit: Stress

Phi = [dij – f (ij)]2

• Phi is stress value, dij is reproduced distance, ij is observed distance, f (ij) is a monotone transformation of the observed distances (good function preserves rank order of distances after scaling)

Page 45: Pattern Recognition Introduction to bioinformatics 2006 Lecture 4

Multidimensional Scaling

Different cell types are multi-dimensionally scaled. The colour codes indicate clear clustering.

Page 46: Pattern Recognition Introduction to bioinformatics 2006 Lecture 4

Neighbour joining• Widely used method to cluster DNA or

protein sequences

• Global measure – keeps total branch length minimal, tends to produce a tree with minimal total branch length

• At each step, join two nodes such that distances are minimal (criterion of minimal evolution)

• Agglomerative algorithm

• Leads to unrooted tree

Page 47: Pattern Recognition Introduction to bioinformatics 2006 Lecture 4

Neighbour joining

xx

y

x

y

xy xy

x

(a) (b) (c)

(d) (e) (f)

At each step all possible ‘neighbour joinings’ are checked and the one corresponding to the minimal total tree length (calculated by adding all branch lengths) is taken.

Page 48: Pattern Recognition Introduction to bioinformatics 2006 Lecture 4

Phylogenetic tree (unrooted)

human

mousefugu

Drosophila

edge

internal node

leaf

OTU – Observed taxonomic unit

Page 49: Pattern Recognition Introduction to bioinformatics 2006 Lecture 4

Phylogenetic tree (unrooted)

human

mousefugu

Drosophila

root

edge

internal node

leaf

OTU – Observed taxonomic unit

Page 50: Pattern Recognition Introduction to bioinformatics 2006 Lecture 4

Phylogenetic tree (rooted)

human

mouse

fuguDrosophila

root

edge

internal node (ancestor)

leaf

OTU – Observed taxonomic unit

time

Page 51: Pattern Recognition Introduction to bioinformatics 2006 Lecture 4

Combinatoric explosion

# sequences # unrooted # rooted trees trees

2 1 13 1 34 3 155 15 1056 105 9457 945 10,3958 10,395 135,1359 135,135 2,027,02510 2,027,025 34,459,425