MarioniLab / MNN2017

Code for the MNN manuscript figures
51 stars 19 forks source link

Calculate matrix for projection in simulation #13

Open ddiez opened 5 years ago

ddiez commented 5 years ago

In the following line in simulateBatches.R:

https://github.com/MarioniLab/MNN2017/blob/08bc2f5fc196be197be47cb56b3e85eedae87acf/Simulations/simulateBatches.R#L40

should not that line be instead:

proj <- matrix(rnorm(ngenes*2), nrow=ngenes, ncol=2)

That is, although ngenes * ncells values are obtained with rnorm() only ngenes * 2 are really used in the proj matrix.

LTLA commented 5 years ago

Yes, you're right, but it doesn't matter as matrix will just truncate when filling itself. The corresponding code in https://github.com/MarioniLab/FurtherMNN2018 should be more correct.