Three years since this video was posted, and here I am too making a nice figure. And this is not the only video that has helped me. Thank you very much, Dr Schloss.
This video is amazing! I have very little experience with R - only 2.5 courses throughout my degree, so this video has helped me so much in understanding easily what each function is helping me to achieve. I feel like I have the power to control my graphs visually now and this is such a great feeling! Thank you, Pat. 🙏
I like the dual-hue colour gradients, it encodes the value from light to dark (so colourblind friendly) and from one hue to another. The colorspace and colorbrewer packages have some nice multi-hue sequential palettes.
The true power of heatmaps is only realized when they are combined with clustering approaches. This is more relevant when the data you are working with has a greater number of features/conditions to visualize.
Hi Stephen - thanks for the comment. Great point! I do wonder though if that makes it better for a data exploration than presentation mode. Granted, not all heat maps with dendrograms are created equal. I've seen too many radial dendrograms recently with heat maps as circles around the dendrograms. There's so many wedges and lack of structure to the data that I'm left thinking, "pretty! but what does it say?" I appreciate your comment - I'll come back to rectangle heat maps and will show how to order the rows/columns with dendrograms
I believe I have an exception to the rule. I'll tag you on Twitter when our paper comes out (still a work in progress) to see if one of our supplemental figures changes your mind! 😉
Hi Pat, thanks for your videos they are really helpful I am plotting my microbiome data using your videos and I am a newbie coder and a newbie in the microbiome world. I was wondering what you thought about "Blanks" and including these in plots. I replicated this heat map with my data: two "sample_types" with a "disease status" either positive or negative" and my blank. Had to use coord_cartesian instead to allow, scale="free_x" inside the facet_grid but it worked!
Hi Pat, not sure if I'm asking the right question. Will it be possible to represent heatmaps as chord diagrams with different layers, say one layer with heat map, second layer as box plot etc? And also by showing their correlation inside the chord diagram. I have seen packages like 'circlize' which are not user-friendly, but the way you explain is so easy to follow. Thanks
The only improvement I might ask for is to put data in only some of the squares rather than all of them i.e. for anything that has significance, you could add * , ** , or "***" (or even the number) - how would you do this?
Interesting idea! I'm not a fan of *s, but if you only wanted to show the abundances for where there were significant differences, you could use geom_text to plot the values and for those where there wasn't a significant difference you could replace the number with an empty string
Hi Prof, the code related to this heatmap tutorial cannot be found in the accompanying blog post. When I click the link, the code available in there is the code for the Grouped stacked barchart tutorial. Could you fix this and put the code the right code in the blog post, please? Thank you
Thanks for watching! Yeah I think that was the code at the start of the episode. You’ll have to watch along with the video to get the code for the heatmap
I'm getting an error message: "could not find function "ggsave". I went to install it but it is not an option. I have the newest version of R and R studio. Any advice would be greatly appreciated!
Are you sure you ran library(tidyverse)? You should also double check that you don’t have other errors earlier in the script. Ggsave comes from ggplot2 so if you’re missing ggsave you should be missing other stuff too
Great video! what I cannot seem to figure out is how to change the order of my variables on the y-axis. I reordered them according to their taxonomic class but when I plot them the default stack them right back to alphabetic order. So first how can I prevent this from happening and is there a way to link the order to the information in a different dataframe? Anyone got an idea? Would be awesome!
Very helpful! Really appreciate. I also learned some unexpected tips about how to handle the long item names in ggplot 😁BTW, have you compared the geom_tile and heatmap functions? I googled the answers, and they are not quite clear to me.
I used heatmap and heatmap2 a long time ago and found them pretty limiting. I always had to rewrite the underlying heatmap code to do what I wanted. I like how geom_tile works well with ggplot2 stuff 🤷♂️
Three years since this video was posted, and here I am too making a nice figure. And this is not the only video that has helped me. Thank you very much, Dr Schloss.
Hah! Thanks so much for watching. I'm glad you're finding my videos helpful 🤓
Without your videos some of our research work wouldn't have been easy to explain Dr Schloss., Thank you a tone
My pleasure! Thanks for watching 🤓
Two years since this video was posted and here i am trying to make a descent figure for my thesis. Thank you Dr Schloss
It is so true, a heatmap ends up being a table... But with colors, so its prettier? lol. Loving code club, as a beginner this is so helpful
Thanks, Coral - glad to have you following along!
This video is amazing! I have very little experience with R - only 2.5 courses throughout my degree, so this video has helped me so much in understanding easily what each function is helping me to achieve. I feel like I have the power to control my graphs visually now and this is such a great feeling! Thank you, Pat. 🙏
My pleasure! Thanks for watching 🤓
I like the dual-hue colour gradients, it encodes the value from light to dark (so colourblind friendly) and from one hue to another. The colorspace and colorbrewer packages have some nice multi-hue sequential palettes.
Thanks for sharing!
Yet another great episode 😁👍
Hey Rasmus - thanks!
Great video as always
Thanks for tuning in!
Great tutorial!
Thanks Kunal!
The true power of heatmaps is only realized when they are combined with clustering approaches. This is more relevant when the data you are working with has a greater number of features/conditions to visualize.
Hi Stephen - thanks for the comment. Great point! I do wonder though if that makes it better for a data exploration than presentation mode. Granted, not all heat maps with dendrograms are created equal. I've seen too many radial dendrograms recently with heat maps as circles around the dendrograms. There's so many wedges and lack of structure to the data that I'm left thinking, "pretty! but what does it say?" I appreciate your comment - I'll come back to rectangle heat maps and will show how to order the rows/columns with dendrograms
The start... Poetry!!!
HAHA! Thanks for watching ;)
How do you pass-by (#) multiple lines simultaneously like you did at 4:53?
Pressing cmd enter runs lines and pipelines. I think it also skips over comment chunks
@@Riffomonas Brilliant, thanks for that
V useful thank u
You're welcome 😊
I believe I have an exception to the rule. I'll tag you on Twitter when our paper comes out (still a work in progress) to see if one of our supplemental figures changes your mind! 😉
Awesome - please do!
Wow, I am really interested in your figs! Would you mind sharing the doi or link here, if it is published or posted?
That was really helpful thank you so much!
Question, why did you set the maximum abundance less than 3%? why 3%?
Thank you!
Hi Pat, thanks for your videos they are really helpful I am plotting my microbiome data using your videos and I am a newbie coder and a newbie in the microbiome world. I was wondering what you thought about "Blanks" and including these in plots. I replicated this heat map with my data: two "sample_types" with a "disease status" either positive or negative" and my blank. Had to use coord_cartesian instead to allow, scale="free_x" inside the facet_grid but it worked!
That's an interesting idea. You mean as a way to show that things in a negative control weren't what you found in your samples?
@@Riffomonas Blanks/controls that you include alongside your sample extractions and may indicate the "potential" level of contamination.
Hi Pat, not sure if I'm asking the right question. Will it be possible to represent heatmaps as chord diagrams with different layers, say one layer with heat map, second layer as box plot etc? And also by showing their correlation inside the chord diagram. I have seen packages like 'circlize' which are not user-friendly, but the way you explain is so easy to follow. Thanks
I’m sure there is - it’s not something I’ve done. I’m not a big fan of circles 😂
The only improvement I might ask for is to put data in only some of the squares rather than all of them i.e. for anything that has significance, you could add * , ** , or "***" (or even the number) - how would you do this?
Interesting idea! I'm not a fan of *s, but if you only wanted to show the abundances for where there were significant differences, you could use geom_text to plot the values and for those where there wasn't a significant difference you could replace the number with an empty string
@@Riffomonas thank you!
Hi Prof, the code related to this heatmap tutorial cannot be found in the accompanying blog post.
When I click the link, the code available in there is the code for the Grouped stacked barchart tutorial.
Could you fix this and put the code the right code in the blog post, please?
Thank you
Thanks for watching! Yeah I think that was the code at the start of the episode. You’ll have to watch along with the video to get the code for the heatmap
I'm getting an error message: "could not find function "ggsave". I went to install it but it is not an option. I have the newest version of R and R studio. Any advice would be greatly appreciated!
Are you sure you ran library(tidyverse)? You should also double check that you don’t have other errors earlier in the script. Ggsave comes from ggplot2 so if you’re missing ggsave you should be missing other stuff too
Does anyone know how you would change the font size of the phylum on the heat map?
You can use the theme function with the axis labels y argument
which package do i need to download for the heat map
Thanks for watching. It’s all ggplot2 which you can get when you install the tidyverse
Great video! what I cannot seem to figure out is how to change the order of my variables on the y-axis. I reordered them according to their taxonomic class but when I plot them the default stack them right back to alphabetic order. So first how can I prevent this from happening and is there a way to link the order to the information in a different dataframe? Anyone got an idea? Would be awesome!
Error in library(ggtext) : there is no package called ‘ggtext’
Make sure you install it first
Genius!!!
Very helpful! Really appreciate. I also learned some unexpected tips about how to handle the long item names in ggplot 😁BTW, have you compared the geom_tile and heatmap functions? I googled the answers, and they are not quite clear to me.
I used heatmap and heatmap2 a long time ago and found them pretty limiting. I always had to rewrite the underlying heatmap code to do what I wanted. I like how geom_tile works well with ggplot2 stuff 🤷♂️