This is large data contain tau score. I converted data into matrix only contain 0 and 1 (value > 0.8 its equal to 1 if it's smaller than 0.8 it's equal to 0) and now I want to cluster data into two group and make heatmap for them.
When you performed clustering you can use cutree function to obtain any number of clusters you want. see here :
Basically you save pheatmap output to new variable and use cutree to obtain clusters by value of k
It is clear why your heatmap doesn't look good. You have too many rows. Heatmaps of over 100-200 rows are generally not useful for visualization because they are impossible to read. Reduce your data to the <100 genes most relevant to your scientific question in the geneset or choose a different visualization option.
Another issue is that you definitely need to turn on row clustering with cluster_rows = T on a smaller sample because an unordered heatmap completely defies its purpose.
Thank you for answer, into data there's two type data. 0 and 1 I wanna make heatmap for value 1 but I'm still stuck on it. How can I reduce? I used rowsum() in r for remove the column contain only 0. But it's still too large. I was thinking about cluster data then make heatmap but I don't know how to cluster data.
Sorry I added picture but it does not showing. It looks like that, it's a matrix of 0 and 1. I wanna group them and then make heatmap. It's tau score of rna-seq data (value > 0.8 its equal to 1 if its smaller than 0.8 its equal to 0)
The picture above is not the heatmap but your data seemingly. To group the rows you need to turn on row clustering in pheatmap, or try heatmap2 for testing. Your data looks binary (0,1), so I wouldn't expect shades between black and red. Please read the documentation of pheatmap carefully and try out some examples first.
What do you want to do with this data? Any specific directions or thought process for analysis?
This is large data contain tau score. I converted data into matrix only contain 0 and 1 (value > 0.8 its equal to 1 if it's smaller than 0.8 it's equal to 0) and now I want to cluster data into two group and make heatmap for them.
When you performed clustering you can use cutree function to obtain any number of clusters you want. see here : Basically you save pheatmap output to new variable and use cutree to obtain clusters by value of k