I are interested in looking code behind the differential_expression() function, in particular the lvm-DE method. From an issue in scVI-tools Github, it seems as though the lvm-DE method is now a part of the general differential_expression() function in ‘scVI-tools’ (when using weights=“importance”).
Exploring scVI-tools, it seems like the differential_expression() function code is tied to _de_core.py and _differential.py (same folder as _de_core.py; can’t add a third link). However, I can’t find the “weights” flag in either script (or a conditional looking for the word “importance”), which makes me think I’m looking in the wrong spot.
Hi, lvmDE is active when using mode=‘change’ (the default), while the old method requires mode=‘vanilla’. Weights=‘importance’ changes the manner samples are taken in get_normalized_expression.
Thanks for your reply. I had a hard time understanding what combination of settings constituted the lvm-DE method. The guide really didn’t go over that.
Can you help me understand where “differential_expression()” and “get_normalized_expression()” interact? Adding “weights=importance” to “differential_expression” clearly makes a big impact on the results, but I can’t seem to figure out how adding the “weights” flag to the former function calls the latter.