# Batch-Specific Training for Doublet Removal

**URL:** https://discourse.scverse.org/t/batch-specific-training-for-doublet-removal/795
**Category:** Help
**Tags:** scvi, solo
**Created:** [October 4, 2022, 9:03pm UTC](https://discourse.scverse.org/t/batch-specific-training-for-doublet-removal/795 "2022-10-04T21:03:34Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![danamcc](https://avatars.discourse-cdn.com/v4/letter/d/71c47a/32.png) [@danamcc](https://discourse.scverse.org/u/danamcc)
#### Post date: [October 4, 2022, 9:03pm UTC](https://discourse.scverse.org/t/batch-specific-training-for-doublet-removal/795/1 "2022-10-04T21:03:34Z")

</div>

Hi all,

I’m working on an scRNAseq project and I’m trying to investigate different packages to remove doublets in python. My initial dataset has 6 batches that are all for the same region of tissue.

As I understand it, I need to first convert my AnnData object to a scvi model, train the scvi model, convert the scvi model to a solo model per batch, and then train each solo model to get predictions for doublets.

Before I try to run scvi & solo on large quantities, I wanted to confirm that the scvi.model.scvi.setup\_anndata function was designed for multiple batches with the batch\_key argument, but that the scvi.external.SOLO.from\_scvi\_model function was intended to be run on one batch at a time using the same scvi model to start. Also, any explanation as to why it works (or doesn’t) work this way would be helpful.

Thanks!
