scvi-tutorials
scvi-tutorials copied to clipboard
reference mapping
i am following https://docs.scvi-tools.org/en/stable/tutorials/notebooks/scrna/scarches_scvi_tools.html#reference-mapping-with-scanvi
import os import tempfile import anndata import matplotlib.pyplot as plt import numpy as np import pandas as pd import scanpy as sc import scrublet as scr import scvi import seaborn as sns import torch
scvi_model = SCVI(adata, **arches_params) Traceback (most recent call last): File "
", line 1, in NameError: name 'SCVI' is not defined
Oh, I think we have a typo in that code block. It should be:
scvi_model = scvi.model.SCVI(adata, **arches_params)
Thanks for bringing this up!
thank you for the fast response. i want to ask another question regarding the same vignette. why we trained the model without normalizing, logP or scaling the the reference ?
Hi, this is because scVI and scANVI expect the input to be raw counts. This is necessary because the generative portions of the models use distributions that only support non-negative integers (Poisson and negative binomial).
there is currently a bug in https://docs.scvi-tools.org/en/stable/tutorials/notebooks/scrna/scarches_scvi_tools.html#reference-mapping-with-scanvi for v1.1.x that will be solved in v1.2.x
see https://github.com/scverse/scvi-tools/issues/2934