-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error with annotateCellTypesGSEA function #58
Comments
Hi @odunola26, The error is basically saying that Thanks, |
Dear Brendan, #Spatial Deconvolution filter pos to same set of pixelspos2 <- pos[colnames(counts),] Convert x and y columns to numericpos2$x <- as.numeric(pos2$x) choose optimal number of cell-typesldas <- fitLDA(t(as.matrix(corpus)), Ks = seq(14, 16, by = 1), #ldas <- fitLDA(t(as.matrix(corpus)), Ks =c(21)) get best model results#optLDA <- optimalModel(models = ldas, opt = "min") extract deconvolved cell-type proportions (theta) and transcriptional profiles (beta)results <- getBetaTheta(optLDA, perc.filt = 0.05, betaScale = 1000) color deconvolved topics based on transcriptional similarityhc <- hclust(dist(deconGexp), 'ward.D2') visualize deconvolved cell-type proportionsvizAllTopics(deconProp, pos2, Annotating the Topicsgexp <- results$beta Create a nested listcell_genes <- list( Perform annotationcelltype_annotations <- annotateCellTypesGSEA(beta = gexp, gset = cell_genes, qval = 0.05) Looking forward to your response Thank you. Regards, |
Hi @odunola26, Sorry for the delay in my response. Looking at the code you provided and the code in the function, there isn't an immediately obvious issue - it all looks correct in principle. To further dive into this, it would help if you could provide your Sorry I can't be more helpful. |
Thanks Brendan, I appreciate your time.
|
Hello,
Please, I am trying to annotate my cells using the GSEA function with I list I generated myself as seen below, but it is throwing errors:
Error in gset[[celltype]]$character :
$ operator is invalid for atomic vectors
Could you please advise on how I can fix this problem?
Create a nested list
cell_genes <- list(
Macrophages = c("PTPRC", "CD163", "MSR1", "CD14", "CD68", "AIF1", "CSF1R", "CD69", "APOC1"),
Monocytes = c("PTPRC", "CD14", "FCGR3A", "FCGR3B", "TIMP1", "CD44", "G0S2"),
NK_cells = c("PTPRC", "KLRK1", "NCR1"),
Dendritic_cells = c("PTPRC", "CD1A", "HLA-DRA", "HLA-DRB1", "CD80", "CD86"),
B_cells = c("PTPRC", "MS4A1", "CD19", "CD79A", "CD79B", "CD52", "BANK1", "IGHD", "IGHM", "CD69", "CD83"),
CD4_T_cells = c("PTPRC", "CD3D", "CD3E", "CD3G", "CD4", "IL2RA", "CD28", "FOXP3"),
CD8_T_cells = c("PTPRC", "CD3D", "CD3E", "CD3G", "CD8A", "CD8B", "GZMA", "GZMB", "PRF1"),
Treg = c("FOXP3", "CD25", "CTLA4", "IL2RA", "IKZF2", "IKZF4"),
Endothelial_cells = c("PECAM1", "FLT1", "PTPRB", "EGFL7", "VWF", "CDH5"),
Skeletal_cells = c("MYOD1", "MYOG", "DES", "ACTA1", "MYH3"),
Fibroblasts = c("ACTA2", "COL1A1", "COL1A2", "FAP", "PDGFRA", "PDGFRB"),
Adipocytes = c("FABP4", "LEP", "ADIPOQ", "PPARG", "PLIN1"),
HSC = c("HPCA1", "PROM1", "KIT", "THY1", "ENG"),
Epithelial_cells = c("EPCAM", "KRT8", "KRT18", "CDH1", "MUC1")
)
Perform annotation
celltype_annotations <- annotateCellTypesGSEA(beta = gexp, gset = cell_genes, qval = 0.05)
Error in gset[[celltype]]$character :
$ operator is invalid for atomic vectors
Thank you.
Regards,
Odunola
The text was updated successfully, but these errors were encountered: