kevinblighe / E-MTAB-6141

Data from Lewis, Barnes, Blighe et al., Cell Rep. 2019 Aug 27; 28(9): 2455–2470.e5.
117 stars 39 forks source link

two errors in plot of windows #1

Closed dj10086 closed 4 years ago

dj10086 commented 4 years ago

hi, I am trying to repeat the code you supplied, but found 2 errors in windows R. thanks in advance

1 'Gene\nZ-\nscore' will give errors in windows, not like linux, windows does not support \n, maybe it connected with file name 2 one line code repeat in the following `# row (gene) parameters cluster_rows = TRUE, show_row_dend = TRUE,

row_title = 'Statistically significant genes',

  row_title_side = 'left',
  row_title_gp = gpar(fontsize = 12,  fontface = 'bold'),
  row_title_rot = 90,
  show_row_names = FALSE,
  **row_names_gp = gpar(fontsize = 10, fontface = 'bold'),**
  row_names_side = 'left',
  row_dend_width = unit(25,'mm'),`


and I found the gene names font size is so big, I change the row_title_gp = gpar(fontsize = 1, fontface = 'bold'), but does not make sense, how should I revise it?

and after change Gene\nZ-\nscore to Gene_Z--score, it outsided the plot area, image

kevinblighe commented 4 years ago

For Windows, perhaps try \r\n

dj10086 commented 4 years ago

no, it also does not work

kevinblighe commented 4 years ago

From where are you running R? I have not tested the tutorial in R Studio because I do not use R Studio.

dj10086 commented 4 years ago

I test all the code, now I revise the font in anno_mark, the font size becomes ok. but the line feed still can not be ok. image

dj10086 commented 4 years ago

hmap <- Heatmap(heat,

            # split the genes / rows according to the PAM clusters
            split = pamClusters$clustering,
            cluster_row_slices = FALSE,
            **name = 'Gene Z-score',**  # must delete the \n in windows
kevinblighe commented 4 years ago

Strange. What about \r?

Can you elaborate on how you are using R? R Studio? R Server?

dj10086 commented 4 years ago

R Studio and R in windows has beed tried \n and \r\n has bedd tried. does not work at all

kevinblighe commented 4 years ago

Really not sure what is happening. You can use a shorter name like 'Z-score', or change the following:

name = 'Gene Z-score',
legend_direction = 'horizontal

draw(hmap + genelabels,
    heatmap_legend_side = 'bottom',
    annotation_legend_side = 'right',
    row_sub_title_side = 'left')
kevinblighe commented 4 years ago

Well, any luck?

kevinblighe commented 4 years ago

No response