Skip to content
New issue

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

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

Already on GitHub? # to your account

Plot error bars in sample plot #222

Open
fedarko opened this issue Sep 10, 2019 · 2 comments
Open

Plot error bars in sample plot #222

fedarko opened this issue Sep 10, 2019 · 2 comments
Labels
enhancement New feature or request future ideas longer-term enhancements that'd require a lot of extra time/attention

Comments

@fedarko
Copy link
Collaborator

fedarko commented Sep 10, 2019

From @mortonjt's comment in #218

Would this add in the possibility of pseudocounts? There are some scenarios where this can be very helpful. (#208)

An even better option would be to add in uncertainty via Dirichlet bootstrapping. One possibility is you perform bootstrapping (with like 100 replicates), and then pass in the means / stds. That way you can also plot error vars in the balance scatter plots to help measure the uncertainty.

Bootstrapping will look something like

import numpy as np
boots = []
table = np.array( ... ) // your biom table
pseudo = 1
for _ in range(100):
    boots.append(np.random.dirichilet(table))

boots = np.dstack(boots)
m, s = boots.mean(axis=2), boots.std(axis=2, ddof=1)
@fedarko fedarko added enhancement New feature or request future ideas longer-term enhancements that'd require a lot of extra time/attention labels Sep 10, 2019
@fedarko
Copy link
Collaborator Author

fedarko commented Apr 10, 2020

Was thinking about this today, but Vega-Lite supports error bars -- see https://vega.github.io/vega-lite/docs/errorbar.html. I don't think it'd be too much work (...in the future) to change the rank or sample plot to show confidence intervals / error bars / etc., provided this data exists. The main challenge will just be testing stuff, I think.

If we have a measure of uncertainty in the differentials (as in the figure here), adjusting the rank plot to show error bars might actually be easier since we don't have to worry about formatting as much as in the sample plot.

just a thought :)

@fedarko
Copy link
Collaborator Author

fedarko commented Feb 8, 2021

Relevant to BIRDMAn; looping in @gibsramen.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
enhancement New feature or request future ideas longer-term enhancements that'd require a lot of extra time/attention
Projects
None yet
Development

No branches or pull requests

1 participant