carmonalab / UCell

Gene set scoring for single-cell data
GNU General Public License v3.0
135 stars 16 forks source link

Enrichment score above 1 #14

Closed amjass12 closed 2 years ago

amjass12 commented 2 years ago

Hi!

I am working with UCell and so far all analysis on the seurat objects I am running UCell for are working great. For one Seurat object though, for a specific list of genes, I am seeing U scores of 1.2 (highest score) and a lowest score of 0.99 for one particular gene list.

I am running UCell on this Seurat object as follows:

df<-read.csv('df.csv')
gene_list<-list()
for (i in unique(df$list)) {
  #print(i)

  sub<-df[df$list %in% i ,]
  list_name<-paste0('list_', i)
  append(gene_list, sub$V1)
  gene_list[[list_name]]<-sub$V1
}

the list column is a list number that every gene contains, i.e. gene1= 1, gene2=1, gene3=2 etc, column V1 is the column containing the genes.

Strangely, when i run:

object<-AddModuleScore_UCell(object, features = gene_list)
signature.names <- paste0(names(gene_list), "_UCell")

One of the gene lists has cells with a score above, 1.2, and a minimum 0.99: I have tried to troubleshoot, but cannot really pinpoint the error - the gene list above is generated in a similar way to other gene lists for which my results make perfect sense! - the same result occurs when i prepare the gene list in the way described in your Seurat tutorial (without the for loop and only using one list as an example)...

Is it possible to get scores higher than 1? My understanding is that the scores are bounded to within 0 and 1, so this is strange behaviour. Any help/advice would be much appreciated. thank you

mass-a commented 2 years ago

Hello! could you share the object and gene list that gives rise to this strange behavior? that would help us reproduce the error and troubleshoot.

amjass12 commented 2 years ago

Hi @mass-a ,

thank you so much! yes this is fine! are you able to give me an institution email that i can share a google drive link with? - it will contain the full object and the CSV file

thank you

mass-a commented 2 years ago

massimo [dot] andreatta [at] unil [dot] ch

amjass12 commented 2 years ago

Hi @mass-a

thank you! i have sent - you should see the link to download, i am sending you another separate email with dataframe of lists plus script!