I’ve been reviewing the latest changes in SCANVI. I noted the removal of pretraining scvi and that the option to do pretraining was moved to the from_scvi_model() method.
Could you elaborate on whether it is still best practice to pretrain with scvi, or whether just using scanvi on its own is better?
It is still best practice to pretrain a SCVI model and then instantiate SCANVI with the from_scvi_model class method. We moved this around for API reasons.
@grst either way will work, setup anndata just creates a dictionary in adata.uns["_scvi"] and the labels won’t do anything to SCVI. This will be more explicit in a future release.
I have a similar question. If I have a scvi model trained with one labels_key, but then later want to use this scvi model to create a scanvi model but predicting a different set of labels (a new labels_key) - is this possible? Can I replace the original labels_key?
In this case, it’s better not to provide the labels key to scvi, as the only thing this enables is gene-label specific dispersion parameters.
If you do provide the labels_key, what you want will not be possible; however, if you only provide the labels at the time of scanvi initialization it is possible