saezlab / decoupleR

R package to infer biological activities from omics data using a collection of methods.
https://saezlab.github.io/decoupleR/
GNU General Public License v3.0
190 stars 24 forks source link

Use FindAllMarkers to detect top TFs per cluster in scRNA data #108

Closed akramdi closed 8 months ago

akramdi commented 9 months ago

Hello,

Thank you for this great package ! Could you please tell me if it is possible to use Seurat's FindAllMarkers to detect top TFs per cluster ? In the python vignette, it is mentioned that scanpy.tl.rank_genes_groups can be used for this purpose after inference of TF enrichment scores.

If so, I am also wondering if it is best to provide FindAllMarkers with the scores prior to scaling and keep scaled scores for visualization ? Do you have any recommendations ?

I will eventually move to the python implementation which seems more complete but for now I'd like to explore my results as much as possible using the R package.

Many thanks, Amira

PauBadiaM commented 9 months ago

Hi @akramdi,

Indeed you can use the FindAllMarkers function to identify which TFs are markers of each cluster. Actually I had to reimplement the function scanpy.tl.rank_genes_groups to decoupler.rank_sources_groups since it expects only positive values and the logFC had NaNs, so you might run into the same problem with the Seurat counterpart.

Personally I would only scale the activities for visualization, but this should not affect the test since it is done per TF (the distribution is the same, just centered at 0 now). Hope this is helpful!