Entering edit mode
16 months ago
Hien
•
0
Hi everyone,
Do anyone help me to figure out my error in SPOTlight command? Tutorials and outsourcing data for SPOTlight are not enough for me to fix my errors.
I have two Seurat objects: one is a Seurat object from https://www.gutcellatlas.org/ for reference with annotating cell lines, and the other is a Seurat object from my sample (Visium spatial gene expression).
spotlight_ls <- SPOTlight(
x = seurat_cap3,
y = data_sc,
groups = "category", # Variable in sc_seu containing the cell-type annotation
mgs = test, # Dataframe with the marker genes
n_top = NULL,
gene_id = "gene",
weight_id = "weight",
group_id = "type",
gene_id = "gene"
)
It always shows the error:
Error in SPOTlight(x = seurat_sc, y = data_sc, groups = "category", mgs = test, : formal argument "gene_id" matched by multiple actual arguments
sessionInfo(package = NULL)
R version 4.3.1 (2023-06-16 ucrt)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19045)
Thank you so much!
Hi, Thank you for your indication! I have fixed the command as removing gene_id = gene and the title of mgs(cluster_markers_all) following "gene", "type", and "weight".
However, again, it shows the different error
Right now, I have not indicated how to fix it :(
Unfortunately, I have no experience with SPOTlight. The previous error was a generic R issue, so I could help nonetheless, but this one is clearly package specific.
However,
is.null(groups) | length(groups) == ncol(x) is not TRUE
tests that either no groups are provided or the length of the group vector corresponds to the number of columns in x. So try to runncol(seurat_sc)
and provide a vector of exactly this length to group. Assuming yourseurat_sc
would only comprise 4 columns/cells, something likegroup = c("A","B","A","C")
could work?