File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -249,7 +249,11 @@ def GeneRankingAnalysis(sample):
249249 TimeStamp (sec_elapsed ,'aRRA Computation' )
250250 # Permutation
251251 start = time .time ()
252- print ('Estimating aRRA null distribution (' + str (Np )+ ' Permutations)...' )
252+ print ('Estimating aRRA null distribution (' + str (Np )+ ' permutations)...' )
253+ if L < Np * r :
254+ print ('WARNING: Library too small for ' + str (Np )+ ' permutations!' )
255+ Np = int (numpy .floor (L / r ))
256+ print ('Auto-correcting permutation number to ' + str (Np )+ ' ...' )
253257 I_perm = numpy .random .choice (L ,size = (Np ,r ),replace = False )
254258 metric_null = Parallel (n_jobs = num_cores )(delayed (compute_aRRA_nullx )(I ) for I in I_perm )
255259 end = time .time ()
@@ -284,7 +288,7 @@ def GeneRankingAnalysis(sample):
284288 os .chdir (ListDir )
285289 SortFlag = False
286290 # Running null distribution
287- print ('Estimating STARS null distribution (' + str (Np )+ ' Permutations )...' )
291+ print ('Estimating STARS null distribution (' + str (Np )+ ' permutations )...' )
288292 STARS_input = open ('STARS_input.txt' ,'w' )
289293 STARS_input .write ('sgID\t counts\n ' )
290294 STARS_chip = open ('STARS_chip.txt' ,'w' )
You can’t perform that action at this time.
0 commit comments