# Filter single cells by a specific gene in scRNAseq dataset using scanpy

**URL:** <https://help.galaxyproject.org/t/filter-single-cells-by-a-specific-gene-in-scrnaseq-dataset-using-scanpy/10509>\
**Category:** usegalaxy.org support\
**Tags:** single-cell\
**Created:** [July 23, 2023, 6:52pm UTC](https://help.galaxyproject.org/t/filter-single-cells-by-a-specific-gene-in-scrnaseq-dataset-using-scanpy/10509 "2023-07-23T18:52:16Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![joshua.harvey.20](https://avatars.discourse-cdn.com/v4/letter/j/76d3ee/32.png) [@joshua.harvey.20](https://help.galaxyproject.org/u/joshua.harvey.20)\
**Post date:** [July 23, 2023, 6:52pm UTC](https://help.galaxyproject.org/t/filter-single-cells-by-a-specific-gene-in-scrnaseq-dataset-using-scanpy/10509/1 "2023-07-23T18:52:16Z")

</div>

Hi,

I am processing scRNAseq data using scanpy on Galaxy. Is there a way to filter cells specifically on a single gene. e.g. if I wanted to filter my cells to include only those cells that express gene “X” at counts of 3 or more for instance.

Thanks!!

Josh

---

<div class="post-metadata">

**Author:** ![jennaj](https://sea2.discourse-cdn.com/flex020/user_avatar/help.galaxyproject.org/jennaj/32/27_2.png) [@jennaj](https://help.galaxyproject.org/u/jennaj)\
**Post date:** [July 25, 2023, 8:32pm UTC](https://help.galaxyproject.org/t/filter-single-cells-by-a-specific-gene-in-scrnaseq-dataset-using-scanpy/10509/2 "2023-07-25T20:32:09Z")

</div>

Hi @joshua.harvey.20

Yes, but I’m pretty sure that will need to annotate the cells before you can query based on that annotation (and other attributes).

These are our single-cell tutorials. You can also search the site with tool names, like “scanpy”.

> **[Galaxy Training: Single Cell](https://training.galaxyproject.org/training-material/topics/single-cell/)**
>
> Training material and practicals for all kinds of single ...
