# Rank\_genes\_groups pts and DE

**URL:** <https://discourse.scverse.org/t/rank-genes-groups-pts-and-de/3519>\
**Category:** scanpy\
**Created:** [February 27, 2025, 7:35pm UTC](https://discourse.scverse.org/t/rank-genes-groups-pts-and-de/3519 "2025-02-27T19:35:16Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Slack90](https://avatars.discourse-cdn.com/v4/letter/s/aeb1de/32.png) [@Slack90](https://discourse.scverse.org/u/Slack90)\
**Post date:** [February 27, 2025, 7:35pm UTC](https://discourse.scverse.org/t/rank-genes-groups-pts-and-de/3519/1 "2025-02-27T19:35:16Z")

</div>

Hi,

I am using ran rank\_genes\_groups specifying pts as true as I want the percentage of cells in the cluster that have the gene I am calling. This is what I am using:

```auto
sc.tl.rank_genes_groups(adata, 'cell type', pts = True)
markers = sc.get.rank_genes_groups_df(adata, None)
markers = markers[(markers.pvals_adj < 0.05) & (markers.logfoldchanges > .5)]
markers

```

But I notice that markers also has two columns pct\_nz\_group and pct\_nz\_reference. Does anyone know what these are? I cannot find information on that in the documentation…  
 ![image](https://canada1.discourse-cdn.com/flex035/uploads/forum11/original/2X/f/f97a3dbb50f4532acb3db89d1812fd3b4dc2ad5d.png)

Also, do people know how to get violin plots of the differentially expressed genes across the clusters in scanpy?
