# When to use the batch\_key in highly\_variable\_genes()

**URL:** <https://discourse.scverse.org/t/when-to-use-the-batch-key-in-highly-variable-genes/3922>\
**Category:** scanpy\
**Created:** [January 21, 2026, 11:44am UTC](https://discourse.scverse.org/t/when-to-use-the-batch-key-in-highly-variable-genes/3922 "2026-01-21T11:44:22Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![BiggusDikkusMaximus](https://avatars.discourse-cdn.com/v4/letter/b/9de053/32.png) [@BiggusDikkusMaximus](https://discourse.scverse.org/u/BiggusDikkusMaximus)\
**Post date:** [January 21, 2026, 11:44am UTC](https://discourse.scverse.org/t/when-to-use-the-batch-key-in-highly-variable-genes/3922/1 "2026-01-21T11:44:22Z")

</div>

Hello, I was reading the readdocs for highly\_variable\_genes() and i was wondering when to use the batch\_key when performing sc Analysis.
