scverse / scvi-tutorials

Notebooks used in scvi-tools tutorials
https://docs.scvi-tools.org/en/stable/tutorials/index.html
BSD 3-Clause "New" or "Revised" License
44 stars 24 forks source link

reference mapping #272

Closed Sirin24 closed 3 weeks ago

Sirin24 commented 6 months ago

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

martinkim0 commented 6 months ago

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!

Sirin24 commented 6 months ago

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 ?

martinkim0 commented 6 months ago

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

ori-kron-wis commented 3 weeks ago

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