Confusion matrix of Leiden cell type clustering for the PBMC3K data. On the left, the squares are colored by number of cells. On the right, the same clusters are colored by the ratio of cells in that cluster, from batch 1, with the color intensity lowered if a square contains fewer than 10 cells. If the ratio is high or low, this would indicate that this is an artifact of batch correction as, by experimental design, each cluster should have an equal ratio of cells from batch 1 and batch 2. On the y-axis are the cell types before batch correction and on the x-axis are the cell types after. The best case result here is: (1) only values on the diagonal, where, after correction, cells in a certain cell type cluster remain with the cells they shared a cluster with; and for all ratios on the graph on the right to be 0.5.
