Comments (3)
Thank you, @tathey1 !
from statannotations.
Hello @tathey1 ,
Your question could be about two different things, so I'll give short reply for each case. Please don't hesitate to specify further to continue the discussion.
-
You implemented a function and want to use it in your plots. In this case, with the function say
test_function
written (in any file you want, or from another library, provided it has the correct API, you can create amyStatTest = StatTest(test_function, ...)
object with it, as we do for Wilcoxon on:statannotations/statannotations/stats/StatTest.py
Lines 125 to 126 in 2a5ebe1
Then, you simply useannotator.configure(test=myStatTest)
to apply it. This doesn't require modifying the package's files.
Example with an external library function in a gist https://gist.github.com/trevismd/f556d83f6efdad249f995eb65daeb1d9.
This is explained in the code comments, and in some previous discussions, but it could have a spot on the README or usage notebook, and this contribution to the documentation would be very welcome! (as well as any other hole in the doc one wishes to fill). -
You would like to share this method and make it part of
statannotations
.
In this case, your understanding of the package's structure is correct and we should continue the discussion on the appropriateness of the change, because at some point I was wondering if an independent repository shouldn't exist for this kind of "extension".
from statannotations.
Thanks for the response! My question was related to 1 - implementing my own test for myself. I didn't put two and two together and realize that I could feed in my own StatTest
object to Annotator.configure
. Now I have it working in the way you suggested.
I made a PR with both an addition to the notebook, and updates to the docs in case you want to proceed. For what it's worth the test I was adding is simply a log transform followed by a t-test (which is what I used in the example in the PR). Seems trivial to add to the core set of tests, but of course happy to do so if you like.
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.