-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DotPlot_scCustom do not plot meta data variables #44
Comments
Hi @saeedfc, Thanks for kind words and thanks for posting this issue! Yup, simple mistake on my part when writing the function leaving only the gene check in. I've resolved the issue with modifying the code to resemble that of Stacked_VlnPlot with checks on both features and meta data. This should be fixed in develop branch v0.7.0.9920. If you still run into this again after update let me know and I'll reopen the issue. Also as you probably know sometimes need to be careful in terms of DotPlots off of metadata if keeping default of scale = TRUE because scaling the data may or may not be the most appropriate visualization/comparison for some types of data stored there. Best, |
Do we still need to download the development branch for this feature? Or is it in the main package now? |
@mmandanas in the main package. just keep in mind warning about scaling data off of meta data variables |
Thank you so much for your quick response! I currently have version 2.1.2 installed, but when I tried to use Clustered_DotPlot to show module scores that I've calculated using Seurat's AddModuleScore function, but when I try to input the name of the module scores into Clustered_DotPlot, I get an error from Feature_Present() saying that my feature isn't present in the RNA assay. Was this fix specific to DotPlot_scCustom? |
I'm able to plot meta.data variables without issue from Clustered_DotPlot. What is the result if you run:
|
I think I realized the issue: I was trying to only plot that single module score, but I think I need to plot multiple features at a time for it to work, as I can get the plot to show up if I add some genes to the list of features. My module score name is in the colnames of the meta.data, but when I try to use the split.by parameter, I get the following: Clustered_DotPlot(seurat_object = Wang_granular_clean, Warning: The following 1 features were not found in the RNA assay: HALLMARK_MTORC1_SIGNALING_RNA1 |
Ok yes so the error is two fold. First, yes clustered dot plot needs multiple features because it performs clustering on the features. Second is issue with how I wrote the split.by version of the plotting. Let me look into it in terms of solution. I will open new issue and tag you there |
Thank you for the Package!
The DotPlot_scCustom is not behaving as expected. Currenlty only genes can be plotted. Not the numeric variables in the meta data such as module scores in a seurat metadata. Seurat's Default DotPlot works same with the same synatx as shown in the code below
Looking at the source code, DotPlot use the Gene_Present function first to cross check the supplied list of 'features'.
features_list <- Gene_Present(data = seurat_object, gene_list = features,omit_warn = TRUE, print_msg = FALSE, case_check_msg = TRUE)[[1]]
However, Gene_Present function only checks for rownames of the Default Assay matrix in Seurat and do not look for meta data columns. (possible_features <- rownames(x = GetAssayData(object = data, assay = assay)))
Using FetchData function from Seurat might be better as it already looks at both meta data and the assay matrix for the supplied vars. As to other object classes I do not have experience with them.
sessionInfo() output
The text was updated successfully, but these errors were encountered: