Scaling after mnn_correct

For some reason, after I do the mnn_correct, and then:

sc.pp.scale(bdata)
sc.pp.neighbors(bdata)
sc.tl.umap(bdata)
sc.pl.umap(bdata, color = ‘Batch’)

it will un-batch correct the data for some reason. I figured out that I shouldn’t scale it, and will leave it batch corrected … any idea why this occurs?

I don’t think this is correct, I think one should:

sc.tl.pca(bdata, svd_solver = ‘arpack’, use_highly_variable = False)
sc.pl.pca(bdata, components = [‘1,2’,‘3,4’,‘5,6’,‘7,8’], ncols = 2,
color = ‘Condition’, save = “Corrected_pca_condition.pdf”)
sc.pl.pca_variance_ratio(bdata, save = ‘_elbow.pdf’)

directly after receiving object fromm mnn_correct, as in : https://nbisweden.github.io/workshop-scRNAseq/labs/compiled/scanpy/scanpy_03_integration.html