# \#diff-exp

**URL:** https://discourse.scverse.org/tag/diff-exp/8.md

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

---

## [Getting normalized expression](https://discourse.scverse.org/t/getting-normalized-expression/3976)

<div class="topic-metadata">

**Author:** [@Kray](https://discourse.scverse.org/u/Kray)\
**Replies:** 13\
**Last updated:** [May 13, 2026, 9:54am UTC](https://discourse.scverse.org/t/getting-normalized-expression/3976 "2026-05-13T09:54:49Z")

</div>

Hi, I am working on a big sized scRNAseq atlas with 2 million cells. I want to get the normalized expression. However, since it returns a data frame/numpy array, I run out of memory every time I am trying to retrieve th…

---

## [Interpretting differential gene expression dotplot](https://discourse.scverse.org/t/interpretting-differential-gene-expression-dotplot/3923)

<div class="topic-metadata">

**Author:** [@smartinez](https://discourse.scverse.org/u/smartinez)\
**Replies:** 0\
**Last updated:** [January 23, 2026, 5:17pm UTC](https://discourse.scverse.org/t/interpretting-differential-gene-expression-dotplot/3923 "2026-01-23T17:17:10Z")

</div>

I am going through scanpy tutorials for the first time and don’t understand how to interpret parts of the differential gene expression dotplot of logfoldchange from their plotting tutorial (I did not generate this, it’s …

---

## [Question about complex experiment](https://discourse.scverse.org/t/question-about-complex-experiment/3864)

<div class="topic-metadata">

**Author:** [@dackjames](https://discourse.scverse.org/u/dackjames)\
**Replies:** 1\
**Last updated:** [November 25, 2025, 7:39pm UTC](https://discourse.scverse.org/t/question-about-complex-experiment/3864 "2025-11-25T19:39:01Z")

</div>

Hi everyone, I’m starting a fairly complex experiment that includes 10x single-cell, single-nucleus, and 10x multiome (snRNA-seq + scATAC-seq from the same nucleus), with control and treatment groups spread across all t…

---

## [Problems with Bayes factors and LFC changes using model.differential\_expression()](https://discourse.scverse.org/t/problems-with-bayes-factors-and-lfc-changes-using-model-differential-expression/3604)

<div class="topic-metadata">

**Author:** [@joseph-siefert](https://discourse.scverse.org/u/joseph-siefert)\
**Replies:** 8\
**Last updated:** [July 9, 2025, 12:36pm UTC](https://discourse.scverse.org/t/problems-with-bayes-factors-and-lfc-changes-using-model-differential-expression/3604 "2025-07-09T12:36:31Z")

</div>

Has something changed for the differential expression in the most recent version of scvi-tools? Previously, plots of bayes\_factor vs. lfc\_median were very similar to plots of prob\_de vs. lfc\_median. prob\_de plots still l…

---

## [Wrong log-fold change estimation?](https://discourse.scverse.org/t/wrong-log-fold-change-estimation/3696)

<div class="topic-metadata">

**Author:** [@Christos](https://discourse.scverse.org/u/Christos)\
**Replies:** 3\
**Last updated:** [July 9, 2025, 12:44pm UTC](https://discourse.scverse.org/t/wrong-log-fold-change-estimation/3696 "2025-07-09T12:44:09Z")

</div>

Hello, after using model.differential\_expression(), for a specific gene of interest I get the following outcome: proba\_de 0.9724 proba\_not\_de …

---

## [In which direction is the LCF calculated when using the function differential\_expression?](https://discourse.scverse.org/t/in-which-direction-is-the-lcf-calculated-when-using-the-function-differential-expression/3514)

<div class="topic-metadata">

**Author:** [@ashenflower](https://discourse.scverse.org/u/ashenflower)\
**Replies:** 1\
**Last updated:** [March 2, 2025, 2:52pm UTC](https://discourse.scverse.org/t/in-which-direction-is-the-lcf-calculated-when-using-the-function-differential-expression/3514 "2025-03-02T14:52:14Z")

</div>

I am sorry if this sounds like a stupid question, but I looked around and I could not find a proper answer. Given idx1, idx2 as parameters to my my model.differential\_expression, if I find that for a given gene the LFC …

---

## [Scvi-tools: different DEGs when comparing same data](https://discourse.scverse.org/t/scvi-tools-different-degs-when-comparing-same-data/3350)

<div class="topic-metadata">

**Author:** [@ashenflower](https://discourse.scverse.org/u/ashenflower)\
**Replies:** 2\
**Last updated:** [November 19, 2024, 4:26pm UTC](https://discourse.scverse.org/t/scvi-tools-different-degs-when-comparing-same-data/3350 "2024-11-19T16:26:32Z")

</div>

Hello everybody, I am new to single cells and differential analysis, so I am sorry if this question may sound stupid. However, I used scvi-tools to perform a differential expression analysis on the same cluster but acro…

---

## [scVI integration set batch\_key and poor Umap result](https://discourse.scverse.org/t/scvi-integration-set-batch-key-and-poor-umap-result/2435)

<div class="topic-metadata">

**Author:** [@holjol](https://discourse.scverse.org/u/holjol)\
**Replies:** 3\
**Last updated:** [August 7, 2024, 6:25pm UTC](https://discourse.scverse.org/t/scvi-integration-set-batch-key-and-poor-umap-result/2435 "2024-08-07T18:25:58Z")

</div>

I have a large dataset downloaded from GEO with inherent structural complexities. When integrating data using the scVI model for batch effect correction and conducting DEG analysis on Cancer vs. Normal samples, I need gu…

---

## [Question about differential expression and the batch\_correction usage](https://discourse.scverse.org/t/question-about-differential-expression-and-the-batch-correction-usage/2323)

<div class="topic-metadata">

**Author:** [@scuser](https://discourse.scverse.org/u/scuser)\
**Replies:** 0\
**Last updated:** [June 7, 2024, 3:17pm UTC](https://discourse.scverse.org/t/question-about-differential-expression-and-the-batch-correction-usage/2323 "2024-06-07T15:17:06Z")

</div>

Hello, Say I train a model using categorical covariates to correct for donors/biological replicates, but the scRNA experiment was run in one “batch” (that is, on one flow cell/sequencing run) with a treated and untreate…

---

## [Best way to rank genes for GSEA analysis](https://discourse.scverse.org/t/best-way-to-rank-genes-for-gsea-analysis/1043)

<div class="topic-metadata">

**Author:** [@munta](https://discourse.scverse.org/u/munta)\
**Replies:** 3\
**Last updated:** [June 5, 2024, 10:01pm UTC](https://discourse.scverse.org/t/best-way-to-rank-genes-for-gsea-analysis/1043 "2024-06-05T22:01:32Z")

</div>

Hi there, Thanks for the tool. I have used scvi differential expression to get DE genes. Now, I want to proceed to do GSEA analysis (with another tool) so I have to rank the genes for that. Generally, I use sign(lfc)\*pv…

---

## [Inquiry about Data Input and DE Analysis Details in scVI](https://discourse.scverse.org/t/inquiry-about-data-input-and-de-analysis-details-in-scvi/2244)

<div class="topic-metadata">

**Author:** [@qweasdf1354](https://discourse.scverse.org/u/qweasdf1354)\
**Replies:** 4\
**Last updated:** [May 3, 2024, 8:38pm UTC](https://discourse.scverse.org/t/inquiry-about-data-input-and-de-analysis-details-in-scvi/2244 "2024-05-03T20:38:40Z")

</div>

Dear SCVI team, I hope this message finds you well. I am currently utilizing scVI for my research and have some questions regarding the data input and analysis process, particularly concerning differential expression (D…

---

## [Differential expression genes: test to use?](https://discourse.scverse.org/t/differential-expression-genes-test-to-use/2190)

<div class="topic-metadata">

**Author:** [@pmarzano97](https://discourse.scverse.org/u/pmarzano97)\
**Replies:** 0\
**Last updated:** [April 2, 2024, 7:19am UTC](https://discourse.scverse.org/t/differential-expression-genes-test-to-use/2190 "2024-04-02T07:19:30Z")

</div>

Hello! I have a question on the computation of differential expression genes with the scanpy function scanpy.tl.rank\_genes\_groups(). There is a way to understand which is the correct statistical test to use when comput…

---

## [Mismatch between MAST DE results and dotplot](https://discourse.scverse.org/t/mismatch-between-mast-de-results-and-dotplot/1989)

<div class="topic-metadata">

**Author:** [@Simon](https://discourse.scverse.org/u/Simon)\
**Replies:** 0\
**Last updated:** [January 9, 2024, 10:21am UTC](https://discourse.scverse.org/t/mismatch-between-mast-de-results-and-dotplot/1989 "2024-01-09T10:21:56Z")

</div>

Dear community, I found that a gene that has only a small fold-change between two conditions based on MAST, conversely appears to have a large difference if plotted in a dotplot: MAST results: gene log2FC pct.1 …

---

## [Different DEG results after loading .h5ad](https://discourse.scverse.org/t/different-deg-results-after-loading-h5ad/1699)

<div class="topic-metadata">

**Author:** [@Andrea\_C](https://discourse.scverse.org/u/Andrea_C)\
**Replies:** 0\
**Last updated:** [August 19, 2023, 4:39pm UTC](https://discourse.scverse.org/t/different-deg-results-after-loading-h5ad/1699 "2023-08-19T16:39:40Z")

</div>

Hi to everyone and thank you in advance for any help. I’m relatively new to bioinformatic and I’m focusing to learn scRNA analysis. I have some problems of DEG results’ inconsistency after loading a saved .h5ad file. The…

---

## [How to use lvm-DE](https://discourse.scverse.org/t/how-to-use-lvm-de/1481)

<div class="topic-metadata">

**Author:** [@romainL](https://discourse.scverse.org/u/romainL)\
**Replies:** 3\
**Last updated:** [June 2, 2023, 2:00pm UTC](https://discourse.scverse.org/t/how-to-use-lvm-de/1481 "2023-06-02T14:00:32Z")

</div>

Hi, I would like to give a try to lvm-DE for my analyses. But unfortunately, I couldn’t find documentation neither a function. Any advice would be appreciated! Best, Romain

---

## [DE analysis with model.SCVI: which lfc indicates gene up-/down-regulation?](https://discourse.scverse.org/t/de-analysis-with-model-scvi-which-lfc-indicates-gene-up-down-regulation/729)

<div class="topic-metadata">

**Author:** [@Sam](https://discourse.scverse.org/u/Sam)\
**Replies:** 2\
**Last updated:** [September 15, 2022, 3:27pm UTC](https://discourse.scverse.org/t/de-analysis-with-model-scvi-which-lfc-indicates-gene-up-down-regulation/729 "2022-09-15T15:27:05Z")

</div>

Hello! Thank you for the wonderful scVI-tools! I am new to scRNA-seq data analysis. Briefly, I used scanpy to concatenate four samples (two replicates from two conditions each, all 10X datasets), performed preprocessing…

---

## [About model.differential analysis](https://discourse.scverse.org/t/about-model-differential-analysis/1264)

<div class="topic-metadata">

**Author:** [@bathe](https://discourse.scverse.org/u/bathe)\
**Replies:** 0\
**Last updated:** [March 26, 2023, 3:20pm UTC](https://discourse.scverse.org/t/about-model-differential-analysis/1264 "2023-03-26T15:20:31Z")

</div>

How do I do if I want to find out differential expressed genes between groups for each cell type. Btw, Im still a bit confused about the difference between the “group” and the “idx” parameter. Thanks for ur help!

---

## [DE analysis between two batch-specific clusters](https://discourse.scverse.org/t/de-analysis-between-two-batch-specific-clusters/393)

<div class="topic-metadata">

**Author:** [@JoshL](https://discourse.scverse.org/u/JoshL)\
**Replies:** 9\
**Last updated:** [March 24, 2023, 1:14am UTC](https://discourse.scverse.org/t/de-analysis-between-two-batch-specific-clusters/393 "2023-03-24T01:14:27Z")

</div>

Hi team, Thank you so much for the wonderful tool. I have a question about performing DE analysis. I have two datasets, each from a different batch. I have performed integration using scVI with the batch specified in t…

---

## [3 sets of CITE-Seq data, how to concatenate or make single file for further analysis?](https://discourse.scverse.org/t/3-sets-of-cite-seq-data-how-to-concatenate-or-make-single-file-for-further-analysis/1116)

<div class="topic-metadata">

**Author:** [@mdbabumiamssm](https://discourse.scverse.org/u/mdbabumiamssm)\
**Replies:** 0\
**Last updated:** [February 7, 2023, 10:17pm UTC](https://discourse.scverse.org/t/3-sets-of-cite-seq-data-how-to-concatenate-or-make-single-file-for-further-analysis/1116 "2023-02-07T22:17:02Z")

</div>

Hi everyone , I have 3 sets of similar CITE-Seq data, i performed pre-processing individually using Muon+scanpy. Now, I want to make them as single file and perform comparative analysis. Any help ? Thanks in advance. …

---

## ["Vanilla" vs "Change" Mode in Differential Expression](https://discourse.scverse.org/t/vanilla-vs-change-mode-in-differential-expression/1053)

<div class="topic-metadata">

**Author:** [@danamcc](https://discourse.scverse.org/u/danamcc)\
**Replies:** 2\
**Last updated:** [January 17, 2023, 11:09pm UTC](https://discourse.scverse.org/t/vanilla-vs-change-mode-in-differential-expression/1053 "2023-01-17T23:09:51Z")

</div>

Hi, I’m struggling to understand the differences between “vanilla” and “change” mode for differential expression. Are there certain types of datasets where it would be better to use one over the other? I am looking for …

---

## [DE between conditions in a cluster](https://discourse.scverse.org/t/de-between-conditions-in-a-cluster/995)

<div class="topic-metadata">

**Author:** [@f6v](https://discourse.scverse.org/u/f6v)\
**Replies:** 4\
**Last updated:** [December 14, 2022, 3:09pm UTC](https://discourse.scverse.org/t/de-between-conditions-in-a-cluster/995 "2022-12-14T15:09:03Z")

</div>

I have a dataset where cells from multiple conditions can be present in a given cluster, e.g. old and young donors. I want to run a DE analysis between age groups in, say, T cells. I was thinking to create a new metadata…

---

## [Marker gene selection: rank\_marker\_genes vs diffxpy](https://discourse.scverse.org/t/marker-gene-selection-rank-marker-genes-vs-diffxpy/935)

<div class="topic-metadata">

**Author:** [@auesro](https://discourse.scverse.org/u/auesro)\
**Replies:** 0\
**Last updated:** [November 17, 2022, 5:20pm UTC](https://discourse.scverse.org/t/marker-gene-selection-rank-marker-genes-vs-diffxpy/935 "2022-11-17T17:20:27Z")

</div>

Dear community, I have a snRNAseq dataset of 4 samples and 2 conditions (2 samples per condition). The experimental samples differ from the control ones in that some cell types have lower numbers due to an specific gene…

---

## [How experminetal is the experimental API?](https://discourse.scverse.org/t/how-experminetal-is-the-experimental-api/809)

<div class="topic-metadata">

**Author:** [@vmontalb](https://discourse.scverse.org/u/vmontalb)\
**Replies:** 0\
**Last updated:** [October 7, 2022, 1:49pm UTC](https://discourse.scverse.org/t/how-experminetal-is-the-experimental-api/809 "2022-10-07T13:49:30Z")

</div>

Hi! I have been using scanpy for a while, and its just… awesome! thanks! I have recently downlaoded a new dataset, and before re-running the same preproc recipe I was sing so far, I double-check for new/updated options…

---

## [Scvi-tools in DE benchmarking papers?](https://discourse.scverse.org/t/scvi-tools-in-de-benchmarking-papers/484)

<div class="topic-metadata">

**Author:** [@ivirshup](https://discourse.scverse.org/u/ivirshup)\
**Replies:** 2\
**Last updated:** [May 27, 2022, 8:30am UTC](https://discourse.scverse.org/t/scvi-tools-in-de-benchmarking-papers/484 "2022-05-27T08:30:33Z")

</div>

Quick (probably) question about scvi-tools. Has scvi-tools DE been included in any differential expression benchmarking papers? Would love some recommendations to look at here.

---

## [Differentially expressed genes between two Leiden clusters](https://discourse.scverse.org/t/differentially-expressed-genes-between-two-leiden-clusters/193)

<div class="topic-metadata">

**Author:** [@taopeng1100](https://discourse.scverse.org/u/taopeng1100)\
**Replies:** 8\
**Last updated:** [October 15, 2021, 6:11pm UTC](https://discourse.scverse.org/t/differentially-expressed-genes-between-two-leiden-clusters/193 "2021-10-15T18:11:11Z")

</div>

Hi I wonder how I can perform a test of differentially expressed genes between two Leiden clusters in scvi totalVI. I can do this in Scanpy using rank\_genes\_groups. Thanks!

---

## [Differential expression between datasets](https://discourse.scverse.org/t/differential-expression-between-datasets/85)

<div class="topic-metadata">

**Author:** [@grst](https://discourse.scverse.org/u/grst)\
**Replies:** 4\
**Last updated:** [May 20, 2021, 7:25am UTC](https://discourse.scverse.org/t/differential-expression-between-datasets/85 "2021-05-20T07:25:37Z")

</div>

Hi all, I was wondering if scVI’s differential expression module still works in the following case: I integrated two datasets with scANVI: dataset1: healthy lung tissue, mixture of immune, stromal, endothelial and ep…

---

## [Differential Gene Expression](https://discourse.scverse.org/t/differential-gene-expression/51)

<div class="topic-metadata">

**Author:** [@sim](https://discourse.scverse.org/u/sim)\
**Replies:** 2\
**Last updated:** [March 20, 2021, 12:11am UTC](https://discourse.scverse.org/t/differential-gene-expression/51 "2021-03-20T00:11:41Z")

</div>

Hi all, great tool. Use it and love it. I wanted to use the differential gene expression module. The data set I am using is already processed (accounted for batch variables, neighborhoods and UMAP, Leiden calculated). …
