Calculate kBET type scores
rs_kbet.RdThe function takes in a kNN matrix and a batch vector indicating which cell belongs to which batch. The function will check for the neighbourhood of each cell if the proportion of represented batches are different from the overall batch proportions. Good mixing of batches would mean very cells have significant differences; bad mixing a lot of the batches have bad mixing.