Skip to content

Access underlying matrix used in Clustered_DotPlot to remove NA/NaN/Inf #178

Open
@nehawali21

Description

@nehawali21

Thank you so much for creating this package; it's been revolutionary for spicing up the standard Seurat figures! As a novice bioinformatician, I'm afraid I've run into a small issue that I hope I could kindly get some help with.

I'm trying to create a clustered dotplot of about 200 genes' expression across identities after Seurat analysis of a small published scRNAseq dataset.

However, inputting my genes of interest yields the following error, which I believe is due to scaling introducing issues in the matrix used to make the dotplot:

Error in hclust(get_dist(t(submat), distance), method = method) : 
  NA/NaN/Inf in foreign function call (arg 10)

Below are the parameters I'm using in the Clustered_DotPlot function:

Clustered_DotPlot(seurat, 
                  features = features,
                  exp_value_type = "scaled",
                  plot_padding = c(5,5,5,5), 
                  cluster_feature = TRUE,
                  cluster_ident = TRUE,
                  raster = FALSE,
                  seed = 1212,
                  x_lab_rotate = 90, 
                  row_label_size = 10,
                  column_label_size = 10,
                  legend_label_size = 10,
                  legend_title_size = 10,
                  plot_km_elbow = FALSE, 
                  flip = TRUE)

I'm not sure how to access the underlying matrix the Clustered_DotPlot function uses so that I could examine and exclude genes causing the issue. I'd be most grateful on what I can do to generate a graph.

Also, can you kindly clarify which direction the scaling occurs in, i.e. by row (originally a gene's expression across clusters) or by column (originally identities)? That is, will the flip parameter retain the original scaling (just now transposed numbers) as it only flips axes at the end to generate the plot?

Metadata

Metadata

Assignees

Labels

more-info-neededFurther information is requested

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions