Hierarchical annotation of immune cells in scRNA-Seq data based on ssGSEA algorithm. Fork for large datasets with QOL improvements.

Update seurat_maps.R

authored by Yingjiang17 and committed by GitHub 302f96a9 8151cd42

Changed files
+9 -7
R
+9 -7
R/seurat_maps.R
··· 31 31 32 32 #Perform linear dimensional reductionPerform linear dimensional reduction 33 33 counts <- seurat.data[["RNA"]]@counts 34 - cells <- length(counts[2,]) 35 - if(cells>50){ 36 - seurat.data <- RunPCA(seurat.data, features = VariableFeatures(object = seurat.data)) 37 - }else{ 38 - seurat.data <- RunPCA(seurat.data,npcs = (cells-1), features = VariableFeatures(object = seurat.data)) 39 - } 40 - 34 + #cells <- length(counts[2,]) 35 + #if(cells>50){ 36 + # seurat.data <- RunPCA(seurat.data, features = VariableFeatures(object = seurat.data)) 37 + #}else{ 38 + # seurat.data <- RunPCA(seurat.data,npcs = (cells-1), features = VariableFeatures(object = seurat.data)) 39 + #} 40 + seurat.data <- seurat.data[!duplicated(rownames(seurat.data)), ] 41 + seurat.data <- RunPCA(seurat.data,npcs = (cells-1), features = VariableFeatures(object = seurat.data)) 42 + 41 43 head(seurat.data@reductions$pca@cell.embeddings) 42 44 head(seurat.data@reductions$pca@feature.loadings) 43 45 seurat.data <- ProjectDim(object = seurat.data)