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 announcement
Tal 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 Tau
Tal Galili
 
Info2008 Talgalili Presentation
Info2008 Talgalili PresentationInfo2008 Talgalili Presentation
Info2008 Talgalili Presentation
Tal 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 Optimized
Tal Galili
 
Why Are We On Strike
Why Are We On StrikeWhy Are We On Strike
Why Are We On Strike
Tal Galili
 
Mesibat Itonaim
Mesibat ItonaimMesibat Itonaim
Mesibat Itonaim
Tal Galili
 
a simple what is wordpress
a simple what is wordpressa simple what is wordpress
a simple what is wordpress
Tal 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

Top profile Call Girls In Purnia [ 7014168258 ] Call Me For Genuine Models We...
Top profile Call Girls In Purnia [ 7014168258 ] Call Me For Genuine Models We...Top profile Call Girls In Purnia [ 7014168258 ] Call Me For Genuine Models We...
Top profile Call Girls In Purnia [ 7014168258 ] Call Me For Genuine Models We...
nirzagarg
 
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 Tumkur [ 7014168258 ] Call Me For Genuine Models We...
Top profile Call Girls In Tumkur [ 7014168258 ] Call Me For Genuine Models We...Top profile Call Girls In Tumkur [ 7014168258 ] Call Me For Genuine Models We...
Top profile Call Girls In Tumkur [ 7014168258 ] Call Me For Genuine Models We...
nirzagarg
 
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
 
Computer science Sql cheat sheet.pdf.pdf
Computer science Sql cheat sheet.pdf.pdfComputer science Sql cheat sheet.pdf.pdf
Computer science Sql cheat sheet.pdf.pdf
SayantanBiswas37
 
Sonagachi * best call girls in Kolkata | ₹,9500 Pay Cash 8005736733 Free Home...
Sonagachi * best call girls in Kolkata | ₹,9500 Pay Cash 8005736733 Free Home...Sonagachi * best call girls in Kolkata | ₹,9500 Pay Cash 8005736733 Free Home...
Sonagachi * best call girls in Kolkata | ₹,9500 Pay Cash 8005736733 Free Home...
HyderabadDolls
 
Top profile Call Girls In Bihar Sharif [ 7014168258 ] Call Me For Genuine Mod...
Top profile Call Girls In Bihar Sharif [ 7014168258 ] Call Me For Genuine Mod...Top profile Call Girls In Bihar Sharif [ 7014168258 ] Call Me For Genuine Mod...
Top profile Call Girls In Bihar Sharif [ 7014168258 ] Call Me For Genuine Mod...
nirzagarg
 
+97470301568>>weed for sale in qatar ,weed for sale in dubai,weed for sale in...
+97470301568>>weed for sale in qatar ,weed for sale in dubai,weed for sale in...+97470301568>>weed for sale in qatar ,weed for sale in dubai,weed for sale in...
+97470301568>>weed for sale in qatar ,weed for sale in dubai,weed for sale in...
Health
 
Top profile Call Girls In Chandrapur [ 7014168258 ] Call Me For Genuine Model...
Top profile Call Girls In Chandrapur [ 7014168258 ] Call Me For Genuine Model...Top profile Call Girls In Chandrapur [ 7014168258 ] Call Me For Genuine Model...
Top profile Call Girls In Chandrapur [ 7014168258 ] Call Me For Genuine Model...
gajnagarg
 

Recently uploaded (20)

TrafficWave Generator Will Instantly drive targeted and engaging traffic back...
TrafficWave Generator Will Instantly drive targeted and engaging traffic back...TrafficWave Generator Will Instantly drive targeted and engaging traffic back...
TrafficWave Generator Will Instantly drive targeted and engaging traffic back...
 
Top profile Call Girls In Purnia [ 7014168258 ] Call Me For Genuine Models We...
Top profile Call Girls In Purnia [ 7014168258 ] Call Me For Genuine Models We...Top profile Call Girls In Purnia [ 7014168258 ] Call Me For Genuine Models We...
Top profile Call Girls In Purnia [ 7014168258 ] Call Me For Genuine Models We...
 
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...
 
Charbagh + Female Escorts Service in Lucknow | Starting ₹,5K To @25k with A/C...
Charbagh + Female Escorts Service in Lucknow | Starting ₹,5K To @25k with A/C...Charbagh + Female Escorts Service in Lucknow | Starting ₹,5K To @25k with A/C...
Charbagh + Female Escorts Service in Lucknow | Starting ₹,5K To @25k with A/C...
 
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 Tumkur [ 7014168258 ] Call Me For Genuine Models We...
Top profile Call Girls In Tumkur [ 7014168258 ] Call Me For Genuine Models We...Top profile Call Girls In Tumkur [ 7014168258 ] Call Me For Genuine Models We...
Top profile Call Girls In Tumkur [ 7014168258 ] Call Me For Genuine Models We...
 
SAC 25 Final National, Regional & Local Angel Group Investing Insights 2024 0...
SAC 25 Final National, Regional & Local Angel Group Investing Insights 2024 0...SAC 25 Final National, Regional & Local Angel Group Investing Insights 2024 0...
SAC 25 Final National, Regional & Local Angel Group Investing Insights 2024 0...
 
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 ...
 
Computer science Sql cheat sheet.pdf.pdf
Computer science Sql cheat sheet.pdf.pdfComputer science Sql cheat sheet.pdf.pdf
Computer science Sql cheat sheet.pdf.pdf
 
Sonagachi * best call girls in Kolkata | ₹,9500 Pay Cash 8005736733 Free Home...
Sonagachi * best call girls in Kolkata | ₹,9500 Pay Cash 8005736733 Free Home...Sonagachi * best call girls in Kolkata | ₹,9500 Pay Cash 8005736733 Free Home...
Sonagachi * best call girls in Kolkata | ₹,9500 Pay Cash 8005736733 Free Home...
 
Gomti Nagar & best call girls in Lucknow | 9548273370 Independent Escorts & D...
Gomti Nagar & best call girls in Lucknow | 9548273370 Independent Escorts & D...Gomti Nagar & best call girls in Lucknow | 9548273370 Independent Escorts & D...
Gomti Nagar & best call girls in Lucknow | 9548273370 Independent Escorts & D...
 
Discover Why Less is More in B2B Research
Discover Why Less is More in B2B ResearchDiscover Why Less is More in B2B Research
Discover Why Less is More in B2B Research
 
Top profile Call Girls In Bihar Sharif [ 7014168258 ] Call Me For Genuine Mod...
Top profile Call Girls In Bihar Sharif [ 7014168258 ] Call Me For Genuine Mod...Top profile Call Girls In Bihar Sharif [ 7014168258 ] Call Me For Genuine Mod...
Top profile Call Girls In Bihar Sharif [ 7014168258 ] Call Me For Genuine Mod...
 
+97470301568>>weed for sale in qatar ,weed for sale in dubai,weed for sale in...
+97470301568>>weed for sale in qatar ,weed for sale in dubai,weed for sale in...+97470301568>>weed for sale in qatar ,weed for sale in dubai,weed for sale in...
+97470301568>>weed for sale in qatar ,weed for sale in dubai,weed for sale in...
 
Nirala Nagar / Cheap Call Girls In Lucknow Phone No 9548273370 Elite Escort S...
Nirala Nagar / Cheap Call Girls In Lucknow Phone No 9548273370 Elite Escort S...Nirala Nagar / Cheap Call Girls In Lucknow Phone No 9548273370 Elite Escort S...
Nirala Nagar / Cheap Call Girls In Lucknow Phone No 9548273370 Elite Escort S...
 
Digital Transformation Playbook by Graham Ware
Digital Transformation Playbook by Graham WareDigital Transformation Playbook by Graham Ware
Digital Transformation Playbook by Graham Ware
 
Vadodara 💋 Call Girl 7737669865 Call Girls in Vadodara Escort service book now
Vadodara 💋 Call Girl 7737669865 Call Girls in Vadodara Escort service book nowVadodara 💋 Call Girl 7737669865 Call Girls in Vadodara Escort service book now
Vadodara 💋 Call Girl 7737669865 Call Girls in Vadodara Escort service book now
 
Top profile Call Girls In Chandrapur [ 7014168258 ] Call Me For Genuine Model...
Top profile Call Girls In Chandrapur [ 7014168258 ] Call Me For Genuine Model...Top profile Call Girls In Chandrapur [ 7014168258 ] Call Me For Genuine Model...
Top profile Call Girls In Chandrapur [ 7014168258 ] Call Me For Genuine Model...
 
Ranking and Scoring Exercises for Research
Ranking and Scoring Exercises for ResearchRanking and Scoring Exercises for Research
Ranking and Scoring Exercises for Research
 
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
 

jsm2015: the dendextend R package