scverse / scvi-tools

Deep probabilistic analysis of single-cell and spatial omics data
http://scvi-tools.org/
BSD 3-Clause "New" or "Revised" License
1.25k stars 353 forks source link

use_observed_lib_size in LDVAE #2493

Closed psl-schaefer closed 9 months ago

psl-schaefer commented 9 months ago

Why is use_observed_lib_size=False hardcoded into the LDVAE class? I.e. when specifying use_observed_lib_size=True in scvi.model.LinearSCVI(...) this leads to TypeError: __init__() got multiple values for keyword argument 'use_observed_lib_size'

Whereas for the VAE class (standard SCVI model) the default is use_observed_lib_size=True.

See https://github.com/scverse/scvi-tools/blob/b1e2aab74a60661ced5aad00dc99a7136cc4e759/scvi/module/_vae.py#L703

martinkim0 commented 9 months ago

I'm not sure actually - I think the original manuscript specifies that it learns a latent library size, and thus it was hardcoded to have that default. However, in principle I don't see an issue with making this adjustable by the user. I'll go ahead and add the changes!