File tree Expand file tree Collapse file tree 3 files changed +20
-6
lines changed Expand file tree Collapse file tree 3 files changed +20
-6
lines changed Original file line number Diff line number Diff line change 8
8
BATCHGLM_OPTIM_NEWTON_TR = False
9
9
BATCHGLM_OPTIM_IRLS = False
10
10
BATCHGLM_OPTIM_IRLS_GD = False
11
- BATCHGLM_OPTIM_IRLS_TR = False
11
+ BATCHGLM_OPTIM_IRLS_TR = True
12
12
BATCHGLM_OPTIM_IRLS_GD_TR = True
13
+
13
14
BATCHGLM_PROVIDE_BATCHED = True
15
+ BATCHGLM_PROVIDE_FIM = True
16
+ BATCHGLM_PROVIDE_HESSIAN = False
Original file line number Diff line number Diff line change @@ -2302,7 +2302,8 @@ def plot_genes(
2302
2302
show = True ,
2303
2303
ncols = 2 ,
2304
2304
row_gap = 0.3 ,
2305
- col_gap = 0.25
2305
+ col_gap = 0.25 ,
2306
+ return_axs = False
2306
2307
):
2307
2308
"""
2308
2309
Plot observed data and spline fits of selected genes.
@@ -2317,6 +2318,7 @@ def plot_genes(
2317
2318
:param ncols: Number of columns in plot grid if multiple genes are plotted.
2318
2319
:param row_gap: Vertical gap between panel rows relative to panel height.
2319
2320
:param col_gap: Horizontal gap between panel columns relative to panel width.
2321
+ :param return_axs: Whether to return axis objects of plots.
2320
2322
:return: Matplotlib axis objects.
2321
2323
"""
2322
2324
@@ -2390,8 +2392,10 @@ def plot_genes(
2390
2392
2391
2393
plt .close (fig )
2392
2394
2393
- return axs
2394
-
2395
+ if return_axs :
2396
+ return axs
2397
+ else :
2398
+ return
2395
2399
2396
2400
def plot_heatmap (
2397
2401
self ,
@@ -2402,7 +2406,8 @@ def plot_heatmap(
2402
2406
nticks = 10 ,
2403
2407
cmap : str = "YlGnBu" ,
2404
2408
width = 10 ,
2405
- height_per_gene = 0.5
2409
+ height_per_gene = 0.5 ,
2410
+ return_axs = False
2406
2411
):
2407
2412
"""
2408
2413
Plot observed data and spline fits of selected genes.
@@ -2416,6 +2421,7 @@ def plot_heatmap(
2416
2421
:param cmap: matplotlib cmap.
2417
2422
:param width: Width of heatmap figure.
2418
2423
:param height_per_gene: Height of each row (gene) in heatmap figure.
2424
+ :param return_axs: Whether to return axis objects of plots.
2419
2425
:return: Matplotlib axis objects.
2420
2426
"""
2421
2427
import seaborn as sns
@@ -2480,7 +2486,10 @@ def plot_heatmap(
2480
2486
2481
2487
plt .close (fig )
2482
2488
2483
- return ax
2489
+ if return_axs :
2490
+ return axs
2491
+ else :
2492
+ return
2484
2493
2485
2494
2486
2495
class DifferentialExpressionTestWaldCont (_DifferentialExpressionTestCont ):
Original file line number Diff line number Diff line change @@ -170,6 +170,8 @@ def _fit(
170
170
init_b = init_b ,
171
171
provide_optimizers = provide_optimizers ,
172
172
provide_batched = pkg_constants .BATCHGLM_PROVIDE_BATCHED ,
173
+ provide_fim = pkg_constants .BATCHGLM_PROVIDE_FIM ,
174
+ provide_hessian = pkg_constants .BATCHGLM_PROVIDE_HESSIAN ,
173
175
dtype = dtype ,
174
176
** constructor_args
175
177
)
You can’t perform that action at this time.
0 commit comments