Pattern Recognition Introduction to bioinformatics 2007 Lecture 4 C E N T R F O R I N T E G R A T I V E B I O I N F O R M A T I C S V U E
Patterns Some 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
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 –......
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
Application Examples Regulatory binding site identification: CRP (CAP) binding site Two hybrid data analysis l Gene expression data analysis These problems are all solvable by a clustering algorithm
Multivariate statistics – Cluster analysis C1 C2 C3 C4 C5 C6.. Raw table Any 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
Multivariate statistics – Cluster analysis Dendrogram Scores Similarity matrix 5× C1 C2 C3 C4 C5 C6.. Raw table Similarity criterion Cluster criterion Any set of numbers per column
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
Multivariate statistics – Cluster analysis Now for sequences Phylogenetic tree Scores Similarity matrix 5×5 Multiple sequence alignment Similarity criterion Cluster criterion
Human -KITVVGVGAVGMACAISILMKDLADELALVDVIEDKLKGEMMDLQHGSLFLRTPKIVSGKDYNVTANSKLVIITAGARQ Chicken -KISVVGVGAVGMACAISILMKDLADELTLVDVVEDKLKGEMMDLQHGSLFLKTPKITSGKDYSVTAHSKLVIVTAGARQ Dogfish –KITVVGVGAVGMACAISILMKDLADEVALVDVMEDKLKGEMMDLQHGSLFLHTAKIVSGKDYSVSAGSKLVVITAGARQ Lamprey 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 Human Chicken Dogfish Lamprey Barley Maizey Lacto_casei Bacillus_stea Lacto_plant Therma_mari Bifido Thermus_aqua Mycoplasma How can you see that this is a distance matrix?
Multivariate statistics – Cluster analysis Dendrogram/tree Scores Similarity matrix 5× C1 C2 C3 C4 C5 C6.. Data table Similarity criterion Cluster criterion
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!
Cluster analysis – data normalisation/weighting C1 C2 C3 C4 C5 C6.. Raw table Normalisation criterion C1 C2 C3 C4 C5 C6.. Normalised table Column normalisationx/max Column range normalise(x-min)/(max-min)
Cluster analysis – (dis)similarity matrix Scores Similarity matrix 5× C1 C2 C3 C4 C5 C6.. Raw table Similarity criterion D i,j = ( k | x ik – x jk | r ) 1/r Minkowski metrics r = 2 Euclidean distance r = 1 City block distance
(dis)similarity matrix D i,j = ( k | x ik – x jk | r ) 1/r Minkowski metrics r = 2 Euclidean distance r = 1 City block distance EXAMPLE: lengthheightwidth Cow11173 Cow 2745 Euclidean dist. = sqrt( ) = sqrt(29) = 5.39 City Block dist. = |4+3+2| = 9
Cluster analysis – Clustering criteria Dendrogram (tree) Scores Similarity matrix 5×5 Cluster criterion Single linkage - Nearest neighbour Complete linkage – Furthest neighbour Group averaging – UPGMA Neighbour joining – global measure, used to make a Phylogenetic Tree
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
Single linkage clustering (nearest neighbour) Char 1 Char 2
Single linkage clustering (nearest neighbour) Char 1 Char 2
Single linkage clustering (nearest neighbour) Char 1 Char 2
Single linkage clustering (nearest neighbour) Char 1 Char 2
Single linkage clustering (nearest neighbour) Char 1 Char 2
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
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
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
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
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 C i and C j be two disjoint clusters: d i,j = Min(d p,q ), where p C i and q C j
Complete linkage clustering (furthest neighbour) Char 1 Char 2
Complete linkage clustering (furthest neighbour) Char 1 Char 2
Complete linkage clustering (furthest neighbour) Char 1 Char 2
Complete linkage clustering (furthest neighbour) Char 1 Char 2
Complete linkage clustering (furthest neighbour) Char 1 Char 2
Complete linkage clustering (furthest neighbour) Char 1 Char 2
Complete linkage clustering (furthest neighbour) Char 1 Char 2
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
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
Complete linkage clustering (furthest neighbour) More ‘structured’ clusters than with single linkage clustering Let C i and C j be two disjoint clusters: d i,j = Max(d p,q ), where p C i and q C j
Clustering algorithm 1.Initialise (dis)similarity matrix 2.Take two points with smallest distance as first cluster (later, points can be clusters) 3.Merge corresponding rows/columns in (dis)similarity matrix 4.Repeat steps 2. and 3. using appropriate cluster measure when you need to calculate new point-to-cluster or cluster-to-cluster distances until last two clusters are merged
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
UPGMA Let C i and C j be two disjoint clusters: 1 d i,j = ———————— p q d p,q, where p C i and q C j |Ci| × |Cj| In words: calculate the average over all pairwise inter-cluster distances CiCi CjCj
Multivariate statistics – Cluster analysis Phylogenetic tree Scores Similarity matrix 5× C1 C2 C3 C4 C5 C6.. Data table Similarity criterion Cluster criterion
Multivariate statistics – Cluster analysis Scores 5× C1 C2 C3 C4 C5 C6 Similarity criterion Cluster criterion Scores 6×6 Cluster criterion Make two-way ordered table using dendrograms
Multivariate statistics – Two-way cluster analysis C4 C3 C6 C1 C2 C5 Make two-way (rows, columns) ordered table using dendrograms; This shows ‘blocks’ of numbers that are similar
Multivariate statistics – Two-way cluster analysis
Multivariate statistics – Principal Component Analysis (PCA) C1 C2 C3 C4 C5 C6 Similarity Criterion: Correlations 6×6 Calculate eigenvectors with greatest eigenvalues: Linear combinations Orthogonal Correlations Project data points onto new axes (eigenvectors) 1 2
Multivariate statistics – Principal Component Analysis (PCA)
Multidimensional Scaling Multidimensional scaling (MDS) can be considered to be an alternative to factor analysis (PCA) 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
Multidimensional Scaling Measures of goodness-of-fit: Stress Phi = [d ij – f ( ij )] 2 Phi is stress value, d ij 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)
Multidimensional Scaling Different cell types are multi- dimensionally scaled. The colour codes indicate clear clustering.
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
Neighbour joining x x y x y x y x y 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.
Phylogenetic tree (unrooted) human mousefugu Drosophila edge internal node leaf OTU – Observed taxonomic unit
Phylogenetic tree (unrooted) human mousefugu Drosophila root edge internal node leaf OTU – Observed taxonomic unit
Phylogenetic tree (rooted) human mouse fugu Drosophila root edge internal node (ancestor) leaf OTU – Observed taxonomic unit time
Combinatoric explosion # sequences# unrooted# rooted trees , ,395135, ,1352,027, ,027,02534,459,425