Open thugib opened 4 years ago
Hi @thugib, Augur assumes by default that your sample labels will be a column label
(singular, not plural). You can either rename this column in your Seurat object, or set the label_col
argument to calculate_auc
:
augur = calculate_auc(ABCpm.combined, cell_type_col = "labels")
Hi skinnider, So, I do not have a 'labels' in the Seuart object. Looking at the metadata: ..@ meta.data :'data.frame': 2152 obs. of 10 variables: .. ..$ orig.ident : chr [1:2152] "root" "root" "root" "root" ... .. ..$ nCount_RNA : num [1:2152] 2515 35299 4830 11057 3212 ... . ..$ nFeature_RNA : int [1:2152] 1369 4560 2314 1475 1624 4561 1269 2856 2450 1389 ... .. ..$ percent.mt : num [1:2152] 0 0.275 3.499 1.348 0.28 ... .. ..$ nCount_SCT : num [1:2152] 4805 6460 5398 6798 5320 ... .. ..$ nFeature_SCT : int [1:2152] 1430 2116 2271 1353 1612 1807 1472 2830 2392 1463 ... .. ..$ treatment : chr [1:2152] "minus" "minus" "minus" "minus" ... .. ..$ group : chr [1:2152] "A" "A" "A" "A" ... .. ..$ integrated_snn_res.0.5: Factor w/ 12 levels "0","1","2","3",..: 4 7 5 9 2 7 3 2 5 12 ... .. ..$ seurat_clusters : Factor w/ 12 levels "0","1","2","3",..: 4 7 5 9 2 7 3 2 5 12
I tried using 'treatment' for the labels: augur = calculate_auc(ABCpm.combined, cell_type_col = "seurat_clusters", label_col = "treatment" )
But, I was getting an error: Error in calculate_auc(ABCpm.combined, cell_type_col = "seurat_clusters", : (converted from warning) coercing labels to factor ...
So, I had to convert 'treatment' into a factor: ABCpm.combinedAu@meta.data$treatment <- as.factor(ABCpm.combinedAu@meta.data$treatment)
and they I could run: augur = calculate_auc(ABCpm.combinedAu, cell_type_col = "seurat_clusters", label_col = "treatment" )
Now it works ! Thanks.
I am running Augur on a Seurat object that was created using Seurat's integrating datasets methods. I receive an error that 'Column 'labels' is NULL. The R commands and results are below: