heatmap in R: Tutorial 10-Heatmap, Data Visualization using R , GGplot2, data correlation

แชร์
ฝัง
  • เผยแพร่เมื่อ 26 ก.ย. 2024
  • #heatmap #ggplot2 #datavisulisation #correlation
    Visualization of correlation using heatmap.
    This session demonstrates how to plot to visualize the correlation between variables using ggplot2. Other correlation visualizations are not suitable when the number of observations being plotted is very large. Overlap prevents the display of correlation. Heatmap is very effective method to overcome this problem.
    Heatmap visualise the magnitude of values using proportional intensities and hues of colors.
    The following code is used in the tutorial.
    drive.google.c...

ความคิดเห็น • 47

  • @hirashahzad2816
    @hirashahzad2816 3 ปีที่แล้ว +1

    Excellent video. Very well explained in simple words n simple steps. Keep making such good videos. Im looking forward to learn . 🙂

    • @DevResearch
      @DevResearch  3 ปีที่แล้ว +1

      Thanks for appreciation.

  • @praveenthlawrance3675
    @praveenthlawrance3675 ปีที่แล้ว

    Thank you so much sir. You are helping a lot for my PhD

    • @DevResearch
      @DevResearch  ปีที่แล้ว

      Glad to hear that. Thanks

  • @muralikrishna59
    @muralikrishna59 2 ปีที่แล้ว

    Nice representation of bulk data.
    May be people will update their knowledge on R program Instead of using routine data analysis tools in Excel/Origin.
    Congratulations.

    • @DevResearch
      @DevResearch  2 ปีที่แล้ว

      Thanks for appreciation.

  • @nigarmutallimova8461
    @nigarmutallimova8461 ปีที่แล้ว

    Thank you sir. It was very helpful

    • @DevResearch
      @DevResearch  ปีที่แล้ว +1

      Glad, you liked it. Thanks for the response. Please watch and like other videos also.

  • @rajeshlenka5894
    @rajeshlenka5894 3 ปีที่แล้ว +1

    Great videos sir ❤️🙌

  • @sakshiguptasg01
    @sakshiguptasg01 3 ปีที่แล้ว +1

    I ran the same command, however, it doesn't generate the row numbers in the matrix form as explained at 3:12

    • @DevResearch
      @DevResearch  3 ปีที่แล้ว

      These are row numbers of the matrix. Send me the code which you are running?

  • @cherryblossom__
    @cherryblossom__ ปีที่แล้ว

    Thank you for the video! Why did you use 256 with the terrain colors and 25 with the RColorBrewer?

    • @DevResearch
      @DevResearch  ปีที่แล้ว +1

      That was arbitrary choice. You choose colors as per your levels and resolution of colors you need . More colors are confusing but if the number of levels is very high , a large number of colors helps.

  • @alexisjose7515
    @alexisjose7515 3 ปีที่แล้ว +1

    Excelente !!!

    • @DevResearch
      @DevResearch  3 ปีที่แล้ว

      Thank you very much. Please share with your friends.

  • @VinaySharma-eu6nj
    @VinaySharma-eu6nj ปีที่แล้ว

    Sir Can you please let me know how we can add scale of expression in heatmap

  • @AmitKumar-cc3ze
    @AmitKumar-cc3ze 3 ปีที่แล้ว

    Is there any way to find out the list of genes in a cluster?

  • @ananou712
    @ananou712 ปีที่แล้ว

    Thank you very much sir for this useful video. Please, can you provide a code to generate the clusters in an excel file or CSV? I will really appreciate. Thanks once again.

    • @DevResearch
      @DevResearch  ปีที่แล้ว +1

      I will give you the code soon.

    • @ananou712
      @ananou712 ปีที่แล้ว

      @@DevResearch thank you for your reply. I will expect the code. Many thanks

  • @habibali2380
    @habibali2380 ปีที่แล้ว

    Sr why everyone don't share high resolution save (heatmap) ?
    Plz help me

    • @DevResearch
      @DevResearch  ปีที่แล้ว

      png("heatmap.png", width = 1700,height = 1700)
      heatmap(as.matrix(iris[1:4]),scale="column",cexRow = 2,cexCol = 2)
      dev.off()
      Increased resolution as height and width, results in reduced size of text. Use cex=2 or 3 to make text size suitable for the size.

    • @habibali2380
      @habibali2380 ปีที่แล้ว

      @@DevResearch thank you thank you very much . Its worked ❤️❤️🌹

  • @hakankibar5421
    @hakankibar5421 ปีที่แล้ว

    How can I make a two-dimensional correlation heatmap in r studio.

    • @DevResearch
      @DevResearch  ปีที่แล้ว

      cor_val

    • @hakankibar5421
      @hakankibar5421 ปีที่แล้ว

      @@DevResearch As a result of the analysis, there is no legend in the heatmap. How can I create it.

    • @DevResearch
      @DevResearch  ปีที่แล้ว

      @@hakankibar5421
      library("pheatmap")
      pheatmap(scale(mtcars), cutree_rows = 4)

    • @hakankibar5421
      @hakankibar5421 ปีที่แล้ว

      @@DevResearch Thank you

  • @leela2499
    @leela2499 4 ปีที่แล้ว +2

    very well explained sir thank u

    • @DevResearch
      @DevResearch  4 ปีที่แล้ว +2

      Thanks a lot for appreciation. Please share with your friends.

    • @leela2499
      @leela2499 4 ปีที่แล้ว +1

      @@DevResearch sure if u share ur mail id it will be easy for me to clear my doubts

    • @DevResearch
      @DevResearch  4 ปีที่แล้ว +1

      Thanks for appreciation. Please share with your friends.

  • @liferesearchvlog7048
    @liferesearchvlog7048 4 ปีที่แล้ว

    Could you please teach how to annotation in both row and column?

    • @DevResearch
      @DevResearch  4 ปีที่แล้ว

      Yes I will. Very soon will do that.

  • @zeinabourhane874
    @zeinabourhane874 3 ปีที่แล้ว

    Dear Dr, i would like to ask how can i include p-value in each cell ?

    • @DevResearch
      @DevResearch  3 ปีที่แล้ว

      Each cell of heatmap?

    • @zeinabourhane874
      @zeinabourhane874 3 ปีที่แล้ว

      @@DevResearch each case in the map

    • @DevResearch
      @DevResearch  3 ปีที่แล้ว

      Yes. If you have matrix of p values of correlations, you can use geom tiles. And using label mapped to p values, can have geom text.

    • @DevResearch
      @DevResearch  3 ปีที่แล้ว

      x

  • @rajeshsarda4669
    @rajeshsarda4669 2 ปีที่แล้ว

    Sir, how to add legend for the Heat map? please provide code for add the legend

    • @DevResearch
      @DevResearch  2 ปีที่แล้ว

      df=as.matrix(mtcars)
      #2. Now plot heatmap.
      heatmap(df)
      #4. You can scale it to normalise data
      heatmap(df, scale="column", Colv=NA)
      # Plot a corresponding legend
      legend(x="topright",
      y= "top", legend=c("min", "med", "max"),fill=heat.colors(3))
      Try above one. I tried this on my android phone. If yiu need more sophisticated approach using other packages, lete know.

  • @KamalSingh-dn7gv
    @KamalSingh-dn7gv 3 ปีที่แล้ว

    Nice Rajendra. I have another question that is related to ggmsa. can you please help me. Thanks

    • @DevResearch
      @DevResearch  3 ปีที่แล้ว

      It's a visulisation package. Needs alignment file in fasta format. Can customise color scheme and fonts. Can be combined with tree. Is there any other specific thing you want?

    • @KamalSingh-dn7gv
      @KamalSingh-dn7gv 3 ปีที่แล้ว

      @@DevResearch hi Rajendra hi. Thanks. Yes, I do have something specific. Can I send you an email. My email is singhka@missouri.edu. Thanks- Kamal

    • @DevResearch
      @DevResearch  3 ปีที่แล้ว

      Yes please mail me. My id is rajuchoure@gmail.com.

    • @KamalSingh-dn7gv
      @KamalSingh-dn7gv 3 ปีที่แล้ว

      @@DevResearch Rajendra JI, I just sent you an email from my work account. Thank you very much for your help.