Announcement

Collapse
No announcement yet.
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • heatmap.2 for two samples without replication

    I have a samll RNA-Seq sample data as show below:


    >hsa-let-7a-5p 2209192 2451725
    >hsa-let-7b-5p 2602079 2662024
    >hsa-let-7f-5p 1053355 982221
    >hsa-let-7e-5p 246609 308765
    >hsa-let-7c-5p 281729 300213
    >hsa-miR-320a 185702 241361
    >hsa-miR-29a-3p 154804 104144
    >hsa-let-7d-5p 53230 67939
    >hsa-miR-423-5p 99983 78185
    >hsa-miR-199a-3p 60100 88733
    >hsa-miR-199b-3p 60100 88733
    >hsa-miR-221-3p 64926 67229
    >hsa-let-7g-5p 41642 45398
    >hsa-miR-103a-3p 32894 29542
    >hsa-miR-21-5p 11757 13865
    >hsa-let-7i-5p 16907 18536
    >hsa-miR-191-5p 16334 15549
    >hsa-miR-185-5p 19671 17588

    When I want to draw a heatmap with this database I found that there are only two colors in the pictures.


    Below is my code

    HTML Code:
    library(gplots)
    
    myheatcol <- redgreen(75)
    
    hr <- hclust(as.dist(1-cor(t(b), method="pearson")), method="complete")
    
    hc <- hclust(as.dist(1-cor(b, method="spearman")), method="complete")
    
    mycl <- cutree(hr, h=max(hr$height)/1.5); 
    
    mycolhc <- rainbow(length(unique(mycl)), start=0.1, end=0.9); 
    
    mycolhc <- mycolhc[as.vector(mycl)]
    
    heatmap.2(as.matrix(b), Rowv=as.dendrogram(hr), Colv=as.dendrogram(hc), col=myheatcol, scale="row", density.info="none", trace="none", RowSideColors=mycolhc,key.xlab="",margin=c(6, 6))

    Anyone can give me some suggestions?
    Attached Files

  • #2
    Is normal, you are using scale="row", so the values in each row are centered and scaled. With two samples, you wil get only two colours.

    Try with scale="none", or to add more samples in your dataset (maybe replicates are usefull)

    Paolo

    Comment


    • #3
      Thank you very much for your suggestion, Paolo.

      It's working when I using the follow command

      HTML Code:
      heatmap.2(as.matrix(log10(b)),Colv=as.dendrogram(hc), breaks=c(seq(-3,1,length=100),seq(1,3,length=100),seq(3,6,length=100)),col=redgreen(299), scale="none", density.info="none", trace="none",key.xlab="",margin=c(6, 6),symm=F,symkey=F,symbreaks=T)
      But, the heatmap seem very similar between these two group.

      If another two groups are added, the difference seem to be more significantly.


      Any one have some good suggestions?
      Attached Files

      Comment

      Latest Articles

      Collapse

      • seqadmin
        Advanced Methods for the Detection of Infectious Disease
        by seqadmin




        The recent pandemic caused worldwide health, economic, and social disruptions with its reverberations still felt today. A key takeaway from this event is the need for accurate and accessible tools for detecting and tracking infectious diseases. Timely identification is essential for early intervention, managing outbreaks, and preventing their spread. This article reviews several valuable tools employed in the detection and surveillance of infectious diseases.
        ...
        11-27-2023, 01:15 PM
      • seqadmin
        Strategies for Investigating the Microbiome
        by seqadmin




        Microbiome research has led to the discovery of important connections to human and environmental health. Sequencing has become a core investigational tool in microbiome research, a subject that we covered during a recent webinar. Our expert speakers shared a number of advancements including improved experimental workflows, research involving transmission dynamics, and invaluable analysis resources. This article recaps their informative presentations, offering insights...
        11-09-2023, 07:02 AM

      ad_right_rmr

      Collapse

      News

      Collapse

      Topics Statistics Last Post
      Started by seqadmin, Today, 07:37 AM
      0 responses
      14 views
      0 likes
      Last Post seqadmin  
      Started by seqadmin, Yesterday, 08:23 AM
      0 responses
      8 views
      0 likes
      Last Post seqadmin  
      Started by seqadmin, 12-01-2023, 09:55 AM
      0 responses
      23 views
      0 likes
      Last Post seqadmin  
      Started by seqadmin, 11-30-2023, 10:48 AM
      0 responses
      23 views
      0 likes
      Last Post seqadmin  
      Working...
      X