single-cell-genetics / vireo

Demultiplexing pooled scRNA-seq data with or without genotype reference
https://vireoSNP.readthedocs.io
Apache License 2.0
73 stars 27 forks source link

Vireo misassigns cells to wrong donor. #36

Closed maxozo closed 2 years ago

maxozo commented 2 years ago

Hi, We have been trying to investigate on why running Vireo with a different --randSeed sometimes behaves very differently. Maybe you can help? Particularly we sporadically sometimes get dropout donors and a doubled donors as in the Figs attached. The only difference between these 2 runs is --randSeed (in one case its 1 and in another its set to 12).

Screenshot 2022-01-10 at 09 42 17

From experimental procedures we know that the cell numbers should be about the same for each donor. This experiment was performed in duplicate.

Thank you! Bw, Matiss

huangyh09 commented 2 years ago

Hi Matiss,

Thanks for sharing this. This is indeed a potential issue that the model can only guarantee a local optima solution, and different initialization may return different local optima. By default (with --nInit argument), Vireo will run 50 random initializations (based on the random seed), and usually, it will reach the (near) global optima. However, for some scenarios, e.g., many donors (>10), 50 initializations may not be enough to reach the global optima. For example, in your left panel, the "donor1" seems to be absorbed into "donor2" as a local optimum.

One simple solution is that you run the model with more initializations, e.g., --nInit 200. Then it may give a better chance to find the global optima, in most of your trials (with different random seeds).

Yuanhua

maxozo commented 2 years ago

Hi Yuanhua, Thank you for this. The --nInit 200 does indeed solve the issue. Just posting a screnshot of the default initiasiation on left and 200 on right.

Screenshot 2022-01-21 at 14 38 56
huangyh09 commented 2 years ago

Thanks. This looks nice. I will close the issue here but feel free to re-open (or open a new one) it if you have additional questions.