@@ -1645,6 +1645,10 @@ def continuous_1d(
1645
1645
init_b : Union [np .ndarray , str ] = "standard" ,
1646
1646
gene_names : Union [np .ndarray , list ] = None ,
1647
1647
sample_description = None ,
1648
+ dmat_loc : Union [patsy .design_info .DesignMatrix , xr .Dataset ] = None ,
1649
+ dmat_scale : Union [patsy .design_info .DesignMatrix , xr .Dataset ] = None ,
1650
+ constraints_loc : np .ndarray = None ,
1651
+ constraints_scale : np .ndarray = None ,
1648
1652
noise_model : str = 'nb' ,
1649
1653
size_factors : np .ndarray = None ,
1650
1654
batch_size : int = None ,
@@ -1717,6 +1721,32 @@ def continuous_1d(
1717
1721
- np.ndarray: direct initialization of 'b'
1718
1722
:param gene_names: optional list/array of gene names which will be used if `data` does not implicitly store these
1719
1723
:param sample_description: optional pandas.DataFrame containing sample annotations
1724
+ :param dmat_loc: Pre-built location model design matrix.
1725
+ This over-rides formula_loc and sample description information given in
1726
+ data or sample_description.
1727
+ :param dmat_scale: Pre-built scale model design matrix.
1728
+ This over-rides formula_scale and sample description information given in
1729
+ data or sample_description.
1730
+ :param constraints_loc: : Constraints for location model.
1731
+ Array with constraints in rows and model parameters in columns.
1732
+ Each constraint contains non-zero entries for the a of parameters that
1733
+ has to sum to zero. This constraint is enforced by binding one parameter
1734
+ to the negative sum of the other parameters, effectively representing that
1735
+ parameter as a function of the other parameters. This dependent
1736
+ parameter is indicated by a -1 in this array, the independent parameters
1737
+ of that constraint (which may be dependent at an earlier constraint)
1738
+ are indicated by a 1. It is highly recommended to only use this option
1739
+ together with prebuilt design matrix for the location model, dmat_loc.
1740
+ :param constraints_scale: : Constraints for scale model.
1741
+ Array with constraints in rows and model parameters in columns.
1742
+ Each constraint contains non-zero entries for the a of parameters that
1743
+ has to sum to zero. This constraint is enforced by binding one parameter
1744
+ to the negative sum of the other parameters, effectively representing that
1745
+ parameter as a function of the other parameters. This dependent
1746
+ parameter is indicated by a -1 in this array, the independent parameters
1747
+ of that constraint (which may be dependent at an earlier constraint)
1748
+ are indicated by a 1. It is highly recommended to only use this option
1749
+ together with prebuilt design matrix for the scale model, dmat_scale.
1720
1750
:param noise_model: str, noise model to use in model-based unit_test. Possible options:
1721
1751
1722
1752
- 'nb': default
@@ -1901,6 +1931,6 @@ def continuous_1d(
1901
1931
spline_coefs = new_coefs
1902
1932
)
1903
1933
else :
1904
- raise ValueError ('base. continuous(): Parameter `test` not recognized.' )
1934
+ raise ValueError ('continuous(): Parameter `test` not recognized.' )
1905
1935
1906
1936
return de_test
0 commit comments