Comments (6)
For hiding non significant results, we merged #95 into our dev
branch, so you can check it out. Just pass hide_non_significant=True
when creating the Annotator
.
from statannotations.
I was going to ask for a similar feature. I would like to filter p-values before we know the answer. In my case, I want to show only NS, which I cannot know prior to run the code and it is hard work to select pairs one-by-one afterwards. I would like to automate this process.
from statannotations.
It would be welcome to have both features indeed, with an optional parameter which, by default, would not filter anything. I don't have enough knowledge of the package to dive into the code unfortunately.
from statannotations.
+1
This might be a workaround to annotate only the significant p-values BUT it affects the p-values in multiple test corrections.
# create annotator
annotator = Annotator(axs, pairs, data=df, x=x, y=y, order=order)
# configure
annotator.configure(test=test, comparisons_correction=corr, text_format='star', loc='inside')
# apply ONLY tests
annotator.apply_test()
# pick the pairs producing significant p-value
sig_pairs = [annotator.pairs[i] for i, x in enumerate(annotator.get_annotations_text()) if x != "ns"]
# decide what to do
if len(sig_pairs) == len(pairs): # all pairs gave significant p-values -> annotate
annotator.annotate()
elif len(sig_pairs) == 0: # there are no significant pairs so don't add anything to the plot
pass
else: # some pairs were not significant -> use only those
annotator = Annotator(axs, sig_pairs, data=df, x=x, y=y, order=order)
annotator.configure(test=test, comparisons_correction=corr, text_format='star', loc='inside')
annotator.apply_and_annotate()
from statannotations.
Shouldn't this issue be closed? It has been working for a while on the dev
branch.
PR #127 corrects a bugfix related to this issue but otherwise it seems fine.
EDIT: I'll let @trevismd close it if deemed adequate.
from statannotations.
Merged today and released in v0.6.0!
from statannotations.
Related Issues (20)
- What does * (ns) mean? HOT 3
- report corrected p values
- Integration with new Numpy and Seaborn? HOT 1
- Seaborn categorical plot issue HOT 1
- How to plot facet grid with hue argument? HOT 5
- Possible to not show non-significant relationships? HOT 1
- Feature request: Text format that combines both numerical p-values and stars
- Possible to get statistics and p-values when using FacetGrid?
- How to keep two decimal places with text_format='full' HOT 1
- v0.60 not compatible with seaborn v0.13 HOT 10
- Add ANOVA?
- Feature request: Lineplot support
- Customize Annotations HOT 1
- Adding Tutorials to documentation site
- Use src/ folder for package
- Offset the significance brackets
- Feature request: permutation test
- Getting rid of minor tick marks
- Stannotation with scanpy and seaborn HOT 1
- No possibility to get statannotations to work with seaborn, pandas, and numpy HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from statannotations.