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

{Pooja: 9892124323 } Call Girl in Mumbai | Jas Kaur Rate 4500 Free Hotel Del...
{Pooja:  9892124323 } Call Girl in Mumbai | Jas Kaur Rate 4500 Free Hotel Del...{Pooja:  9892124323 } Call Girl in Mumbai | Jas Kaur Rate 4500 Free Hotel Del...
{Pooja: 9892124323 } Call Girl in Mumbai | Jas Kaur Rate 4500 Free Hotel Del...Pooja Nehwal
 
Cheap Rate Call girls Sarita Vihar Delhi 9205541914 shot 1500 night
Cheap Rate Call girls Sarita Vihar Delhi 9205541914 shot 1500 nightCheap Rate Call girls Sarita Vihar Delhi 9205541914 shot 1500 night
Cheap Rate Call girls Sarita Vihar Delhi 9205541914 shot 1500 nightDelhi Call girls
 
(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Service
(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Service(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Service
(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Serviceranjana rawat
 
April 2024 - Crypto Market Report's Analysis
April 2024 - Crypto Market Report's AnalysisApril 2024 - Crypto Market Report's Analysis
April 2024 - Crypto Market Report's Analysismanisha194592
 
Week-01-2.ppt BBB human Computer interaction
Week-01-2.ppt BBB human Computer interactionWeek-01-2.ppt BBB human Computer interaction
Week-01-2.ppt BBB human Computer interactionfulawalesam
 
Invezz.com - Grow your wealth with trading signals
Invezz.com - Grow your wealth with trading signalsInvezz.com - Grow your wealth with trading signals
Invezz.com - Grow your wealth with trading signalsInvezz1
 
Log Analysis using OSSEC sasoasasasas.pptx
Log Analysis using OSSEC sasoasasasas.pptxLog Analysis using OSSEC sasoasasasas.pptx
Log Analysis using OSSEC sasoasasasas.pptxJohnnyPlasten
 
Call me @ 9892124323 Cheap Rate Call Girls in Vashi with Real Photo 100% Secure
Call me @ 9892124323  Cheap Rate Call Girls in Vashi with Real Photo 100% SecureCall me @ 9892124323  Cheap Rate Call Girls in Vashi with Real Photo 100% Secure
Call me @ 9892124323 Cheap Rate Call Girls in Vashi with Real Photo 100% SecurePooja Nehwal
 
BabyOno dropshipping via API with DroFx.pptx
BabyOno dropshipping via API with DroFx.pptxBabyOno dropshipping via API with DroFx.pptx
BabyOno dropshipping via API with DroFx.pptxolyaivanovalion
 
VidaXL dropshipping via API with DroFx.pptx
VidaXL dropshipping via API with DroFx.pptxVidaXL dropshipping via API with DroFx.pptx
VidaXL dropshipping via API with DroFx.pptxolyaivanovalion
 
BigBuy dropshipping via API with DroFx.pptx
BigBuy dropshipping via API with DroFx.pptxBigBuy dropshipping via API with DroFx.pptx
BigBuy dropshipping via API with DroFx.pptxolyaivanovalion
 
Carero dropshipping via API with DroFx.pptx
Carero dropshipping via API with DroFx.pptxCarero dropshipping via API with DroFx.pptx
Carero dropshipping via API with DroFx.pptxolyaivanovalion
 
Delhi Call Girls Punjabi Bagh 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls Punjabi Bagh 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip CallDelhi Call Girls Punjabi Bagh 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls Punjabi Bagh 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Callshivangimorya083
 
Mature dropshipping via API with DroFx.pptx
Mature dropshipping via API with DroFx.pptxMature dropshipping via API with DroFx.pptx
Mature dropshipping via API with DroFx.pptxolyaivanovalion
 
Zuja dropshipping via API with DroFx.pptx
Zuja dropshipping via API with DroFx.pptxZuja dropshipping via API with DroFx.pptx
Zuja dropshipping via API with DroFx.pptxolyaivanovalion
 
Determinants of health, dimensions of health, positive health and spectrum of...
Determinants of health, dimensions of health, positive health and spectrum of...Determinants of health, dimensions of health, positive health and spectrum of...
Determinants of health, dimensions of health, positive health and spectrum of...shambhavirathore45
 
Introduction-to-Machine-Learning (1).pptx
Introduction-to-Machine-Learning (1).pptxIntroduction-to-Machine-Learning (1).pptx
Introduction-to-Machine-Learning (1).pptxfirstjob4
 
ALSO dropshipping via API with DroFx.pptx
ALSO dropshipping via API with DroFx.pptxALSO dropshipping via API with DroFx.pptx
ALSO dropshipping via API with DroFx.pptxolyaivanovalion
 
Accredited-Transport-Cooperatives-Jan-2021-Web.pdf
Accredited-Transport-Cooperatives-Jan-2021-Web.pdfAccredited-Transport-Cooperatives-Jan-2021-Web.pdf
Accredited-Transport-Cooperatives-Jan-2021-Web.pdfadriantubila
 

Recently uploaded (20)

{Pooja: 9892124323 } Call Girl in Mumbai | Jas Kaur Rate 4500 Free Hotel Del...
{Pooja:  9892124323 } Call Girl in Mumbai | Jas Kaur Rate 4500 Free Hotel Del...{Pooja:  9892124323 } Call Girl in Mumbai | Jas Kaur Rate 4500 Free Hotel Del...
{Pooja: 9892124323 } Call Girl in Mumbai | Jas Kaur Rate 4500 Free Hotel Del...
 
Cheap Rate Call girls Sarita Vihar Delhi 9205541914 shot 1500 night
Cheap Rate Call girls Sarita Vihar Delhi 9205541914 shot 1500 nightCheap Rate Call girls Sarita Vihar Delhi 9205541914 shot 1500 night
Cheap Rate Call girls Sarita Vihar Delhi 9205541914 shot 1500 night
 
(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Service
(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Service(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Service
(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Service
 
April 2024 - Crypto Market Report's Analysis
April 2024 - Crypto Market Report's AnalysisApril 2024 - Crypto Market Report's Analysis
April 2024 - Crypto Market Report's Analysis
 
Week-01-2.ppt BBB human Computer interaction
Week-01-2.ppt BBB human Computer interactionWeek-01-2.ppt BBB human Computer interaction
Week-01-2.ppt BBB human Computer interaction
 
Invezz.com - Grow your wealth with trading signals
Invezz.com - Grow your wealth with trading signalsInvezz.com - Grow your wealth with trading signals
Invezz.com - Grow your wealth with trading signals
 
Log Analysis using OSSEC sasoasasasas.pptx
Log Analysis using OSSEC sasoasasasas.pptxLog Analysis using OSSEC sasoasasasas.pptx
Log Analysis using OSSEC sasoasasasas.pptx
 
Call me @ 9892124323 Cheap Rate Call Girls in Vashi with Real Photo 100% Secure
Call me @ 9892124323  Cheap Rate Call Girls in Vashi with Real Photo 100% SecureCall me @ 9892124323  Cheap Rate Call Girls in Vashi with Real Photo 100% Secure
Call me @ 9892124323 Cheap Rate Call Girls in Vashi with Real Photo 100% Secure
 
BabyOno dropshipping via API with DroFx.pptx
BabyOno dropshipping via API with DroFx.pptxBabyOno dropshipping via API with DroFx.pptx
BabyOno dropshipping via API with DroFx.pptx
 
VidaXL dropshipping via API with DroFx.pptx
VidaXL dropshipping via API with DroFx.pptxVidaXL dropshipping via API with DroFx.pptx
VidaXL dropshipping via API with DroFx.pptx
 
Delhi 99530 vip 56974 Genuine Escort Service Call Girls in Kishangarh
Delhi 99530 vip 56974 Genuine Escort Service Call Girls in  KishangarhDelhi 99530 vip 56974 Genuine Escort Service Call Girls in  Kishangarh
Delhi 99530 vip 56974 Genuine Escort Service Call Girls in Kishangarh
 
BigBuy dropshipping via API with DroFx.pptx
BigBuy dropshipping via API with DroFx.pptxBigBuy dropshipping via API with DroFx.pptx
BigBuy dropshipping via API with DroFx.pptx
 
Carero dropshipping via API with DroFx.pptx
Carero dropshipping via API with DroFx.pptxCarero dropshipping via API with DroFx.pptx
Carero dropshipping via API with DroFx.pptx
 
Delhi Call Girls Punjabi Bagh 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls Punjabi Bagh 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip CallDelhi Call Girls Punjabi Bagh 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls Punjabi Bagh 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
 
Mature dropshipping via API with DroFx.pptx
Mature dropshipping via API with DroFx.pptxMature dropshipping via API with DroFx.pptx
Mature dropshipping via API with DroFx.pptx
 
Zuja dropshipping via API with DroFx.pptx
Zuja dropshipping via API with DroFx.pptxZuja dropshipping via API with DroFx.pptx
Zuja dropshipping via API with DroFx.pptx
 
Determinants of health, dimensions of health, positive health and spectrum of...
Determinants of health, dimensions of health, positive health and spectrum of...Determinants of health, dimensions of health, positive health and spectrum of...
Determinants of health, dimensions of health, positive health and spectrum of...
 
Introduction-to-Machine-Learning (1).pptx
Introduction-to-Machine-Learning (1).pptxIntroduction-to-Machine-Learning (1).pptx
Introduction-to-Machine-Learning (1).pptx
 
ALSO dropshipping via API with DroFx.pptx
ALSO dropshipping via API with DroFx.pptxALSO dropshipping via API with DroFx.pptx
ALSO dropshipping via API with DroFx.pptx
 
Accredited-Transport-Cooperatives-Jan-2021-Web.pdf
Accredited-Transport-Cooperatives-Jan-2021-Web.pdfAccredited-Transport-Cooperatives-Jan-2021-Web.pdf
Accredited-Transport-Cooperatives-Jan-2021-Web.pdf
 

jsm2015: the dendextend R package