This is pretty simple, have a heatmap with a lot of genes. I want to hide all rownames except the handful of genes I want to highlight. I have searched on google, on this forum, but could not find a solution.
Anyone have advice?
Code below
pheatmap(MyData,
cluster_rows = T,cluster_cols = F,
clustering_distance_rows = 'euclidean',
clustering_distance_cols = 'euclidean',
clustering_method = 'ward.D',
annotation_row = gene_functions,
fontsize_row = 6,
fontsize_col = 10,
cellwidth=10,
cellheight = 1,
show_colnames = T, show_rownames=F)
I did find this post that definitely is close to what I want: Add selected row names on pheatmap
I suspect the answer i want is an adjustment of the code in that post, to tell it exactly which rows i want it to exclude or include. Thanks
I have been fiddling with the code in the link and havent had any luck. The issue is the 25 genes I want to include are randomly distributed in the rownames
How do i convert row names i dont want to character(0)? I have a list/data frame with only the names that i want to show.
Does this mean what I would be doing is converting the unwanted names to be essentially blank in MyData then tell the lab.rows to be all the row names but since some are blank they just wont show up?
thanks!
This is a basic R manipulation that you will need to understand if you plan to use R. Reading the intro to R that you can find at r-project.org is highly recommended.