CellAssign speed up

Hello scvi-tools,

many thanks for integrating CellAssign into the scvi unisverse! I got cell ontology terms and marker genes from cell taxonomy (Cell Taxonomy: a curated repository of cell types with multifaceted characterization | Nucleic Acids Research | Oxford Academic) and summarized the CL tags by cell types of interest.

I have 125802 10x cells from patient. My marker gene matrix is 522 genes of 20 cell types. I setup with categorical covariates (patient ID etc.) and use 48 CPU.

My problem is that for max_epoche=10 it takes scvi about 45 min to finish. Am I doing something wrong or is that rather long run time expected? Maybe I missed it but is there a parameter to speed up CellAssign in scvi?

Many thanks for your help!

Best wishes,
Florian

It doesn’t seem unreasonable to me on a CPU. Inference on a GPU would be orders of magnitude faster

1 Like

Hello Adam, many thanks for your input! CellAssign finished after 200 epochs overnight which is absolutely feasible. The results look good, but most cells ~75% are annotated as erythrocytes which might be due to ambient RNA contamination which seems quite common in BM and blood samples. But that’s valuable QC information anyway.

Again, many thanks for implementing so many awesome tools into the SCVI universe!

Best wishes,
Florian