Altering scANVI's Graphical Model


I’m trying to apply scANVI to a new dataset that needs to have age and gender be accounted for. My thought was to alter scANVI’s graphical model (Figure 1 in the original paper) by changing the dataset identifier s_n to instead represent a combined age and gender value, and change the capture variation I_n to instead represent this new dataset’s read counts.

However, from following the scANVI pyro tutorial (scANVI: Deep Generative Modeling for Single Cell Data with Pyro — Pyro Tutorials 1.8.0 documentation), this shows a completely different graphical model with z_2, z_1, and an l variable to represent count variation. This l_scale and l_mean values seem to calibrated specifically for the PBMC dataset, and I’m not sure how those values were calculated.

Any advice for how to take into account age, gender, and a different read count basis? Much appreciated.

Hi Rigel,

You might consider following our tutorial here which shows how to alter s_n to correspond to multiple factors.