wu-yc / scMetabolism

Quantifying metabolism activity at the single-cell resolution
BSD 3-Clause "New" or "Revised" License
114 stars 47 forks source link

gsva method in sc.metabolism.Seurat #10

Open hjames1 opened 2 years ago

hjames1 commented 2 years ago

Hi,I'm afraid there is a small bug in the sc.metabolism.Seurat function.

  if (method == "ssGSEA") {
    library(GSVA)
    library(GSEABase)
    geneSets <- getGmt(gmtFile)
    gsva_es <- gsva(as.matrix(countexp2), geneSets, method = c("ssgsea"), 
      kcdf = c("Poisson"), parallel.sz = ncores)
    signature_exp <- data.frame(gsva_es)
  }
  if (method == "ssGSEA") {
    library(GSVA)
    library(GSEABase)
    geneSets <- getGmt(gmtFile)
    gsva_es <- gsva(as.matrix(countexp2), geneSets, method = c("gsva"), 
      kcdf = c("Poisson"), parallel.sz = ncores)
    signature_exp <- data.frame(gsva_es)
  }

The second method == "ssGSEA"should be replaced by method =="gsva"