Closed hwenxi closed 3 years ago
Having trouble reproducing this. Can you provide a bit more info on what you are passing into plot_umap? Are you passing in the entire augur results (i.e., including the y, cell_types, results, etc slots) or just the AUC data frame?
To help reproduce the error. Can you download the Kang2018.rds from here: https://zenodo.org/record/4772064#.YOtN7BNKh24
I've just done the following and I am not getting any issues:
library(Seurat)
library(tidyverse)
library(Augur)
# load in the Kang dataset
sc = readRDS("data/rnaseq/seurat/Kang2018.rds") %>%
NormalizeData() %>%
FindVariableFeatures() %>%
ScaleData() %>%
RunPCA() %>%
RunUMAP(dims = 1:10)
# run augur
augur = calculate_auc(sc)
# plot
plot_umap(augur, sc)
Thanks for the note about the warning. This is just for the calculation of precision so not to worry, we will suppress it.
Hi, I discovered my error was naming the cell annotations column differently and not specifying the new column name in plot_umap. I am now running into a ggplot error:
> plot_umap(tfaug, twofour, cell_type_col = "reclustered")
Error: Breaks and labels are different lengths
Run `rlang::last_error()` to see where the error occurred.
In addition: Warning message:
`guides(<scale> = FALSE)` is deprecated. Please use `guides(<scale> = "none")` instead.
Do you have any idea what could be causing this? Thanks for all the help!
I am still not quite able to reproduce your error. Are you sure you do not have some NAs in your cell type vector?
I'm not sure how to explain this, but I just reran everything exactly the same as I have before and it worked? I am pretty sure I did not change anything and I have not reset my environment since first posting this problem. Hopefully this bug doesn't appear again for me or anyone else...
Thanks Jordan for all the help!
Hi, Thank you in advance for your help and for providing this great tool. While trying to plot the AUC over the UMAP, I ran into the following error.
I am using a seurat object that has a umap dimensional reduction. After skimming the plot_umap.R file I cannot pinpoint where this error is occuring.
Furthermore, I am not sure if this is relevant or a separate error but I am getting 50+ occurrences of this error when I run the calculate auc. But I am still presented with AUC scores for each of my cell types at the end.
Please let me know if you could point me in the right direction for fixing these issues! Thanks.