montilab / hypeR

An R Package for Geneset Enrichment Workflows
https://montilab.github.io/hypeR-docs/
GNU General Public License v3.0
76 stars 11 forks source link

work with single-cell RNA-seq data? #27

Closed gt7901b closed 3 years ago

gt7901b commented 4 years ago

Hi:

First of all. Thanks for developing this nice package.

Is there an easier way to work with single-cell RNA-seq data? For example, extract top cluster markers from a seurat object to do hypeR?

Much like your WGCNA example $ turquoise : chr [1:1902] "CLEC3A" "KCNJ3"
the color name will be cluster name?

thanks for your time

anfederico commented 4 years ago

Thanks!

Yes you could do that.

But you'd have to implement the extraction of sets of cluster markers from Seurat and conform them to a names list, much like we do with the output of WGCNA. We try to keep hypeR as general as possible, so we do not have plans to add something like this directly into the package.

gt7901b commented 4 years ago

thank for your reply. I extracted the ranked gene names from the clusters and run mhyp_mouse <- hypeR(cluster_markers, gsets, test="hypergeometric", background=30000) the output are cluster names 0 1 2 3 4 5 6 ... then I run hyp_dots(mhyp_mouse, merge=TRUE, fdr=0.05, title="cluster") got the error message Error in hyp_dots(mhyp_mouse, merge = TRUE, fdr = 0.05, title = "cluster"): unused argument (merge = TRUE) It says, merge not used. When I removed the merge parameter, the dot plots are showing, but between cluster 14 plot and cluster 15, it printed $0

$1

$2

$3

$4

$5

$6...

finally, if I run mhyp_mouse it shows (multihyp) (hyp) 0 50 x 8 (hyp) 1 50 x 8 (hyp) 2 50 x 8 (hyp) 3 50 x 8 (hyp) 4 50 x 8 (hyp) 5 50 x 8 (hyp) 6 50 x 8...

what do you think might cause the error? It can generate the dot plots, but cannot output the results.

this is how I generated wgcna-like input

cluster_markers<- list() for(i in unique(markers$cluster)) { cluster_markers[[i]] <- subset(markers$gene, markers$cluster==i) }

markers is the data frame output from seurat function FindAllMarkers , I just extracted the ranked gene names | p_val | avg_logFC | pct.1 | pct.2 | p_val_adj | cluster | gene

Ctss | 8.784173e-164 | 2.604368 | 0.992 | 0.129 | 2.207199e-159 | 0 | Ctss

anfederico commented 4 years ago

What version of hypeR are you using? The merge parameter for hyp_dots() is a relatively new feature.

gt7901b commented 4 years ago

The latest version

anfederico commented 4 years ago

The latest version installed through Github? Can I see your session info?