scvi-tutorials icon indicating copy to clipboard operation
scvi-tutorials copied to clipboard

reference mapping

Open Sirin24 opened this issue 11 months ago • 3 comments

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

Sirin24 avatar Mar 20 '24 01:03 Sirin24

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!

martinkim0 avatar Mar 20 '24 03:03 martinkim0

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 ?

Sirin24 avatar Mar 20 '24 09:03 Sirin24

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).

martinkim0 avatar Mar 20 '24 16:03 martinkim0

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

ori-kron-wis avatar Aug 27 '24 20:08 ori-kron-wis