# How to do an sketch in an anndata object?

**URL:** <https://discourse.scverse.org/t/how-to-do-an-sketch-in-an-anndata-object/2261>\
**Category:** Help\
**Created:** [May 8, 2024, 9:16am UTC](https://discourse.scverse.org/t/how-to-do-an-sketch-in-an-anndata-object/2261 "2024-05-08T09:16:25Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![lamasJose](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.scverse.org/lamasjose/32/1038_2.png) [@lamasJose](https://discourse.scverse.org/u/lamasJose)\
**Post date:** [May 8, 2024, 9:16am UTC](https://discourse.scverse.org/t/how-to-do-an-sketch-in-an-anndata-object/2261/1 "2024-05-08T09:16:25Z")

</div>

Hi, I need to do a subset to work with my data. I saw the function scanpy.pp.subsample but in my understand the subsampling is completely aleatory. Are there any ways to do a representative subset like the function sketchdata does in seurat?

---

<div class="post-metadata">

**Author:** ![ivirshup](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.scverse.org/ivirshup/32/160_2.png) [@ivirshup](https://discourse.scverse.org/u/ivirshup)\
**Post date:** [May 23, 2024, 2:30am UTC](https://discourse.scverse.org/t/how-to-do-an-sketch-in-an-anndata-object/2261/2 "2024-05-23T02:30:22Z")

</div>

You could try one of these:

- [GitHub - brianhie/geosketch: Geometry-preserving random sampling](https://github.com/brianhie/geosketch)
- [Introduction — apricot 0.6.0 documentation](https://apricot-select.readthedocs.io/en/latest/)
