scarches
scarches copied to clipboard
Error when creating SCANVI model with tutorial
I'm trying to reproduce the semi-supervised pipeline in here [https://scarches.readthedocs.io/en/latest/scanvi_surgery_pipeline.html], but the pipeline is failing when trying to build the model using the reference dataset:
sca.models.SCANVI.setup_anndata(source_adata, batch_key=condition_key, labels_key=cell_type_key) Traceback (most recent call last): File "
", line 1, in TypeError: setup_anndata() missing 1 required positional argument: 'unlabeled_category'
I'm using python 3.9.13, packaged by conda-forge. I tried installing other versions of python and installing scarches both with PyPI and Development, but the error persists. Not sure if I'm doing something wrong. Could you please help me understand this error?
Hi, @paupuigdevall i will check and let you know, probably we need to update the tutorials for new scanvi versions.
Dear authors,
just another question related with the Semi-supervised surgery pipeline with SCANVI tutorial. The setup is with SCANVI but SCVI model is used. This throws an error to me:
vae = sca.models.SCVI(
source_adata,
n_layers=2,
encode_covariates=True,
deeply_inject_covariates=False,
use_layer_norm="both",
use_batch_norm="none",
)
ValueError: Please set up your AnnData with SCVI.setup_anndata first. It appears the AnnData object has been setup with a different model.
If I build the model with sca.models.SCANVI this error disappears. But downstream code does not work
scanvae = sca.models.SCANVI.from_scvi_model(vae, "Unknown")
TypeError: setup_anndata() got multiple values for keyword argument 'unlabeled_category'
Is this correct?
Thanks for your help and congrats on this work. Juan L.
@Koncopd
In the notebook we have specified the version of scvi-tools used to run it, please try with this version. https://github.com/theislab/scarches/blob/master/notebooks/scanvi_surgery_pipeline.ipynb Feel free to reopen it still doesn't work.