summaryrefslogtreecommitdiff
path: root/Code
diff options
context:
space:
mode:
authorHui Lan <lanhui@zjnu.edu.cn>2021-07-23 16:48:15 +0800
committerHui Lan <lanhui@zjnu.edu.cn>2021-07-23 16:48:15 +0800
commit50e6637296852cfeab161e806a7b76fc8371587e (patch)
tree34364719af83ce342972dc82ce813d67ed93ec57 /Code
parentad6c15bccdf9b3e97392a0cd645faf630a148a6d (diff)
utils.py: header for edges-diff.txt.
Diffstat (limited to 'Code')
-rw-r--r--Code/utils.py2
1 files changed, 2 insertions, 0 deletions
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')