Skip to content

Strange subscript out of bounds error #78

@yimingsun12138

Description

@yimingsun12138

Hi, I got a strange error.

Here is my code:
EnrichedHeatmap(mat = mat1,row_split = factor(group_list[rownames(mat1)],levels = c('level1','level2','level3')),use_raster = TRUE,raster_resize_mat = mean,col = col_fun,pos_line = FALSE,row_order = p@row_order,name = '1',width = unit(1.5,'inches'),height = unit(9,'inches'),show_heatmap_legend = FALSE) + EnrichedHeatmap(mat = mat2,row_split = factor(group_list[rownames(mat2)],levels = c('level1','level2','level3')),use_raster = TRUE,raster_resize_mat = mean,col = col_fun,pos_line = FALSE,row_order = p@row_order,name = '2',width = unit(1.5,'inches'),height = unit(9,'inches'),show_heatmap_legend = FALSE) + EnrichedHeatmap(mat = mat3,row_split = factor(group_list[rownames(mat3)],levels = c('level1','level2','level3')),use_raster = TRUE,raster_resize_mat = mean,col = col_fun,pos_line = FALSE,row_order = p@row_order,name = '3',width = unit(1.5,'inches'),height = unit(9,'inches'),show_heatmap_legend = TRUE)

And I get the error:
Error in mat[seq(ind_r1[i], ind_r2[i]), seq(ind_c1[j], ind_c1[j]), drop = FALSE] : subscript out of bounds

But if I modify the height parameter to 10 inches, the error gone away and the plot generated perfectly. That's quite strange and I do not know how this error happened. Firstly I guess it may be because of I have too many rows (around 5w peaks), but when I use another peak set to generate the enriched heatmap with the same code, 10 inches lead to error and 9 inches worked well.

Can you look into this error and give me any clue about how to avoid it? Thank you so much for your amazing tools!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions