-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add_col_labels and add_row_labels distorting labels #23
Comments
Hi @alpreyes, I don't know the cause but I can see that something looks awry. Is there a minimal example of the code used that you can share? I realize you might not be able to share the code/data for the example above, but if there is a basic/simplified version that shows the same error that would be really helpful for figuring out what might be going wrong |
Hi Alicia, thank you for your reply. here is example code for the first screenshot (labeled Euclidian Distance Heatmap) `output$heatmap_clus <- renderIheatmap({
})` |
Here is the example code for the second screenshot (labeled Expression Heatmap) `output$heatmap_expr <- renderIheatmap({ ###### heatmap is under construction too...raw counts doesnt work...need to get saving obj code to work
})` |
Hi @alpreyes, Thanks for sharing the code snippets. For plot 2-- looking at this one more closely now, it seems like all the rows and columns are there, but that the row names are just really scrunched up. Or am I missing some other flaw? This could be addressed by either giving the plot more vertical room in the app, or by reducing the size of the text: add_row_labels(ticktext = geneNames, font = list(size = 8)) For plot 1, I can more clearly see that there are issues beyond label crowding. I made a matrix of random data and then tried to recreate the part of your code that makes the heatmap: tmpmat <- matrix(rnorm(120), nrow = 10)
matrix_clus <- cbind(data.frame(geneName = letters[seq_len(nrow(tmpmat))]), tmpmat)
selected_rows <- c(1,5,9,2)
main_heatmap(as.matrix(dist(t(matrix_clus[selected_rows,-1])))) %>%
add_col_labels(ticktext = colnames(matrix_clus[,-1])) %>%
add_row_labels(ticktext = colnames(matrix_clus[,-1])) %>%
add_col_dendro(hclust(dist(t(matrix_clus[selected_rows,-1]))), reorder = TRUE) %>%
add_row_dendro(hclust(dist(t(matrix_clus[selected_rows,-1]))), reorder = TRUE, side = "right") And it seemed to make the heatmap I would expect with no mis-alignment issues. Can you |
Hi @AliciaSchep this problem with row labels was resolved in the app i'm building however i'm now having similar problems when trying to generate heatmaps in a regular R script. It is a similar issue where all labels seem to be there but they are overlapping. Adjusting the font does not seem to fix the problem and I haven't figured out what plotly options to use to adjust the dimensions of the heatmap. Here is a screen shot of an example heatmap with the label problem. and here is the code used to generate the it
any insight on how to fix the problem would be greatly appreciated. Thank you! |
Is vst_all_cols_DEA_genes$Genename a factor or a character vector? |
it is a character vector
and just in case this might help
|
I am using iheatmapr in a shiny app that I'm developing. In the app the user can select rows from a data table to view in two different types of heatmaps. Depending on the number of rows selected, the resulting heatmaps have labels that are either missing or overlapping. I attached two screen shots that demonstrate the problem. I was hoping you knew what was causing this. Any help is appreciated. Thank you!
![screen shot 2018-04-06 at 2 36 57 pm](https://user-images.githubusercontent.com/18359652/38447553-c8d9f5f0-39b2-11e8-802a-615b48f61e12.png)
![screen shot 2018-04-06 at 2 37 02 pm](https://user-images.githubusercontent.com/18359652/38447554-c904585e-39b2-11e8-847f-b3062bf113c6.png)
The text was updated successfully, but these errors were encountered: