zktuong / ktplotspy

Python library for plotting Cellphonedb results. Ported from ktplots R package.
https://ktplotspy.readthedocs.io/
MIT License
46 stars 12 forks source link

Default min p-value can't be scaled according to statistical test #65

Closed yxwucq closed 2 months ago

yxwucq commented 5 months ago

Hi! please refer to this issue: https://github.com/ventolab/CellphoneDB/issues/179 Could you add a parameter result_precision according to cpdb_statistical_analysis_method.call, which is default 3 but can be set to 5 when increasing test number to 1e5? like this:

def plot_cpdb(
    ...
    result_precision: int = 3):
    ...
        if df.at[i, "pvals"] == 0:
            df.at[i, "pvals"] = 1**-result_precision

I'm not sure that if there are other places that need to be changed, Thank you for checking this!

zktuong commented 5 months ago

ah ok! sure! thanks for flagging this up. @ali-harasty ! can you help check do up a PR on this and also at ktplots?

ali-harasty commented 5 months ago

No problem!

zktuong commented 2 months ago

solved with #70