From 50e6637296852cfeab161e806a7b76fc8371587e Mon Sep 17 00:00:00 2001 From: Hui Lan Date: Fri, 23 Jul 2021 16:48:15 +0800 Subject: utils.py: header for edges-diff.txt. --- Code/utils.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Code/utils.py b/Code/utils.py index f78980a..405dccb 100644 --- a/Code/utils.py +++ b/Code/utils.py @@ -28,6 +28,8 @@ def make_new_edges_file(Sold, Snew, fname_new, output_file): if target_id + '_' + tf_id in Sdiff: # this is a new edge line, keep it result.append(line) with open(output_file, 'w') as f: + header = '\t'.join(['target_id target_name', 'source_id source_name', 'score', 'type of score', 'RNA-seqs', 'ChIP-seq', 'Log likelihood', 'Date', 'Strength', 'Inference method']) + '\n' + f.write(header) for line in result: f.write(line + '\n') -- cgit v1.2.1