@@ -2605,7 +2605,7 @@ def _fit(
2605
2605
2606
2606
2607
2607
def lrt (
2608
- data ,
2608
+ data : Union [ anndata . AnnData , xr . DataArray , xr . Dataset , np . ndarray ] ,
2609
2609
reduced_formula_loc : str = None ,
2610
2610
full_formula_loc : str = None ,
2611
2611
reduced_formula_scale : str = "~1" ,
@@ -2629,7 +2629,8 @@ def lrt(
2629
2629
Note that lrt() does not support constraints in its current form. Please
2630
2630
use wald() for constraints.
2631
2631
2632
- :param data: input data
2632
+ :param data: Array-like, xr.DataArray, xr.Dataset or anndata.Anndata object containing observations.
2633
+ Input data
2633
2634
:param reduced_formula_loc: formula
2634
2635
Reduced model formula for location and scale parameter models.
2635
2636
If not specified, `reduced_formula` will be used instead.
@@ -2784,7 +2785,7 @@ def lrt(
2784
2785
2785
2786
2786
2787
def wald (
2787
- data ,
2788
+ data : Union [ anndata . AnnData , xr . DataArray , xr . Dataset , np . ndarray ] ,
2788
2789
factor_loc_totest : Union [str , List [str ]] = None ,
2789
2790
coef_to_test : Union [str , List [str ]] = None ,
2790
2791
formula_loc : str = None ,
@@ -2809,8 +2810,9 @@ def wald(
2809
2810
"""
2810
2811
Perform Wald test for differential expression for each gene.
2811
2812
2812
- :param data: input data
2813
- :param factor_loc_totest:
2813
+ :param data: Array-like, xr.DataArray, xr.Dataset or anndata.Anndata object containing observations.
2814
+ Input data
2815
+ :param factor_loc_totest: str, list of strings
2814
2816
List of factors of formula to test with Wald test.
2815
2817
E.g. "condition" or ["batch", "condition"] if formula_loc would be "~ 1 + batch + condition"
2816
2818
:param coef_to_test:
@@ -3037,7 +3039,7 @@ def _split_X(data, grouping):
3037
3039
3038
3040
3039
3041
def t_test (
3040
- data ,
3042
+ data : Union [ anndata . AnnData , xr . DataArray , xr . Dataset , np . ndarray ] ,
3041
3043
grouping ,
3042
3044
gene_names = None ,
3043
3045
sample_description = None ,
@@ -3047,7 +3049,8 @@ def t_test(
3047
3049
Perform Welch's t-test for differential expression
3048
3050
between two groups on adata object for each gene.
3049
3051
3050
- :param data: input data
3052
+ :param data: Array-like, xr.DataArray, xr.Dataset or anndata.Anndata object containing observations.
3053
+ Input data
3051
3054
:param grouping: str, array
3052
3055
3053
3056
- column in data.obs/sample_description which contains the split of observations into the two groups.
@@ -3079,7 +3082,8 @@ def wilcoxon(
3079
3082
Perform Wilcoxon rank sum test for differential expression
3080
3083
between two groups on adata object for each gene.
3081
3084
3082
- :param data: input data
3085
+ :param data: Array-like, xr.DataArray, xr.Dataset or anndata.Anndata object containing observations.
3086
+ Input data
3083
3087
:param grouping: str, array
3084
3088
3085
3089
- column in data.obs/sample_description which contains the split of observations into the two groups.
@@ -3101,7 +3105,7 @@ def wilcoxon(
3101
3105
3102
3106
3103
3107
def two_sample (
3104
- data ,
3108
+ data : Union [ anndata . AnnData , xr . DataArray , xr . Dataset , np . ndarray ] ,
3105
3109
grouping : Union [str , np .ndarray , list ],
3106
3110
as_numeric : Union [List [str ], Tuple [str ], str ] = (),
3107
3111
test = None ,
@@ -3146,7 +3150,8 @@ def two_sample(
3146
3150
Doesn't require fitting of generalized linear models.
3147
3151
Wilcoxon rank sum (Mann-Whitney U) test between both observation groups.
3148
3152
3149
- :param data: input data
3153
+ :param data: Array-like, xr.DataArray, xr.Dataset or anndata.Anndata object containing observations.
3154
+ Input data
3150
3155
:param grouping: str, array
3151
3156
3152
3157
- column in data.obs/sample_description which contains the split of observations into the two groups.
@@ -3283,7 +3288,7 @@ def two_sample(
3283
3288
3284
3289
3285
3290
def pairwise (
3286
- data ,
3291
+ data : Union [ anndata . AnnData , xr . DataArray , xr . Dataset , np . ndarray ] ,
3287
3292
grouping : Union [str , np .ndarray , list ],
3288
3293
as_numeric : Union [List [str ], Tuple [str ], str ] = [],
3289
3294
test : str = 'z-test' ,
@@ -3334,7 +3339,8 @@ def pairwise(
3334
3339
Doesn't require fitting of generalized linear models.
3335
3340
Wilcoxon rank sum (Mann-Whitney U) test between both observation groups.
3336
3341
3337
- :param data: input data
3342
+ :param data: Array-like, xr.DataArray, xr.Dataset or anndata.Anndata object containing observations.
3343
+ Input data
3338
3344
:param grouping: str, array
3339
3345
3340
3346
- column in data.obs/sample_description which contains the split of observations into the two groups.
@@ -3500,7 +3506,7 @@ def pairwise(
3500
3506
3501
3507
3502
3508
def versus_rest (
3503
- data ,
3509
+ data : Union [ anndata . AnnData , xr . DataArray , xr . Dataset , np . ndarray ] ,
3504
3510
grouping : Union [str , np .ndarray , list ],
3505
3511
as_numeric : Union [List [str ], Tuple [str ], str ] = (),
3506
3512
test : str = 'wald' ,
@@ -3551,7 +3557,8 @@ def versus_rest(
3551
3557
Doesn't require fitting of generalized linear models.
3552
3558
Wilcoxon rank sum (Mann-Whitney U) test between both observation groups.
3553
3559
3554
- :param data: input data
3560
+ :param data: Array-like, xr.DataArray, xr.Dataset or anndata.Anndata object containing observations.
3561
+ Input data
3555
3562
:param grouping: str, array
3556
3563
3557
3564
- column in data.obs/sample_description which contains the split of observations into the two groups.
@@ -3664,7 +3671,7 @@ def versus_rest(
3664
3671
3665
3672
3666
3673
def partition (
3667
- data ,
3674
+ data : Union [ anndata . AnnData , xr . DataArray , xr . Dataset , np . ndarray ] ,
3668
3675
partition : Union [str , np .ndarray , list ],
3669
3676
gene_names : str = None ,
3670
3677
sample_description : pd .DataFrame = None ):
@@ -3678,7 +3685,8 @@ def partition(
3678
3685
3679
3686
Wraps _Partition so that doc strings are nice.
3680
3687
3681
- :param data: input data
3688
+ :param data: Array-like, xr.DataArray, xr.Dataset or anndata.Anndata object containing observations.
3689
+ Input data
3682
3690
:param gene_names: optional list/array of gene names which will be used if `data` does not implicitly store these
3683
3691
:param sample_description: optional pandas.DataFrame containing sample annotations
3684
3692
"""
@@ -3701,12 +3709,13 @@ class _Partition():
3701
3709
3702
3710
def __init__ (
3703
3711
self ,
3704
- data ,
3712
+ data : Union [ anndata . AnnData , xr . DataArray , xr . Dataset , np . ndarray ] ,
3705
3713
partition : Union [str , np .ndarray , list ],
3706
3714
gene_names : str = None ,
3707
3715
sample_description : pd .DataFrame = None ):
3708
3716
"""
3709
- :param data: input data
3717
+ :param data: Array-like, xr.DataArray, xr.Dataset or anndata.Anndata object containing observations.
3718
+ Input data
3710
3719
:param partition: str, array
3711
3720
3712
3721
- column in data.obs/sample_description which contains the split of observations into the two groups.
@@ -4030,7 +4039,7 @@ def wald(
4030
4039
4031
4040
4032
4041
def continuous_1d (
4033
- data ,
4042
+ data : Union [ anndata . AnnData , xr . DataArray , xr . Dataset , np . ndarray ] ,
4034
4043
continuous : str ,
4035
4044
df : int = 5 ,
4036
4045
factor_loc_totest : Union [str , List [str ]] = None ,
@@ -4065,7 +4074,8 @@ def continuous_1d(
4065
4074
perform these spline basis transforms outside of diffxpy and feed the
4066
4075
dmat directly to one of the test routines wald() or lrt().
4067
4076
4068
- :param data: input data
4077
+ :param data: Array-like, xr.DataArray, xr.Dataset or anndata.Anndata object containing observations.
4078
+ Input data
4069
4079
:param continuous: str
4070
4080
4071
4081
- column in data.obs/sample_description which contains the continuous covariate.
0 commit comments