# Is it possible to include leading edge genes in decoupler.run\_gsea output?

**URL:** <https://discourse.scverse.org/t/is-it-possible-to-include-leading-edge-genes-in-decoupler-run-gsea-output/1325>\
**Category:** Help\
**Created:** [April 17, 2023, 6:30am UTC](https://discourse.scverse.org/t/is-it-possible-to-include-leading-edge-genes-in-decoupler-run-gsea-output/1325 "2023-04-17T06:30:35Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![resolsc](https://avatars.discourse-cdn.com/v4/letter/r/b9bd4f/32.png) [@resolsc](https://discourse.scverse.org/u/resolsc)\
**Post date:** [April 17, 2023, 6:30am UTC](https://discourse.scverse.org/t/is-it-possible-to-include-leading-edge-genes-in-decoupler-run-gsea-output/1325/1 "2023-04-17T06:30:35Z")

</div>

Hi, everyone,

I have been following the section of [Gene set enrichment and pathway analysis](https://www.sc-best-practices.org/conditions/gsea_pathway.html#case-study-pathway-enrichment-analysis-and-activity-level-scoring-in-human-pbmc-single-cells) in single-cell best practices. Specifically, I am trying to use decoupler.run\_gsea to perform pathway enrichment with scRNA-seq data. The results look very good and consistent with our understanding of the data. But I wish I can include the leading edge genes in the output somehow? I searched around but could not really figure out how to achieve that, at least using decoupler. Maybe GSEApy is better route for this? Any suggestions would be very much appreciated. Sorry if I missed anything obvious.

---

<div class="post-metadata">

**Author:** ![PauBadiaM](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.scverse.org/paubadiam/32/410_2.png) [@PauBadiaM](https://discourse.scverse.org/u/PauBadiaM)\
**Post date:** [April 17, 2023, 8:36am UTC](https://discourse.scverse.org/t/is-it-possible-to-include-leading-edge-genes-in-decoupler-run-gsea-output/1325/2 "2023-04-17T08:36:09Z")

</div>

Hi @resolsc

Unfortunately it is still not available in `decoupler` yet but it is in our list. Will let you know once it is ready.

---

<div class="post-metadata">

**Author:** ![PauBadiaM](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.scverse.org/paubadiam/32/410_2.png) [@PauBadiaM](https://discourse.scverse.org/u/PauBadiaM)\
**Post date:** [September 8, 2023, 8:10am UTC](https://discourse.scverse.org/t/is-it-possible-to-include-leading-edge-genes-in-decoupler-run-gsea-output/1325/3 "2023-09-08T08:10:59Z")

</div>

Hi @resolsc

Better late than never. Now `decoupler` 1.5.0 includes leading edge results with the function [decoupler.get\_gsea\_df](https://decoupler-py.readthedocs.io/en/latest/generated/decoupler.get_gsea_df.html#decoupler.get_gsea_df) and you can plot them with the function [decoupler.plot\_running\_score](https://decoupler-py.readthedocs.io/en/latest/generated/decoupler.plot_running_score.html#decoupler.plot_running_score)  
 ![](https://canada1.discourse-cdn.com/flex035/uploads/forum11/original/1X/95b8825886e5d18113aa1e03f7bd8199578bdbd1.png)  
Hope this is helpful!

---

<div class="post-metadata">

**Author:** ![resolsc](https://avatars.discourse-cdn.com/v4/letter/r/b9bd4f/32.png) [@resolsc](https://discourse.scverse.org/u/resolsc)\
**Post date:** [September 8, 2023, 5:04pm UTC](https://discourse.scverse.org/t/is-it-possible-to-include-leading-edge-genes-in-decoupler-run-gsea-output/1325/4 "2023-09-08T17:04:26Z")

</div>

This is amazing! Thank you so much! With the addition of Pseudobulk, decoupler is all I need for the DGE and pathway analysis!!
