Independent of the number of n.cores, all available cores are used.
It should be this snippet causing the problem since running with dist="cor" only uses the allowed cores:
if(dist=='JS') {
tcm <- t(tcm/pmax(1,rowSums(tcm)))
tcd <- pagoda2:::jsDist(tcm, ncores = 1); # Here
dimnames(tcd) <- list(colnames(tcm),colnames(tcm));
}
As you can see, I've tried to force ncores=1 for the call (which is within sccore:::plapply call with n.cores = n.cores), but this doesn't have an effect.
Independent of the number of n.cores, all available cores are used.
It should be this snippet causing the problem since running with dist="cor" only uses the allowed cores: if(dist=='JS') { tcm <- t(tcm/pmax(1,rowSums(tcm))) tcd <- pagoda2:::jsDist(tcm, ncores = 1); # Here dimnames(tcd) <- list(colnames(tcm),colnames(tcm)); }
As you can see, I've tried to force ncores=1 for the call (which is within sccore:::plapply call with n.cores = n.cores), but this doesn't have an effect.
So it seems like the problem lies within P2.