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

fixed the bug in scdrs/util.py #76

Merged
merged 2 commits into from
Nov 29, 2023

Conversation

yyoshiaki
Copy link
Contributor

When mcp included NaN, significance was not displayed.
This is because multipletest()[1] is filled with NaN when p values included NaN, while multipletest()[0] is normal.
By modifying to use multipletest()[0], the problem is solved.

Related to #75

When mcp included NaN, significance was not displayed.
This is because multipletest()[1] is filled with NaN when p values included NaN, while multipletest()[0] is normal.
By modifying to use multipletest()[0], the problem is solved.
@yyoshiaki yyoshiaki marked this pull request as ready for review November 29, 2023 02:44
@yyoshiaki
Copy link
Contributor Author

@martinjzhang
Hi!

I've noticed an issue when using multiple scdrs_groups with scdrs.util.plot_group_stats. Specifically, when some of the group stats contain NaN values, none of the significance values are displayed. While this is a rare case, it can occur, for example, when stratifying group_stats by condition.

The cause of this bug seems to be that when p values contains NaN, multipletests()[1] returns NaN while multipletests()[0] returns valid results. Therefore, I've changed to use multipletests()[0] for displaying significance instead. Please review this modification when you have a chance.

scdrs/util.py Show resolved Hide resolved
@KangchengHou KangchengHou merged commit a7c9efe into martinjzhang:master Nov 29, 2023
@KangchengHou
Copy link
Collaborator

looks great and thank you!

@yyoshiaki yyoshiaki deleted the fix-plot_group_stats branch November 30, 2023 02:26
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

Successfully merging this pull request may close these issues.

2 participants