Skip to content
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

Error in plot_umap #17

Open
sanchezy opened this issue Feb 2, 2022 · 4 comments
Open

Error in plot_umap #17

sanchezy opened this issue Feb 2, 2022 · 4 comments

Comments

@sanchezy
Copy link

sanchezy commented Feb 2, 2022

Hi all,

I have a SeuratObject sc:

24026 features across 60260 samples within 1 assay 
Active assay: RNA (24026 features, 0 variable features)
2 dimensional reductions calculated: umap, ref.umap

calculate_auc runs fine and I can produce the lollipop plot but when I try to overlay the AUC onto the umap by using:
plot_umap(augur, sc, mode = "rank")

I get the following error:
Error in $<-.data.frame(tmp, "auc", value = numeric(0)) : replacement has 0 rows, data has 60260

Is there any solution to this? Any help will be greatly appreciated!

@skinnider
Copy link
Collaborator

Hi @sanchezy - I'm not entirely sure what's going on but it seems like plot_umap isn't able to match up the AUCs calculated by Augur to the data frame needed to overlay them onto a UMAP.
Just a guess, but is it possible that in the Seurat object, your cell types are not in a column named "cell_type"?
I'd be happy to take a closer look and see if I can debug whatever's going on here, but I would need you to send the sc object you're using as input to Augur. Are you able to share that?

@sanchezy
Copy link
Author

Hi @skinnider,
Yes, the cell type annotations are in a column called 'CellTypeManual'. So, I ran the code as:

augur = calculate_auc(sc, label_col = 'Condition2', cell_type_col = 'CellTypeManual')

I made a smaller version of the object sc and will send it by email shortly.
Thanks for looking into this.

@skinnider
Copy link
Collaborator

Hi @sanchezy, sorry for the delay. I'm not able to reproduce this error with the dataset you sent over when I run the following two commands:

augur = calculate_auc(sc, label_col = 'Condition2', cell_type_col = 'CellTypeManual')
plot_umap(augur, sc, cell_type_col = 'CellTypeManual', mode = 'rank')

Are you passing the cell_type_col argument into plot_umap as well as calculate_auc?

@sanchezy
Copy link
Author

Hi @skinnider , thanks a lot for looking into this. Indeed, the solution was to pass the cell_type_col argument into plot_umap.
Many thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants