def runStat(dataI, minPts, cut, cpu, fout, hichip=0):
"""
Calling p-values of interactions for all chromosomes.
"""
logger.info("Starting estimate significance for interactions")
ds = Parallel(n_jobs=cpu)(delayed(getIntSig)(
dataI[key]["f"], dataI[key]["records"], minPts, cut)
for key in dataI.keys())
ds = [d for d in ds if d is not None]
if len(ds) == 0:
logger.error("Something wrong, no loops found, sorry, bye.")
return 1
ds = pd.concat(ds)
try:
if hichip:
ds = markIntSigHic(ds)
else:
ds = markIntSig(ds)
ds.to_csv(fout + ".loop", sep="\t", index_label="loopId")
except:
logger.warning(
"Something wrong happend to significance estimation, only output called loops"
)
ds.to_csv(fout + "_raw.loop", sep="\t", index_label="loopId")
return 0
评论列表
文章目录