diff options
author | Hui Lan <lanhui@zjnu.edu.cn> | 2021-07-23 16:48:15 +0800 |
---|---|---|
committer | Hui Lan <lanhui@zjnu.edu.cn> | 2021-07-23 16:48:15 +0800 |
commit | 50e6637296852cfeab161e806a7b76fc8371587e (patch) | |
tree | 34364719af83ce342972dc82ce813d67ed93ec57 /Code | |
parent | ad6c15bccdf9b3e97392a0cd645faf630a148a6d (diff) |
utils.py: header for edges-diff.txt.
Diffstat (limited to 'Code')
-rw-r--r-- | Code/utils.py | 2 |
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') |