Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Override annotation when value is no longer significant after correction #31

Merged
merged 2 commits into from
Sep 14, 2021

Conversation

trevismd
Copy link
Owner

@trevismd trevismd commented Sep 11, 2021

As discussed in #30, some might find useful to have the annotation "ns" plotted (instead of "* (ns)", "** (ns)"...) when a p-value is no longer to be considered significant when using a multiple comparisons correction.

This PR introduces a "correction_format" parameter for Annotator.configure(), enabling the behavior above using correction_format="replace".

It is also possible to define a custom formatting string for these cases such as correction_format="({star})", to obtain "(*)", "(**)", etc.

Note that this will not change the appearance in the printed output (obtained with verbose).

Signed-off-by: Florian Charlier <trevis@cascliniques.be>
@codecov
Copy link

codecov bot commented Sep 11, 2021

Codecov Report

Merging #31 (1d30a0d) into dev (c4704fb) will decrease coverage by 0.01%.
The diff coverage is 97.05%.

Impacted file tree graph

@@            Coverage Diff             @@
##              dev      #31      +/-   ##
==========================================
- Coverage   96.96%   96.94%   -0.02%     
==========================================
  Files          29       29              
  Lines        1845     1867      +22     
==========================================
+ Hits         1789     1810      +21     
- Misses         56       57       +1     
Impacted Files Coverage Δ
statannotations/Annotator.py 91.60% <ø> (ø)
tests/test_pvalue_format.py 100.00% <ø> (ø)
statannotations/PValueFormat.py 96.26% <94.73%> (-0.37%) ⬇️
statannotations/_version.py 100.00% <100.00%> (ø)
statannotations/format_annotations.py 100.00% <100.00%> (ø)
statannotations/stats/StatResult.py 91.48% <100.00%> (+0.79%) ⬆️
tests/test_integrate_format_multiple.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c4704fb...1d30a0d. Read the comment docs.

Signed-off-by: Florian Charlier <trevis@cascliniques.be>
@trevismd trevismd marked this pull request as ready for review September 11, 2021 13:48
@trevismd trevismd merged commit a005a5b into dev Sep 14, 2021
@trevismd trevismd linked an issue Oct 1, 2021 that may be closed by this pull request
@trevismd trevismd mentioned this pull request Oct 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Non bonferroni comparisons corrections have multiple significances?
1 participant