Closed BenjaminDEMAILLE closed 1 year ago
Hi I wanted to use SPLOTlight on spatial data but I'm facing some issue. can you help me ?
I run like this :
load("/Users/benjamin/Dropbox (U932)/Salmon team/Data_storage/Seq_data/scRNASeq/public_data/Lung/Grout_Leader_data_dn1000_SCT.RData") genes <- !grepl(pattern = "^RP[L|S]|MT", x = rownames(Grout_Leader_data)) Grout_Leader_data <- subset(x = Grout_Leader_data, Cell_subtype %in% unique(mgs_df$cluster)) Grout_Leader_data <- subset(x = Grout_Leader_data, Cell_subtype %in% c("Mitocondrials", "Junk"), invert = T) mgs <- scoreMarkers(as.SingleCellExperiment(Grout_Leader_data), groups = Grout_Leader_data$Cell_subtype, BPPARAM=MulticoreParam(parallel::detectCores())) mgs_fil <- lapply(names(mgs), function(i) { x <- mgs[[i]] # Filter and keep relevant marker genes, those with AUC > 0.8 x <- x[x$mean.AUC > 0.8, ] if (dim(x)[1]>0) { # Sort the genes from highest to lowest weight x <- x[order(x$mean.AUC, decreasing = TRUE), ] # Add gene and cluster id to the dataframe x$gene <- rownames(x) x$cluster <- i data.frame(x) } }) mgs_df <- do.call(rbind, mgs_fil) Grout_Leader_data <- subset(x = Grout_Leader_data, Cell_subtype %in% names(mgs)) Grout_Leader_data$Cell_subtype <- as.character(Grout_Leader_data$Cell_subtype) Idents(Grout_Leader_data) <- as.character(Grout_Leader_data$Cell_subtype) DefaultAssay(Grout_Leader_data) <- "RNA" res <- SPOTlight( x = Grout_Leader_data, y = Plasticity_spatial.integrated, groups = as.character(Grout_Leader_data$Cell_subtype), mgs = mgs, weight_id = "median.AUC", group_id = "cluster", gene_id = "gene")
When I did :
names(mgs) %in% unique(Grout_Leader_data$Cell_subtype)
I got
[1] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE [33] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE
How can I do ?
thanks for your help
Both are Seurat object
Hello, how did you solve it, thank you.
Hi apologies for the late response here, would it be possible to get a more extended error message to help me debug this?
Hi I wanted to use SPLOTlight on spatial data but I'm facing some issue. can you help me ?
I run like this :
When I did :
I got
How can I do ?
thanks for your help
Both are Seurat object