martinjzhang / scDRS

Single-cell disease relevance score (scDRS)
https://martinjzhang.github.io/scDRS/
MIT License
98 stars 11 forks source link

fixed the bug in scdrs/util.py #76

Closed yyoshiaki closed 8 months ago

yyoshiaki commented 8 months ago

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

yyoshiaki commented 8 months ago

@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.

KangchengHou commented 8 months ago

looks great and thank you!