distance metrics
play

Distance Metrics Mark Voorhies 5/14/2015 Mark Voorhies Distance - PowerPoint PPT Presentation

Distance Metrics Mark Voorhies 5/14/2015 Mark Voorhies Distance Metrics New verbs f u n c t i o n ( parameter1 , parameter2 ) : def Do t h i s ! # Code to do t h i s return r e t u r n v a l u e Mark Voorhies


  1. Distance Metrics Mark Voorhies 5/14/2015 Mark Voorhies Distance Metrics

  2. New verbs f u n c t i o n ( parameter1 , parameter2 ) : def ”””Do t h i s ! ””” # Code to do t h i s return r e t u r n v a l u e Mark Voorhies Distance Metrics

  3. Generators are like polymerases: iterable but not indexable Mark Voorhies Distance Metrics

  4. List tricks Adding data to a list: m y l i s t = [ ] m y l i s t . append (3) m y l i s t += [ 4 , 5 , 6 ] Mark Voorhies Distance Metrics

  5. List tricks Adding data to a list: m y l i s t = [ ] m y l i s t . append (3) m y l i s t += [ 4 , 5 , 6 ] Lists of lists: matrix = [ [ 1 , 2 , 3 , 4] , [ 5 , 6 , 7 , 8] , [ 9 ,10 ,11 ,12]] Mark Voorhies Distance Metrics

  6. Expression profiling pipelines Library Design! Probe design Label Amplify with unique (aRNA or cDNA) (bar code) mapping to genome Hybridize Sequencing Reaction Optical Aquisition (TIFF) GEO deposition (GPR) Digitize (FASTQ) Archive GEO deposition Map to genome (NOMAD, MADAM, Acuity) or transcriptome (SAM, BAM) Normalize and Merge (CDT) Observation Quantify Abundances (RSEM, Cu ffl inks, Analyze eXpress, ...) Experiment Model Hypothesis Mark Voorhies Distance Metrics

  7. Expression profiling pipelines Mark Voorhies Distance Metrics

  8. Expression profiling pipelines Mark Voorhies Distance Metrics

  9. The CDT file format Minimal CLUSTER input Cluster3 CDT output Tab delimited ( \ t) UNIX newlines ( \ n) Missing values → empty cells Mark Voorhies Distance Metrics

  10. supp2data.cdt Mark Voorhies Distance Metrics

  11. supp2data.cdt [ [ ”YBR166C” , ”YOR357C” , ”YLR292C” , . . . ] , [ ”TYR1 . . . ” , ”GRD19 . . . ” , ”SEC72 . . . ” , . . . ] , [ [ 0.33 , − 0.17 , 0.04 , − 0.07 , − 0.09 , . . . ] , [ − 0.64 , − 0.38 , − 0.32 , − 0.29 , − 0.22 , . . . ] , [ − 0.23 , 0.19 , − 0.36 , 0.14 , − 0.40 , . . . ] , . . . ] ] Mark Voorhies Distance Metrics

  12. Fun with logarithms In log space, multiplication and division become addition and subtraction: log( xy ) = log( x ) + log( y ) log( x / y ) = log( x ) − log( y ) Mark Voorhies Distance Metrics

  13. Fun with logarithms In log space, multiplication and division become addition and subtraction: log( xy ) = log( x ) + log( y ) log( x / y ) = log( x ) − log( y ) Therefore, exponentiation becomes multiplication: log( x y ) = y log( x ) Mark Voorhies Distance Metrics

  14. Fun with logarithms In log space, multiplication and division become addition and subtraction: log( xy ) = log( x ) + log( y ) log( x / y ) = log( x ) − log( y ) Therefore, exponentiation becomes multiplication: log( x y ) = y log( x ) Also, we can change of the base of a logarithm like so: log A ( x ) = log( x ) / log( A ) Mark Voorhies Distance Metrics

  15. Pearson distances Pearson similarity N s ( x , y ) = 1 � x i − x offset � � y i − y offset � � N φ x φ y i � N � ( G i − G offset ) 2 � � φ G = � N i Mark Voorhies Distance Metrics

  16. Pearson distances Pearson similarity N � x i − x offset � � y i − y offset � � s ( x , y ) = φ x φ y i � N � � � ( G i − G offset ) 2 φ G = � i Mark Voorhies Distance Metrics

  17. Pearson distances Pearson similarity     N x i − x offset y i − y offset � s ( x , y ) =     �� N �� N i ( x i − x offset ) 2 i ( y i − y offset ) 2 i Mark Voorhies Distance Metrics

  18. Pearson distances Pearson similarity � N i ( x i − x offset )( y i − y offset ) s ( x , y ) = �� N �� N i ( x i − x offset ) 2 i ( y i − y offset ) 2 Mark Voorhies Distance Metrics

  19. Pearson distances Pearson similarity � N i ( x i − x offset )( y i − y offset ) s ( x , y ) = �� N �� N i ( x i − x offset ) 2 i ( y i − y offset ) 2 Pearson distance d ( x , y ) = 1 − s ( x , y ) Mark Voorhies Distance Metrics

  20. Pearson distances Pearson similarity � N i ( x i − x offset )( y i − y offset ) s ( x , y ) = �� N �� N i ( x i − x offset ) 2 i ( y i − y offset ) 2 Pearson distance d ( x , y ) = 1 − s ( x , y ) Euclidean distance � N i ( x i − y i ) 2 N Mark Voorhies Distance Metrics

  21. Comparing all measurements for two genes Comparing two expression profiles (r = 0.97) ● ● 5 ● ● ● YFG1 log2 relative expression ● ● ● ● ● ● ● ● ● ● ● 0 ● ● ● ● ● ● ● ● ● −5 ● ● ● ● ● −5 0 5 TLC1 log2 relative expression Mark Voorhies Distance Metrics

  22. Comparing all genes for two measurements ● ● ● ● ● ● ● ● 5 ● ● ● ● ● ● ● ● Array 2, log2 relative expression ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● 0 ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● −5 ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● −10 ● ● −10 −5 0 5 10 Array 1, log2 relative expression Mark Voorhies Distance Metrics

  23. Comparing all genes for two measurements Euclidean Distance ● ● ● ● ● ● ● ● 5 ● ● ● ● ● ● ● ● Array 2, log2 relative expression ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● 0 ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● −5 ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● −10 ● ● −10 −5 0 5 10 Array 1, log2 relative expression Mark Voorhies Distance Metrics

  24. Comparing all genes for two measurements Uncentered Pearson ● ● ● ● ● ● ● ● 5 ● ● ● ● ● ● ● ● Array 2, log2 relative expression ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● 0 ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● −5 ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● −10 ● ● −10 −5 0 5 10 Array 1, log2 relative expression Mark Voorhies Distance Metrics

  25. Measure all pairwise distances under distance metric Mark Voorhies Distance Metrics

  26. Clustering exercises – Visualizing the distance matrix Mark Voorhies Distance Metrics

  27. Homework 1 Write a function to calculate all pairwise Pearson correlations for the yeast expression profiles. 2 Save the results of your pairwise correlation calculation in the CDT format described in the JavaTreeView manual. 3 Read PNAS 95:14863 4 Try the first two problems, replacing the Pearson correlation with the distance metric from the PNAS paper or with one of the distance metrics from the Cluster3 manual. Mark Voorhies Distance Metrics

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend