Open suragnair opened 4 years ago
Also would it not be much faster to do this? Note this is slightly different since in your implementation step.size of 3 would compute A^8, whereas here it would compute A^3. On my end it seems to work much faster (few seconds for ~80k cells), and the outputs are the same (as you would expect).
data.use.smooth = A %*% data.use;
if(step.size > 1){
for(i in 1:step.size-1){
data.use.smooth = A %*% data.use.smooth;
}
}
https://github.com/r3fang/SnapATAC/blob/c3ab177558f0fe9c47cbd68969df7b06de5b07d9/R/runMagic.R#L61