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

Better sorting of pathways in /conditions/gsea_pathway.html? #287

Open
VladimirShitov opened this issue Jul 24, 2024 · 0 comments
Open

Better sorting of pathways in /conditions/gsea_pathway.html? #287

VladimirShitov opened this issue Jul 24, 2024 · 0 comments

Comments

@VladimirShitov
Copy link
Collaborator

VladimirShitov commented Jul 24, 2024

The following code block can lead to an analysis problem:

gsea_results = (
    pd.concat({"score": scores.T, "norm": norm.T, "pval": pvals.T}, axis=1)
    .droplevel(level=1, axis=1)
    .sort_values("pval")
)

Sometimes, when the effect is strong, many p-values are set to 0. Sorting them does not rank gene sets properly. I suggest sorting by the normalized score instead. In this case the last line should be:
.sort_values("norm", key=np.abs, ascending=False)

Additionally, I would suggest plotting scores instead of p-values or at least showing the directionality of the score by color

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

1 participant