Hi, I am trying to retrieve the metadata file using the code from the website, but it isn't working:
meta_data <- cbind(rownames(data_object@meta.data), data_object@meta.data[,’cluster’, drop=F]) ##### cluster is the user’s specific cluster columnwrite.table(meta_data, ‘cellphonedb_meta.txt’, sep=’\t’, quote=F, row.names=F)
I get the error Error in [.data.frame(dataneg@meta.data, , "Mac", drop = F) : undefined columns selected. Does anyone have a working version of the code? Thanks!
If your file is made by seurat_v3, you can try it:
meta_data <- cbind(rownames(seuratObj@meta.data), seuratObj@meta.data[,"seurat_clusters"])
Because the colnames is different.
Hi, I am trying to retrieve the metadata file using the code from the website, but it isn't working:
meta_data <- cbind(rownames(data_object@meta.data), data_object@meta.data[,’cluster’, drop=F]) ##### cluster is the user’s specific cluster column
write.table(meta_data, ‘cellphonedb_meta.txt’, sep=’\t’, quote=F, row.names=F)
I get the error
Error in [.data.frame(dataneg@meta.data, , "Mac", drop = F) : undefined columns selected
. Does anyone have a working version of the code? Thanks!