Skip to content

Commit

Permalink
making clearer labels for the heatmap
Browse files Browse the repository at this point in the history
  • Loading branch information
jsalignon committed Mar 16, 2023
1 parent bf0f8aa commit 1fd6d20
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -4696,6 +4696,14 @@ process Figures__making_enrichment_heatmap {
# creating a data.frame with row and column indexes for plotting
df_final = add_matrix_indexes_to_df(mat_final, df, nrows, ncols)
# changing labels
colnames(mat_final) %<>% strsplit('_') %>%
sapply(function(x) paste0(x[1], ifelse(x[3] == 'up', ' > ', ' < '), x[2]))
if(data_type %in% c('peaks_self', 'genes_self')) {
rownames(mat_final) %<>% strsplit('_') %>%
sapply(function(x) paste0(x[1], ifelse(x[3] == 'up', ' > ', ' < '), x[2]))
}
# making and saving plots
p1 = getting_heatmap_base(df_final, nrows, ncols, title = key,
cur_mat = mat_final, axis_text_size = axis_text_size,
Expand Down

0 comments on commit 1fd6d20

Please sign in to comment.