scCustomize icon indicating copy to clipboard operation
scCustomize copied to clipboard

split.by error in Clustered_DotPlot function

Open apal6 opened this issue 2 years ago • 3 comments

Hi,

Thank you for the package. I was able to use the function Clustered_DotPlot without using split.by parameter. I want to look at the expression at different timepoints and time2 column is there in my metadata but i get an error when I try to use split.by.

`Clustered_DotPlot(seurat_object = _Seurat, split.by = "time2", features = c("gene1"),

  •               colors_use_exp = PurpleAndYellow())
    

Error in [.data.frame(percent_mat, , idx) : undefined columns selected`

Could you help?

Thank you!

apal6 avatar Mar 29 '24 22:03 apal6

Hi,

Are you only providing one gene to the function to plot? Could you paste the output of traceback() after the error occurs?

Thanks, Sam

samuel-marsh avatar Mar 29 '24 23:03 samuel-marsh

Hi @apal6,

Just wanted to followup on my previous message to try and figure out the issue.

Best, Sam

samuel-marsh avatar Apr 03 '24 14:04 samuel-marsh

Hi @samuel-marsh,

Thank you for following up. No, I using multiple genes. Here is the output of traceback()

5: stop("undefined columns selected") 4: [.data.frame(percent_mat, , idx) 3: percent_mat[, idx] 2: Clustered_DotPlot_Multi_Group(seurat_object = seurat_object, features = features, split.by = split.by, colors_use_exp = colors_use_exp, exp_color_min = exp_color_min, exp_color_middle = exp_color_middle, exp_color_max = exp_color_max, exp_value_type = exp_value_type, print_exp_quantiles = print_exp_quantiles, x_lab_rotate = x_lab_rotate, plot_padding = plot_padding, flip = flip, k = k, feature_km_repeats = feature_km_repeats, ident_km_repeats = ident_km_repeats, row_label_size = row_label_size, row_label_fontface = row_label_fontface, grid_color = grid_color, cluster_feature = cluster_feature, cluster_ident = cluster_ident, column_label_size = column_label_size, legend_label_size = legend_label_size, legend_title_size = legend_title_size, raster = raster, plot_km_elbow = plot_km_elbow, elbow_kmax = elbow_kmax, assay = assay, group.by = group.by, idents = idents, show_parent_dend_line = show_parent_dend_line, seed = seed) 1: Clustered_DotPlot(seurat_object = Seurat, split.by = "time2", features = c("IL4R", "IL9R", "IL21R", "IL7R"), colors_use_exp = PurpleAndYellow())

table([email protected]$time2) 3mo 6mo GMP Wk1 Wk2 Wk3 Wk4 Wk6 Wk8 368 7 118749 21085 17612 19872 5562 1 1535

Code: Clustered_DotPlot(Seurat,split.by = "time2",features = c("IL4R","IL9R","IL21R","IL7R"),colors_use_exp = PurpleAndYellow())

Thank you!

apal6 avatar Apr 03 '24 19:04 apal6

Hi @apal6,

Sorry for delay getting back to you. Before we continue trying to troubleshoot back and forth I wanted to check if it is possible to share the object so I can try and troubleshoot directly? If so please send me an email: [email protected] and I will send you google drive link to upload the object.

If not let me know here and there are couple of things we can try back and forth here.

Best, Sam

samuel-marsh avatar Apr 19 '24 09:04 samuel-marsh

Hi @samuel-marsh ,

I think I got it working. Thank you for your time.

apal6 avatar Apr 19 '24 16:04 apal6