Hashtags in sci-tools

How do I consider hashtags in the Anndata object and my analyses? I have 7 different hashtags that identify 7 different tissues. I want to see these different tissues in my UMAP plots and then do differential analyses.

Here is the AnnData object I have that I created from a Seurat object and then loaded into scvi-tools (anndata.read). how can I be sure that the HTOs are labeled according to the tissue (I can see that they are in a Seurat object).

AnnData object with n_obs × n_vars = 12907 × 32285
obs: ‘orig.ident’, ‘nCount_RNA’, ‘nFeature_RNA’, ‘nCount_ADT’, ‘nFeature_ADT’, ‘nCount_HTO’, ‘nFeature_HTO’, ‘HTO_maxID’, ‘HTO_secondID’, ‘HTO_margin’, ‘HTO_classification’, ‘HTO_classification.global’, ‘hash.ID’, ‘percent.mt’
var: ‘vst.mean’, ‘vst.variance’, ‘vst.variance.expected’, ‘vst.variance.standardized’, ‘vst.variable’
obsm: ‘protein_expression’, ‘hash.ID’
layers: ‘counts’

Thank you

Hi Milcah,

Assuming you’ve run through the standard scvi-tools/totalVI/Scanpy workflow then you should be able to

sc.pl.umap(adata, color="HTO_classification")

However, if you’d just like the joint RNA + protein latent space, the simplest thing to do is to save it as a csv, load it in R and then add it to the seurat object using for example

# latent is a dataframe from scvi-tools
pbmc[['totalvi']] <- CreateDimReducObject(embeddings = latent, key = "totalvi_", assay = DefaultAssay(pbmc))

And then you can just use R.

Regarding differential expression, basic Seurat or Scanpy is a good place to start. If you feel that protein background is challenging the effect sizes, then it would be beneficial to use totalVI DE.