You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I had some issues to annotate Seurat clusters with the add_seurat_clustering function; even when providing an annotation clusters would be only annotated numerically, and read into SCope as NDA - Cluster X (X). By changing some parts of the code it works now, and at least for the way I am creating looms doesn't seem to give issues:
# DON'T DO THIS, KEEP ANNOTATION AS IT IS#if(length(unique(clusters)) == length(unique(annotation))) {# Make sure the order are the same# annotation<-annotation[names(clusters)]#} else {# Does not seem that cluster IDs and cluster annotation correspond# Remap to have the same number of unique IDs as the number of unique annotation# library(plyr)#clusters<-factor(x = as.integer(mapvalues(annotation, from = unique(x = annotation), to = seq_along(along.with = unique(x = annotation))-1)))#names(clusters)<-names(annotation)#}
add_global_md_clustering (lines 229-236)
if(!is.null(annotation)) {
# Force to have the same order#annotation<-annotation[names(clusters)]# If annotation for the current cluster not empty then addd<-as.vector(unlist(annotation[annotation[,1] ==cluster.id, 2]))
# ASSUMING CLUSTER NUMBER IN FIRST COLUMN AND ANNOT IN SECOND# Convert from factor to character vector to be used with nchar#d<-as.character(unique(annotation[clusters == cluster.id]))
Cheers,
C
The text was updated successfully, but these errors were encountered:
Hi @dweemx !
I had some issues to annotate Seurat clusters with the add_seurat_clustering function; even when providing an annotation clusters would be only annotated numerically, and read into SCope as NDA - Cluster X (X). By changing some parts of the code it works now, and at least for the way I am creating looms doesn't seem to give issues:
Cheers,
C
The text was updated successfully, but these errors were encountered: