# pertpy

**URL:** https://discourse.scverse.org/c/help/pertpy/46.md

[Latest](https://discourse.scverse.org/latest.md) · [Categories](https://discourse.scverse.org/categories.md) · [Tags](https://discourse.scverse.org/tags.md)

---

## [About the pertpy category](https://discourse.scverse.org/t/about-the-pertpy-category/3635)

<div class="topic-metadata">

**Author:** [@Zethson](https://discourse.scverse.org/u/Zethson)\
**Replies:** 0

</div>

---

## [Running scCODA with confounding covariate](https://discourse.scverse.org/t/running-sccoda-with-confounding-covariate/3961)

<div class="topic-metadata">

**Author:** [@shihsama](https://discourse.scverse.org/u/shihsama)\
**Replies:** 0\
**Last updated:** [April 15, 2026, 6:35am UTC](https://discourse.scverse.org/t/running-sccoda-with-confounding-covariate/3961 "2026-04-15T06:35:09Z")

</div>

Hi! I’m running scCODA on an integrated AnnData object with integrated multiple datasets, and I have a few questions: 1.My main variable of interest is condition (i.e.,adata.obs\["condition"\]). Should I include dataset …

---

## [Obs.perturbation and obs.gene in Replogle dataset](https://discourse.scverse.org/t/obs-perturbation-and-obs-gene-in-replogle-dataset/3933)

<div class="topic-metadata">

**Author:** [@natalia.nutella](https://discourse.scverse.org/u/natalia.nutella)\
**Replies:** 1\
**Last updated:** [February 19, 2026, 3:03pm UTC](https://discourse.scverse.org/t/obs-perturbation-and-obs-gene-in-replogle-dataset/3933 "2026-02-19T15:03:04Z")

</div>

Hi, I fetched the Replogle 2022 K562 essential dataset with pt.data.replogle\_2022\_k562\_essential() and I’m quite confused by the gene and perturbation columns in .obs: # Unique perturbations from PertPy dataset, sorted…

---

## [Can scCODA in pertpy be applied to compositional analysis of annotated spatial transcriptomics spots?](https://discourse.scverse.org/t/can-sccoda-in-pertpy-be-applied-to-compositional-analysis-of-annotated-spatial-transcriptomics-spots/3934)

<div class="topic-metadata">

**Author:** [@shihsama](https://discourse.scverse.org/u/shihsama)\
**Replies:** 1\
**Last updated:** [February 10, 2026, 9:45am UTC](https://discourse.scverse.org/t/can-sccoda-in-pertpy-be-applied-to-compositional-analysis-of-annotated-spatial-transcriptomics-spots/3934 "2026-02-10T09:45:42Z")

</div>

Hi, I have previously used scCODA of pertpy for compositional analysis on single-cell data. However, I am unsure whether the same approach can be applied to annotated spatial transcriptomics spots. specifically, if spa…

---

## [Reference levels Milo pertpy](https://discourse.scverse.org/t/reference-levels-milo-pertpy/3657)

<div class="topic-metadata">

**Author:** [@pakiessling](https://discourse.scverse.org/u/pakiessling)\
**Replies:** 2\
**Last updated:** [May 26, 2025, 12:54pm UTC](https://discourse.scverse.org/t/reference-levels-milo-pertpy/3657 "2025-05-26T12:54:27Z")

</div>

Hi @Zethson , I am struggling a bit with specifying contrasts for Milo in Pertpy. I have a column diagnosis with levels ICM\_AMI, control,DCM,ICM\_AMI I want to do a lot of comparisons so I do this: design = "~ Donor\_S…

---

## [Do multiple pairwise comparison with scCODA of pertpy](https://discourse.scverse.org/t/do-multiple-pairwise-comparison-with-sccoda-of-pertpy/3630)

<div class="topic-metadata">

**Author:** [@shihsama](https://discourse.scverse.org/u/shihsama)\
**Replies:** 3\
**Last updated:** [May 4, 2025, 10:02am UTC](https://discourse.scverse.org/t/do-multiple-pairwise-comparison-with-sccoda-of-pertpy/3630 "2025-05-04T10:02:38Z")

</div>

Hi, I’m using scCODA model to do composition analysis. As shown in tutorial, if we want to try different reference levels, just modify the treatment level in formula arguement. Now, if we got A,B,C and D four levels, an…
