SlideShare a Scribd company logo
1 of 84
Tal.Galili@gmail.com
The dendextend R package - JSM 2015
Tal.Galili@gmail.com
Talk outline
• Motivating example (Iris)
• Getting dendextend
• Functions for extending dendrogram
• Connections to other packages
Tal.Galili@gmail.com
Motivating
example
Tal.Galili@gmail.com
The Iris dataset
Tal.Galili@gmail.com
The Iris dataset
Tal.Galili@gmail.com
The Iris dataset
Tal.Galili@gmail.com
The Iris dataset
Using: gplots::heatmap.2
Tal.Galili@gmail.com
Is there a difference between
clustering algorithms?
Tal.Galili@gmail.com
Why is “complete” different?
Comparing 8
Clustering algorithms on
The Iris dataset
Using: dendlist,
cor.dendlist +
The corrplot package
Tal.Galili@gmail.com
Why is “complete” different?
Using: tanglegram
Tal.Galili@gmail.com
Getting
dendextend
Tal.Galili@gmail.com
Tal.Galili@gmail.com
Further reading
(includes the example)
Tal.Galili@gmail.com
dendextend paper in the
bioinformatics journal
Tal.Galili@gmail.com
Getting
the paper/presentation
Go to: www.R-statistics.com
Or: just e-mail me:
Tal.Galili@gmail.com
Some useful functions
for
extending dendrogram
Tal.Galili@gmail.com
Building a
dendrogram
Tal.Galili@gmail.com
hclust -> dend
Tal.Galili@gmail.com
hclust -> dend
Tal.Galili@gmail.com
Useful functions
• labels
• labels_colors
• cutree
• color_branches
• sort
• tanglegram
• set (!)
Tal.Galili@gmail.com
Tal.Galili@gmail.com
Tal.Galili@gmail.com
Tal.Galili@gmail.com
Tal.Galili@gmail.com
Tal.Galili@gmail.com
Tal.Galili@gmail.com
Tal.Galili@gmail.com
Tal.Galili@gmail.com
Tal.Galili@gmail.com
Tal.Galili@gmail.com
ONE more
function
Tal.Galili@gmail.com
Using pipes
%>%
(but first…)
Tal.Galili@gmail.com
hclust -> dend
Tal.Galili@gmail.com
hclust + pipes (via magrittr)
Tal.Galili@gmail.com
Changing a
dendrogram
Tal.Galili@gmail.com
The set function
set(dend, what, value)
One function
to rule them all!
Tal.Galili@gmail.com
The set function
set(dend, what, value)
• dend a dendrogram
• what the property to update
• value new values to set in the tree
Tal.Galili@gmail.com
The set function
set(dend, what, value)
Type “what"
Labels labels, labels_to_character, labels_colors,
labels_cex, labels_to_character
Leaves leaves_pch, leaves_col, leaves_cex, hang_leaves
Nodes nodes_pch, nodes_col, nodes_cex
Branches branches_lty, branches_col, branches_lwd,
branches_k_color, by_labels_branches_lty,
by_labels_branches_col, by_labels_branches_lwd
Tal.Galili@gmail.com
A dend exmaple
Tal.Galili@gmail.com
Modify labels
Tal.Galili@gmail.com
Tal.Galili@gmail.com
Tal.Galili@gmail.com
Modify branches
Tal.Galili@gmail.com
Modify branches
Tal.Galili@gmail.com
Modify nodes
Tal.Galili@gmail.com
useful
connections
to other
packages
Tal.Galili@gmail.com
circlize
Tal.Galili@gmail.com
ggplot2
Tal.Galili@gmail.com
ggplot2
Tal.Galili@gmail.com
https://plot.ly/~talgalili/ 6y/-sv-x/
ggplot2 + plot.ly
Tal.Galili@gmail.com
gplots::heatmap.2
Tal.Galili@gmail.comJoint work with Joe Cheng
d3heatmap
Tal.Galili@gmail.com
http://asbcllc.com/blog/ 2015_abn/enuj/14_15_pot_50lmth.xedni/pamtaeh_
D3heatmap (zoomed)
Tal.Galili@gmail.com
Credits!
dendextend
This work was supported in part by the European Research Council under EC–EP7
European Research Council grant PSARPS-297519, and also by the HBP project.
Tal.Galili@gmail.com
Thank you!
for the slides:
R-statistics.com
The dendextend R package
Tal.Galili@gmail.com
Exploring a
dendrogram
Tal.Galili@gmail.com
Tal.Galili@gmail.com
A dendrogram is a nested list of lists
Tal.Galili@gmail.com
Tal.Galili@gmail.com
Tal.Galili@gmail.com
Depth-
First
Search
Tal.Galili@gmail.com
Depth-
First
Search
Tal.Galili@gmail.com
Comparing
dendrograms
Tal.Galili@gmail.com
tanglegram + untangle
Tal.Galili@gmail.com
tanglegram + untangle
Tal.Galili@gmail.com
“Correlation” measures
Tal.Galili@gmail.com
“Correlation” measures
Tal.Galili@gmail.com
Rotate branches
Tal.Galili@gmail.com
Tal.Galili@gmail.com
Modify nodes (no code)
Tal.Galili@gmail.com
Tal.Galili@gmail.com
Tal.Galili@gmail.com
Tal.Galili@gmail.com
Rotate branches
Tal.Galili@gmail.com
Prune branches
Tal.Galili@gmail.com
Prune branches
Tal.Galili@gmail.com
Add rectangles
Tal.Galili@gmail.com
Add rectangles
Tal.Galili@gmail.com
Tal.Galili@gmail.com
dendextend
in the wild
Tal.Galili@gmail.com
Visually comparing two clustering methods
Tal.Galili@gmail.com
A plot from a recent HBP meeting in Lausanne
Dendrogram
Using 2
variables
Dendrogram
Using all
variables
Tal.Galili@gmail.com
Visually comparing two phylogenic trees
Tal.Galili@gmail.com
The dendextend R package
Thank you!
for the slides:
R-statistics.com

More Related Content

More from Tal Galili

Is enbis fourth conference announcement
Is enbis fourth conference announcementIs enbis fourth conference announcement
Is enbis fourth conference announcementTal Galili
 
Will There Be A New Dawn For Tau
Will There Be A New Dawn For TauWill There Be A New Dawn For Tau
Will There Be A New Dawn For TauTal Galili
 
Info2008 Talgalili Presentation
Info2008 Talgalili PresentationInfo2008 Talgalili Presentation
Info2008 Talgalili PresentationTal Galili
 
Gonsalves Magic Reality
Gonsalves  Magic RealityGonsalves  Magic Reality
Gonsalves Magic RealityTal Galili
 
מדיניות הצמצום התקציבי של ממשלות ישראל במאה ה-21
מדיניות הצמצום התקציבי של ממשלות ישראל במאה ה-21 מדיניות הצמצום התקציבי של ממשלות ישראל במאה ה-21
מדיניות הצמצום התקציבי של ממשלות ישראל במאה ה-21 Tal Galili
 
How To Use A Wiki Editing A Page
How To Use A Wiki   Editing A PageHow To Use A Wiki   Editing A Page
How To Use A Wiki Editing A PageTal Galili
 
How To Use A Wiki Creatign A User Name
How To Use A Wiki   Creatign A User NameHow To Use A Wiki   Creatign A User Name
How To Use A Wiki Creatign A User NameTal Galili
 
University Faculty S T R I K E December 24 Optimized
University  Faculty  S T R I K E  December 24 OptimizedUniversity  Faculty  S T R I K E  December 24 Optimized
University Faculty S T R I K E December 24 OptimizedTal Galili
 
Why Are We On Strike
Why Are We On StrikeWhy Are We On Strike
Why Are We On StrikeTal Galili
 
Mesibat Itonaim
Mesibat ItonaimMesibat Itonaim
Mesibat ItonaimTal Galili
 
a simple what is wordpress
a simple what is wordpressa simple what is wordpress
a simple what is wordpressTal Galili
 

More from Tal Galili (20)

Is enbis fourth conference announcement
Is enbis fourth conference announcementIs enbis fourth conference announcement
Is enbis fourth conference announcement
 
Avir Naki Law
Avir Naki LawAvir Naki Law
Avir Naki Law
 
Will There Be A New Dawn For Tau
Will There Be A New Dawn For TauWill There Be A New Dawn For Tau
Will There Be A New Dawn For Tau
 
Julianbeever1
Julianbeever1Julianbeever1
Julianbeever1
 
Info2008 Talgalili Presentation
Info2008 Talgalili PresentationInfo2008 Talgalili Presentation
Info2008 Talgalili Presentation
 
Gonsalves Magic Reality
Gonsalves  Magic RealityGonsalves  Magic Reality
Gonsalves Magic Reality
 
Friendfeed
FriendfeedFriendfeed
Friendfeed
 
Government2
Government2Government2
Government2
 
מדיניות הצמצום התקציבי של ממשלות ישראל במאה ה-21
מדיניות הצמצום התקציבי של ממשלות ישראל במאה ה-21 מדיניות הצמצום התקציבי של ממשלות ישראל במאה ה-21
מדיניות הצמצום התקציבי של ממשלות ישראל במאה ה-21
 
How To Use A Wiki Editing A Page
How To Use A Wiki   Editing A PageHow To Use A Wiki   Editing A Page
How To Use A Wiki Editing A Page
 
How To Use A Wiki Creatign A User Name
How To Use A Wiki   Creatign A User NameHow To Use A Wiki   Creatign A User Name
How To Use A Wiki Creatign A User Name
 
University Faculty S T R I K E December 24 Optimized
University  Faculty  S T R I K E  December 24 OptimizedUniversity  Faculty  S T R I K E  December 24 Optimized
University Faculty S T R I K E December 24 Optimized
 
Why Are We On Strike
Why Are We On StrikeWhy Are We On Strike
Why Are We On Strike
 
Yeda Ve Kesef
Yeda Ve KesefYeda Ve Kesef
Yeda Ve Kesef
 
Hinuch Tov
Hinuch TovHinuch Tov
Hinuch Tov
 
Mesibat Itonaim
Mesibat ItonaimMesibat Itonaim
Mesibat Itonaim
 
Oz le tmora
Oz le tmoraOz le tmora
Oz le tmora
 
Smartota
SmartotaSmartota
Smartota
 
Knesset2008
Knesset2008Knesset2008
Knesset2008
 
a simple what is wordpress
a simple what is wordpressa simple what is wordpress
a simple what is wordpress
 

Recently uploaded

Gartner's Data Analytics Maturity Model.pptx
Gartner's Data Analytics Maturity Model.pptxGartner's Data Analytics Maturity Model.pptx
Gartner's Data Analytics Maturity Model.pptxchadhar227
 
Sealdah % High Class Call Girls Kolkata - 450+ Call Girl Cash Payment 8005736...
Sealdah % High Class Call Girls Kolkata - 450+ Call Girl Cash Payment 8005736...Sealdah % High Class Call Girls Kolkata - 450+ Call Girl Cash Payment 8005736...
Sealdah % High Class Call Girls Kolkata - 450+ Call Girl Cash Payment 8005736...HyderabadDolls
 
Top profile Call Girls In Begusarai [ 7014168258 ] Call Me For Genuine Models...
Top profile Call Girls In Begusarai [ 7014168258 ] Call Me For Genuine Models...Top profile Call Girls In Begusarai [ 7014168258 ] Call Me For Genuine Models...
Top profile Call Girls In Begusarai [ 7014168258 ] Call Me For Genuine Models...nirzagarg
 
Top profile Call Girls In bhavnagar [ 7014168258 ] Call Me For Genuine Models...
Top profile Call Girls In bhavnagar [ 7014168258 ] Call Me For Genuine Models...Top profile Call Girls In bhavnagar [ 7014168258 ] Call Me For Genuine Models...
Top profile Call Girls In bhavnagar [ 7014168258 ] Call Me For Genuine Models...gajnagarg
 
Giridih Escorts Service Girl ^ 9332606886, WhatsApp Anytime Giridih
Giridih Escorts Service Girl ^ 9332606886, WhatsApp Anytime GiridihGiridih Escorts Service Girl ^ 9332606886, WhatsApp Anytime Giridih
Giridih Escorts Service Girl ^ 9332606886, WhatsApp Anytime Giridihmeghakumariji156
 
怎样办理圣地亚哥州立大学毕业证(SDSU毕业证书)成绩单学校原版复制
怎样办理圣地亚哥州立大学毕业证(SDSU毕业证书)成绩单学校原版复制怎样办理圣地亚哥州立大学毕业证(SDSU毕业证书)成绩单学校原版复制
怎样办理圣地亚哥州立大学毕业证(SDSU毕业证书)成绩单学校原版复制vexqp
 
Jual obat aborsi Bandung ( 085657271886 ) Cytote pil telat bulan penggugur ka...
Jual obat aborsi Bandung ( 085657271886 ) Cytote pil telat bulan penggugur ka...Jual obat aborsi Bandung ( 085657271886 ) Cytote pil telat bulan penggugur ka...
Jual obat aborsi Bandung ( 085657271886 ) Cytote pil telat bulan penggugur ka...Klinik kandungan
 
5CL-ADBA,5cladba, Chinese supplier, safety is guaranteed
5CL-ADBA,5cladba, Chinese supplier, safety is guaranteed5CL-ADBA,5cladba, Chinese supplier, safety is guaranteed
5CL-ADBA,5cladba, Chinese supplier, safety is guaranteedamy56318795
 
DATA SUMMIT 24 Building Real-Time Pipelines With FLaNK
DATA SUMMIT 24  Building Real-Time Pipelines With FLaNKDATA SUMMIT 24  Building Real-Time Pipelines With FLaNK
DATA SUMMIT 24 Building Real-Time Pipelines With FLaNKTimothy Spann
 
Lake Town / Independent Kolkata Call Girls Phone No 8005736733 Elite Escort S...
Lake Town / Independent Kolkata Call Girls Phone No 8005736733 Elite Escort S...Lake Town / Independent Kolkata Call Girls Phone No 8005736733 Elite Escort S...
Lake Town / Independent Kolkata Call Girls Phone No 8005736733 Elite Escort S...HyderabadDolls
 
Fun all Day Call Girls in Jaipur 9332606886 High Profile Call Girls You Ca...
Fun all Day Call Girls in Jaipur   9332606886  High Profile Call Girls You Ca...Fun all Day Call Girls in Jaipur   9332606886  High Profile Call Girls You Ca...
Fun all Day Call Girls in Jaipur 9332606886 High Profile Call Girls You Ca...kumargunjan9515
 
Digital Transformation Playbook by Graham Ware
Digital Transformation Playbook by Graham WareDigital Transformation Playbook by Graham Ware
Digital Transformation Playbook by Graham WareGraham Ware
 
7. Epi of Chronic respiratory diseases.ppt
7. Epi of Chronic respiratory diseases.ppt7. Epi of Chronic respiratory diseases.ppt
7. Epi of Chronic respiratory diseases.pptibrahimabdi22
 
Top profile Call Girls In Satna [ 7014168258 ] Call Me For Genuine Models We ...
Top profile Call Girls In Satna [ 7014168258 ] Call Me For Genuine Models We ...Top profile Call Girls In Satna [ 7014168258 ] Call Me For Genuine Models We ...
Top profile Call Girls In Satna [ 7014168258 ] Call Me For Genuine Models We ...nirzagarg
 
Case Study 4 Where the cry of rebellion happen?
Case Study 4 Where the cry of rebellion happen?Case Study 4 Where the cry of rebellion happen?
Case Study 4 Where the cry of rebellion happen?RemarkSemacio
 
Vastral Call Girls Book Now 7737669865 Top Class Escort Service Available
Vastral Call Girls Book Now 7737669865 Top Class Escort Service AvailableVastral Call Girls Book Now 7737669865 Top Class Escort Service Available
Vastral Call Girls Book Now 7737669865 Top Class Escort Service Availablegargpaaro
 
Top profile Call Girls In Latur [ 7014168258 ] Call Me For Genuine Models We ...
Top profile Call Girls In Latur [ 7014168258 ] Call Me For Genuine Models We ...Top profile Call Girls In Latur [ 7014168258 ] Call Me For Genuine Models We ...
Top profile Call Girls In Latur [ 7014168258 ] Call Me For Genuine Models We ...gajnagarg
 
Predicting HDB Resale Prices - Conducting Linear Regression Analysis With Orange
Predicting HDB Resale Prices - Conducting Linear Regression Analysis With OrangePredicting HDB Resale Prices - Conducting Linear Regression Analysis With Orange
Predicting HDB Resale Prices - Conducting Linear Regression Analysis With OrangeThinkInnovation
 
Top profile Call Girls In Hapur [ 7014168258 ] Call Me For Genuine Models We ...
Top profile Call Girls In Hapur [ 7014168258 ] Call Me For Genuine Models We ...Top profile Call Girls In Hapur [ 7014168258 ] Call Me For Genuine Models We ...
Top profile Call Girls In Hapur [ 7014168258 ] Call Me For Genuine Models We ...nirzagarg
 
RESEARCH-FINAL-DEFENSE-PPT-TEMPLATE.pptx
RESEARCH-FINAL-DEFENSE-PPT-TEMPLATE.pptxRESEARCH-FINAL-DEFENSE-PPT-TEMPLATE.pptx
RESEARCH-FINAL-DEFENSE-PPT-TEMPLATE.pptxronsairoathenadugay
 

Recently uploaded (20)

Gartner's Data Analytics Maturity Model.pptx
Gartner's Data Analytics Maturity Model.pptxGartner's Data Analytics Maturity Model.pptx
Gartner's Data Analytics Maturity Model.pptx
 
Sealdah % High Class Call Girls Kolkata - 450+ Call Girl Cash Payment 8005736...
Sealdah % High Class Call Girls Kolkata - 450+ Call Girl Cash Payment 8005736...Sealdah % High Class Call Girls Kolkata - 450+ Call Girl Cash Payment 8005736...
Sealdah % High Class Call Girls Kolkata - 450+ Call Girl Cash Payment 8005736...
 
Top profile Call Girls In Begusarai [ 7014168258 ] Call Me For Genuine Models...
Top profile Call Girls In Begusarai [ 7014168258 ] Call Me For Genuine Models...Top profile Call Girls In Begusarai [ 7014168258 ] Call Me For Genuine Models...
Top profile Call Girls In Begusarai [ 7014168258 ] Call Me For Genuine Models...
 
Top profile Call Girls In bhavnagar [ 7014168258 ] Call Me For Genuine Models...
Top profile Call Girls In bhavnagar [ 7014168258 ] Call Me For Genuine Models...Top profile Call Girls In bhavnagar [ 7014168258 ] Call Me For Genuine Models...
Top profile Call Girls In bhavnagar [ 7014168258 ] Call Me For Genuine Models...
 
Giridih Escorts Service Girl ^ 9332606886, WhatsApp Anytime Giridih
Giridih Escorts Service Girl ^ 9332606886, WhatsApp Anytime GiridihGiridih Escorts Service Girl ^ 9332606886, WhatsApp Anytime Giridih
Giridih Escorts Service Girl ^ 9332606886, WhatsApp Anytime Giridih
 
怎样办理圣地亚哥州立大学毕业证(SDSU毕业证书)成绩单学校原版复制
怎样办理圣地亚哥州立大学毕业证(SDSU毕业证书)成绩单学校原版复制怎样办理圣地亚哥州立大学毕业证(SDSU毕业证书)成绩单学校原版复制
怎样办理圣地亚哥州立大学毕业证(SDSU毕业证书)成绩单学校原版复制
 
Jual obat aborsi Bandung ( 085657271886 ) Cytote pil telat bulan penggugur ka...
Jual obat aborsi Bandung ( 085657271886 ) Cytote pil telat bulan penggugur ka...Jual obat aborsi Bandung ( 085657271886 ) Cytote pil telat bulan penggugur ka...
Jual obat aborsi Bandung ( 085657271886 ) Cytote pil telat bulan penggugur ka...
 
5CL-ADBA,5cladba, Chinese supplier, safety is guaranteed
5CL-ADBA,5cladba, Chinese supplier, safety is guaranteed5CL-ADBA,5cladba, Chinese supplier, safety is guaranteed
5CL-ADBA,5cladba, Chinese supplier, safety is guaranteed
 
DATA SUMMIT 24 Building Real-Time Pipelines With FLaNK
DATA SUMMIT 24  Building Real-Time Pipelines With FLaNKDATA SUMMIT 24  Building Real-Time Pipelines With FLaNK
DATA SUMMIT 24 Building Real-Time Pipelines With FLaNK
 
Lake Town / Independent Kolkata Call Girls Phone No 8005736733 Elite Escort S...
Lake Town / Independent Kolkata Call Girls Phone No 8005736733 Elite Escort S...Lake Town / Independent Kolkata Call Girls Phone No 8005736733 Elite Escort S...
Lake Town / Independent Kolkata Call Girls Phone No 8005736733 Elite Escort S...
 
Fun all Day Call Girls in Jaipur 9332606886 High Profile Call Girls You Ca...
Fun all Day Call Girls in Jaipur   9332606886  High Profile Call Girls You Ca...Fun all Day Call Girls in Jaipur   9332606886  High Profile Call Girls You Ca...
Fun all Day Call Girls in Jaipur 9332606886 High Profile Call Girls You Ca...
 
Digital Transformation Playbook by Graham Ware
Digital Transformation Playbook by Graham WareDigital Transformation Playbook by Graham Ware
Digital Transformation Playbook by Graham Ware
 
7. Epi of Chronic respiratory diseases.ppt
7. Epi of Chronic respiratory diseases.ppt7. Epi of Chronic respiratory diseases.ppt
7. Epi of Chronic respiratory diseases.ppt
 
Top profile Call Girls In Satna [ 7014168258 ] Call Me For Genuine Models We ...
Top profile Call Girls In Satna [ 7014168258 ] Call Me For Genuine Models We ...Top profile Call Girls In Satna [ 7014168258 ] Call Me For Genuine Models We ...
Top profile Call Girls In Satna [ 7014168258 ] Call Me For Genuine Models We ...
 
Case Study 4 Where the cry of rebellion happen?
Case Study 4 Where the cry of rebellion happen?Case Study 4 Where the cry of rebellion happen?
Case Study 4 Where the cry of rebellion happen?
 
Vastral Call Girls Book Now 7737669865 Top Class Escort Service Available
Vastral Call Girls Book Now 7737669865 Top Class Escort Service AvailableVastral Call Girls Book Now 7737669865 Top Class Escort Service Available
Vastral Call Girls Book Now 7737669865 Top Class Escort Service Available
 
Top profile Call Girls In Latur [ 7014168258 ] Call Me For Genuine Models We ...
Top profile Call Girls In Latur [ 7014168258 ] Call Me For Genuine Models We ...Top profile Call Girls In Latur [ 7014168258 ] Call Me For Genuine Models We ...
Top profile Call Girls In Latur [ 7014168258 ] Call Me For Genuine Models We ...
 
Predicting HDB Resale Prices - Conducting Linear Regression Analysis With Orange
Predicting HDB Resale Prices - Conducting Linear Regression Analysis With OrangePredicting HDB Resale Prices - Conducting Linear Regression Analysis With Orange
Predicting HDB Resale Prices - Conducting Linear Regression Analysis With Orange
 
Top profile Call Girls In Hapur [ 7014168258 ] Call Me For Genuine Models We ...
Top profile Call Girls In Hapur [ 7014168258 ] Call Me For Genuine Models We ...Top profile Call Girls In Hapur [ 7014168258 ] Call Me For Genuine Models We ...
Top profile Call Girls In Hapur [ 7014168258 ] Call Me For Genuine Models We ...
 
RESEARCH-FINAL-DEFENSE-PPT-TEMPLATE.pptx
RESEARCH-FINAL-DEFENSE-PPT-TEMPLATE.pptxRESEARCH-FINAL-DEFENSE-PPT-TEMPLATE.pptx
RESEARCH-FINAL-DEFENSE-PPT-TEMPLATE.pptx
 

jsm2015: the dendextend R package