Skip to content

Commit

Permalink
🎨 docstrings: test if listing works with blank lines, write Example c…
Browse files Browse the repository at this point in the history
…orrectly

otherwise numpy notation should work fine
  • Loading branch information
enryH committed Dec 4, 2024
1 parent 4d98dd5 commit 9f4d50d
Showing 1 changed file with 15 additions and 13 deletions.
28 changes: 15 additions & 13 deletions acore/multiple_testing.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,21 +20,23 @@ def apply_pvalue_correction(pvalues, alpha: float = 0.05, method: str = "bonferr
:param numpy.ndarray pvalues: et of p-values of the individual tests.
:param float alpha: error rate.
:param str method: method of p-value correction:
- bonferroni : one-step correction
- sidak : one-step correction
- holm-sidak : step down method using Sidak adjustments
- holm : step-down method using Bonferroni adjustments
- simes-hochberg : step-up method (independent)
- hommel : closed method based on Simes tests (non-negative)
- fdr_bh : Benjamini/Hochberg (non-negative)
- fdr_by : Benjamini/Yekutieli (negative)
- fdr_tsbh : two stage fdr correction (non-negative)
- fdr_tsbky : two stage fdr correction (non-negative)
- 'bonferroni' : one-step correction
- 'sidak' : one-step correction
- 'holm-sidak' : step down method using Sidak adjustments
- 'holm' : step-down method using Bonferroni adjustments
- 'simes-hochberg' : step-up method (independent)
- 'hommel' : closed method based on Simes tests (non-negative)
- 'fdr_bh' : Benjamini/Hochberg (non-negative)
- 'fdr_by' : Benjamini/Yekutieli (negative)
- 'fdr_tsbh' : two stage fdr correction (non-negative)
- 'fdr_tsbky' : two stage fdr correction (non-negative)
:return: Tuple with two `numpy.array`s, boolen for rejecting H0 hypothesis
and float for adjusted p-value. Can contain missing values if `pvalues`
contain missing values.
Exmaple::
Example::
result = apply_pvalue_correction(pvalues, alpha=0.05, method='bonferroni')
"""
Expand All @@ -58,7 +60,7 @@ def apply_pvalue_fdrcorrection(pvalues, alpha=0.05, method="indep"):
:param str method: method of p-value correction ('indep', 'negcorr').
:return: Tuple with two arrays, boolen for rejecting H0 hypothesis and float for adjusted p-value.
Exmaple::
Example::
result = apply_pvalue_fdrcorrection(pvalues, alpha=0.05, method='indep')
"""
Expand All @@ -76,7 +78,7 @@ def apply_pvalue_twostage_fdrcorrection(pvalues, alpha=0.05, method="bh"):
:param str method: method of p-value correction ('bky', 'bh').
:return: Tuple with two arrays, boolen for rejecting H0 hypothesis and float for adjusted p-value.
Exmaple::
Example::
result = apply_pvalue_twostage_fdrcorrection(pvalues, alpha=0.05, method='bh')
"""
Expand Down

0 comments on commit 9f4d50d

Please sign in to comment.