kharchenkolab / cacoa

Single-cell Case Control Analysis
46 stars 7 forks source link

estimateExpressionShiftMagnitudes uses all available cores #10

Closed rrydbirk closed 3 years ago

rrydbirk commented 4 years ago

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.

VPetukhov commented 3 years ago

Was solved in Pagoda, jsDist is single-thread now