diff --git a/diffxpy/fit/fit.py b/diffxpy/fit/fit.py index 3e1b9e5..f8c8aa0 100644 --- a/diffxpy/fit/fit.py +++ b/diffxpy/fit/fit.py @@ -80,9 +80,10 @@ def model( :param constraints_loc: Constraints for location model. Can be one of the following: - np.ndarray: - Array with constraints in rows and model parameters in columns. - Each constraint contains non-zero entries for the a of parameters that - has to sum to zero. This constraint is enforced by binding one parameter + Array with constraints in columns and model parameters in rows. + Each constraint contains non-zero entries for the constrained parameters that + have to sum to zero. For a non-constrained parameter the revelant constraint column + contains 1 in the parameter row. This constraint is enforced by binding one parameter to the negative sum of the other parameters, effectively representing that parameter as a function of the other parameters. This dependent parameter is indicated by a -1 in this array, the independent parameters @@ -113,9 +114,10 @@ def model( :param constraints_scale: Constraints for scale model. Can be one of the following: - np.ndarray: - Array with constraints in rows and model parameters in columns. - Each constraint contains non-zero entries for the a of parameters that - has to sum to zero. This constraint is enforced by binding one parameter + Array with constraints in columns and model parameters in rows. + Each constraint contains non-zero entries for the constrained parameters that + have to sum to zero. For a non-constrained parameter the revelant constraint column + contains 1 in the parameter row. This constraint is enforced by binding one parameter to the negative sum of the other parameters, effectively representing that parameter as a function of the other parameters. This dependent parameter is indicated by a -1 in this array, the independent parameters @@ -289,9 +291,10 @@ def residuals( :param constraints_loc: Constraints for location model. Can be one of the following: - np.ndarray: - Array with constraints in rows and model parameters in columns. - Each constraint contains non-zero entries for the a of parameters that - has to sum to zero. This constraint is enforced by binding one parameter + Array with constraints in columns and model parameters in rows. + Each constraint contains non-zero entries for the constrained parameters that + have to sum to zero. For a non-constrained parameter the revelant constraint column + contains 1 in the parameter row. This constraint is enforced by binding one parameter to the negative sum of the other parameters, effectively representing that parameter as a function of the other parameters. This dependent parameter is indicated by a -1 in this array, the independent parameters @@ -322,9 +325,10 @@ def residuals( :param constraints_scale: Constraints for scale model. Can be one of the following: - np.ndarray: - Array with constraints in rows and model parameters in columns. - Each constraint contains non-zero entries for the a of parameters that - has to sum to zero. This constraint is enforced by binding one parameter + Array with constraints in columns and model parameters in rows. + Each constraint contains non-zero entries for the constrained parameters that + have to sum to zero. For a non-constrained parameter the revelant constraint column + contains 1 in the parameter row. This constraint is enforced by binding one parameter to the negative sum of the other parameters, effectively representing that parameter as a function of the other parameters. This dependent parameter is indicated by a -1 in this array, the independent parameters @@ -548,9 +552,10 @@ def model( :param constraints_loc: Constraints for location model. Can be one of the following: - np.ndarray: - Array with constraints in rows and model parameters in columns. - Each constraint contains non-zero entries for the a of parameters that - has to sum to zero. This constraint is enforced by binding one parameter + Array with constraints in columns and model parameters in rows. + Each constraint contains non-zero entries for the constrained parameters that + have to sum to zero. For a non-constrained parameter the revelant constraint column + contains 1 in the parameter row. This constraint is enforced by binding one parameter to the negative sum of the other parameters, effectively representing that parameter as a function of the other parameters. This dependent parameter is indicated by a -1 in this array, the independent parameters @@ -581,9 +586,10 @@ def model( :param constraints_scale: Constraints for scale model. Can be one of the following: - np.ndarray: - Array with constraints in rows and model parameters in columns. - Each constraint contains non-zero entries for the a of parameters that - has to sum to zero. This constraint is enforced by binding one parameter + Array with constraints in columns and model parameters in rows. + Each constraint contains non-zero entries for the constrained parameters that + have to sum to zero. For a non-constrained parameter the revelant constraint column + contains 1 in the parameter row. This constraint is enforced by binding one parameter to the negative sum of the other parameters, effectively representing that parameter as a function of the other parameters. This dependent parameter is indicated by a -1 in this array, the independent parameters @@ -705,9 +711,10 @@ def residuals( :param constraints_loc: Constraints for location model. Can be one of the following: - np.ndarray: - Array with constraints in rows and model parameters in columns. - Each constraint contains non-zero entries for the a of parameters that - has to sum to zero. This constraint is enforced by binding one parameter + Array with constraints in columns and model parameters in rows. + Each constraint contains non-zero entries for the constrained parameters that + have to sum to zero. For a non-constrained parameter the revelant constraint column + contains 1 in the parameter row. This constraint is enforced by binding one parameter to the negative sum of the other parameters, effectively representing that parameter as a function of the other parameters. This dependent parameter is indicated by a -1 in this array, the independent parameters @@ -738,9 +745,10 @@ def residuals( :param constraints_scale: Constraints for scale model. Can be one of the following: - np.ndarray: - Array with constraints in rows and model parameters in columns. - Each constraint contains non-zero entries for the a of parameters that - has to sum to zero. This constraint is enforced by binding one parameter + Array with constraints in columns and model parameters in rows. + Each constraint contains non-zero entries for the constrained parameters that + have to sum to zero. For a non-constrained parameter the revelant constraint column + contains 1 in the parameter row. This constraint is enforced by binding one parameter to the negative sum of the other parameters, effectively representing that parameter as a function of the other parameters. This dependent parameter is indicated by a -1 in this array, the independent parameters diff --git a/diffxpy/testing/tests.py b/diffxpy/testing/tests.py index c378494..fccd809 100644 --- a/diffxpy/testing/tests.py +++ b/diffxpy/testing/tests.py @@ -52,18 +52,20 @@ def _fit( :param design_loc: Design matrix of location model. :param design_loc: Design matrix of scale model. :param constraints_loc: : Constraints for location model. - Array with constraints in rows and model parameters in columns. - Each constraint contains non-zero entries for the a of parameters that - has to sum to zero. This constraint is enforced by binding one parameter + Array with constraints in columns and model parameters in rows. + Each constraint contains non-zero entries for the constrained parameters that + have to sum to zero. For a non-constrained parameter the revelant constraint column + contains 1 in the parameter row. This constraint is enforced by binding one parameter to the negative sum of the other parameters, effectively representing that parameter as a function of the other parameters. This dependent parameter is indicated by a -1 in this array, the independent parameters of that constraint (which may be dependent at an earlier constraint) are indicated by a 1. :param constraints_scale: : Constraints for scale model. - Array with constraints in rows and model parameters in columns. - Each constraint contains non-zero entries for the a of parameters that - has to sum to zero. This constraint is enforced by binding one parameter + Array with constraints in columns and model parameters in rows. + Each constraint contains non-zero entries for the constrained parameters that + have to sum to zero. For a non-constrained parameter the revelant constraint column + contains 1 in the parameter row. This constraint is enforced by binding one parameter to the negative sum of the other parameters, effectively representing that parameter as a function of the other parameters. This dependent parameter is indicated by a -1 in this array, the independent parameters @@ -519,9 +521,10 @@ def wald( :param constraints_loc: Constraints for location model. Can be one of the following: - np.ndarray: - Array with constraints in rows and model parameters in columns. - Each constraint contains non-zero entries for the a of parameters that - has to sum to zero. This constraint is enforced by binding one parameter + Array with constraints in columns and model parameters in rows. + Each constraint contains non-zero entries for the constrained parameters that + have to sum to zero. For a non-constrained parameter the revelant constraint column + contains 1 in the parameter row. This constraint is enforced by binding one parameter to the negative sum of the other parameters, effectively representing that parameter as a function of the other parameters. This dependent parameter is indicated by a -1 in this array, the independent parameters @@ -552,9 +555,10 @@ def wald( :param constraints_scale: Constraints for scale model. Can be one of the following: - np.ndarray: - Array with constraints in rows and model parameters in columns. - Each constraint contains non-zero entries for the a of parameters that - has to sum to zero. This constraint is enforced by binding one parameter + Array with constraints in columns and model parameters in rows. + Each constraint contains non-zero entries for the constrained parameters that + have to sum to zero. For a non-constrained parameter the revelant constraint column + contains 1 in the parameter row. This constraint is enforced by binding one parameter to the negative sum of the other parameters, effectively representing that parameter as a function of the other parameters. This dependent parameter is indicated by a -1 in this array, the independent parameters @@ -1896,9 +1900,10 @@ def wald( This makes sense for number of genes, time, pseudotime or space for example. :param constraints_loc: : Constraints for location model. - Array with constraints in rows and model parameters in columns. - Each constraint contains non-zero entries for the a of parameters that - has to sum to zero. This constraint is enforced by binding one parameter + Array with constraints in columns and model parameters in rows. + Each constraint contains non-zero entries for the constrained parameters that + have to sum to zero. For a non-constrained parameter the revelant constraint column + contains 1 in the parameter row. This constraint is enforced by binding one parameter to the negative sum of the other parameters, effectively representing that parameter as a function of the other parameters. This dependent parameter is indicated by a -1 in this array, the independent parameters @@ -1906,9 +1911,10 @@ def wald( are indicated by a 1. It is highly recommended to only use this option together with prebuilt design matrix for the location model, dmat_loc. :param constraints_scale: : Constraints for scale model. - Array with constraints in rows and model parameters in columns. - Each constraint contains non-zero entries for the a of parameters that - has to sum to zero. This constraint is enforced by binding one parameter + Array with constraints in columns and model parameters in rows. + Each constraint contains non-zero entries for the constrained parameters that + have to sum to zero. For a non-constrained parameter the revelant constraint column + contains 1 in the parameter row. This constraint is enforced by binding one parameter to the negative sum of the other parameters, effectively representing that parameter as a function of the other parameters. This dependent parameter is indicated by a -1 in this array, the independent parameters diff --git a/docs/tutorials.rst b/docs/tutorials.rst index cdcbfd0..872ef1d 100644 --- a/docs/tutorials.rst +++ b/docs/tutorials.rst @@ -36,9 +36,7 @@ Diffxpy allows you to define a data set partition and to conduct test on each ge Multiple tests per gene ~~~~~~~~~~~~~~~~~~~~~~~ -How to perform `pairwise `__ tests. - -How to perform group tests versus all other groups (versus `rest `__). +How to perform `pairwise tests, group versus rest tests and tests within each parition `__ tests. Gene set enrichment: enrich