igordot / msigdbr

MSigDB gene sets for multiple organisms in a tidy data format
https://igordot.github.io/msigdbr
Other
70 stars 14 forks source link

enricher result is different from msigDB web "investigate Gene Sets" #14

Closed weiliuyuan closed 3 years ago

weiliuyuan commented 3 years ago

Hi,

Many thanks for the msigdbr package. Can I ask a question about the result of enricher please?

msigdbr_t2g = msigdbr_df %>% dplyr::select(gs_name, gene_symbol) %>% as.data.frame()
enricher(gene = gene_symbols_vector, TERM2GENE = msigdbr_t2g, ...)

I am using the code above but I've found the result of enriched msigDB signatures is different from "investigate gene sets" on msigDB website. I thought it's based on the number of the overlapped gene between the user's gene and the background gene in the gene set. But the overlapped gene count from enricher seems smaller than the real overlapped count (i.e. if I use intersect to see how many genes overlapped between mine and the msigdb gene set). Did i misunderstand the function of enricher here? And if possible, how can I get the same results to msigDB web?

Thanks in advance!

Best, Wei

igordot commented 3 years ago

The msigdbr package only provides the gene sets. The enricher() function is from clusterProfiler. It has the universe parameter to define the background genes. The clusterProfiler developers would be better able to address any additional details.

weiliuyuan commented 3 years ago

Thanks a lot! I will look at clusterProfiler