cluster cell match
antoine4ucsd opened this issue · 2 comments
antoine4ucsd commented
Hello
thank you for this promising package!
I am using it for human brain sample (one may have cancer cell but I expect mostly Mg)
Here my code
mysample <- CreateSeuratObject(counts = mysample.data, project = "mysample", min.cells = 3, min.features = 200)
# normalize data
mysample[["percent.mt"]] <- PercentageFeatureSet(mysample, pattern = "^MT-")
mysample <- NormalizeData(mysample, normalization.method = "LogNormalize", scale.factor = 10000)
mysample <- FindVariableFeatures(mysample, selection.method = "vst", nfeatures = 3000)
# scale and run PCA
mysample <- ScaleData(mysample, features = rownames(mysample))
mysample <- RunPCA(mysample, features = VariableFeatures(object = mysample))
# Check number of PC components (we selected 10 PCs for downstream analysis, based on Elbow plot)
ElbowPlot(mysample)
# cluster and visualize
mysample <- FindNeighbors(mysample, dims = 1:10)
mysample <- FindClusters(mysample, resolution = 0.8)
mysample$seurat_clusters
mysample_sce <- as.SingleCellExperiment(mysample)
mysample_sce <- scuttle::logNormCounts(mysample_sce)
mysample_mat <- counts(mysample_sce)
mysample_mat2 <- rev_gene(data = mysample_mat, data_type = "data", species = "Human", geneinfo = geneinfo)
mysample_clusterlist <- as.character(mysample_sce@colData$seurat_clusters)
mysample_mat3 <- createscCATCH(data = mysample_mat2, cluster = mysample_clusterlist)
# find highly expressed genes
mysample_mat3 <- findmarkergene(object = mysample_mat3, species = "Human", marker = cellmatch, tissue = "Brain")
mysample_mat3 <- findcelltype(object = mysample_mat3)
with this resolution, I have 10 clusters but not all seem annotated:
mysample_mat3@celltype$cluster
[1] "2" "4" "5" "9" "8"
mysample_mat3@celltype$cell_type
[1] "Microglial Cell" "Lake Et Al.science.ex8, Microglial Cell" "Microglial Cell"
[4] "Macrophage" "Astrocyte"
my few questions:
- even if I decrease the resolution to 0.1, I still have less cluster annotated than number of seurat clusters. did I miss something?
- is there a simple way to put back the cell type matching all cells in the mysample_sce@colData object or in the seurat metadata?
- for cancer cell identification , should I create a combined ref?
thank you !
multitalk commented
You can try
tissue_name <- c("Brain", "Dorsolateral prefrontal cortex", "Embryonic brain", "Embryonic prefrontal cortex", "Fetal brain", "Hippocampus", "Inferior colliculus", "Midbrain", "Sympathetic ganglion")
mysample_mat3 <- findmarkergene(object = mysample_mat3, species = "Human", marker = cellmatch, tissue = tissue_name)
or
mysample_mat3 <- findmarkergene(object = mysample_mat3, use_method = "2", species = "Human", marker = cellmatch, tissue = tissue_name)
or
mysample_mat3 <- findmarkergene(object = mysample_mat3, use_method = "2", species = "Human", marker = cellmatch, tissue = "Brain")
antoine4ucsd commented
thank you!