count_to_pvalue.py 文件源码

python
阅读 32 收藏 0 点赞 0 评论 0

项目:epic 作者: biocore-ntnu 项目源码 文件源码
def _count_to_pvalue(island_enriched_threshold,
                     average_window_readcount, df):
    # type: (int, float, pd.DataFrame) -> pd.DataFrame

    df = df.loc[df["ChIP"] >= island_enriched_threshold]
    scores = df["ChIP"].apply(
        lambda count: _poisson(count, average_window_readcount) + 0.000001)
    df.insert(len(df.columns), "Score", scores)

    pd.options.mode.chained_assignment = None

    df["Score"] = df["Score"].apply(log)
    df["Score"] = df["Score"].apply(minus)

    pd.options.mode.chained_assignment = "warn"

    return df
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号