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

Significance of motif over background #4

Closed
hayleymc opened this issue Nov 8, 2023 · 2 comments
Closed

Significance of motif over background #4

hayleymc opened this issue Nov 8, 2023 · 2 comments

Comments

@hayleymc
Copy link

hayleymc commented Nov 8, 2023

Hi,

Thanks for a great package!

I just wanted to ask whether palmotif is capable of reporting a statistic similar to the chi-square value as implemented in the 'find_motif' function in tcrdist2?

Thank you,
Hayley

@agartland
Copy link
Owner

Hi Hayley, thanks and glad you're using it! No, we haven't revisited that statistic for a while now. There are a few statistics in palmotif/compute_logo.py that attempt to quantify how surprising the relative logo plot is. The KL divergence statistic or the multinomial log-likelihood are both reasonable. But as with the chi_square test of the former tcrdist, it's important to know how surprising is surprising enough that we should call it "significant". For this I suggest using either a bootstrap of your data (code in compute_logo.py) or a permutation test of some kind. For example, with a permutation test you want to generate your statistic of interest from a simulated null distribution (e.g., sequences or participants with a shuffled label), and then see whether the statistic you actually observed is more extreme than 95% of your null distribution. The tricky part is thinking of the most relevant way to generate that null distribution. All best,
Andrew

@hayleymc
Copy link
Author

Thanks very much for your reply Andrew, greatly appreciated!

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

No branches or pull requests

2 participants