@@ -303,7 +303,7 @@ def main(
303
303
304
304
# if this is a pval, take the -log10 of it
305
305
if not bic :
306
- tsfm_pval = lambda pval : - np .log10 (pval )
306
+ tsfm_pval = lambda pval : - np .log10 (pval ) if pval != 0 else np . inf
307
307
else :
308
308
tsfm_pval = lambda val : val
309
309
@@ -422,7 +422,7 @@ def main(
422
422
log .debug (f"Found { vals .shape [0 ]} points" )
423
423
424
424
# remove any vals that were NA (but got converted to 0)
425
- # and also any vals that were greater than max-val
425
+ # and also any vals that were greater than max-val (which defaults to inf)
426
426
na_rows = (vals == 0 ).any (axis = 1 ) | (vals >= max_val ).any (axis = 1 )
427
427
not_na_rows_idxs = {k : v [~ na_rows ] for k ,v in axes_idxs .items ()}
428
428
if color is not None :
@@ -551,10 +551,11 @@ def main(
551
551
ax .set_xlabel (case_type + ": " + ax_labs [1 ])
552
552
ax .set_ylabel (case_type + ": " + ax_labs [0 ])
553
553
ax .axline ((0 ,0 ), (max_val , max_val ), linestyle = "--" , color = "orange" )
554
- ax .axline ((0 ,thresh ), (thresh , thresh ), color = "red" )
555
- ax_histx .axline ((thresh ,0 ), (thresh , thresh ), color = "red" )
556
- ax .axline ((thresh ,0 ), (thresh , thresh ), color = "red" )
557
- ax_histy .axline ((0 ,thresh ), (thresh , thresh ), color = "red" )
554
+ if thresh != 0 :
555
+ ax .axline ((0 ,thresh ), (thresh , thresh ), color = "red" )
556
+ ax_histx .axline ((thresh ,0 ), (thresh , thresh ), color = "red" )
557
+ ax .axline ((thresh ,0 ), (thresh , thresh ), color = "red" )
558
+ ax_histy .axline ((0 ,thresh ), (thresh , thresh ), color = "red" )
558
559
ax_histy .spines ['top' ].set_visible (False )
559
560
ax_histx .spines ['top' ].set_visible (False )
560
561
ax_histy .spines ['right' ].set_visible (False )
0 commit comments