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
评论列表
文章目录