summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Code/merge_edges.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/Code/merge_edges.py b/Code/merge_edges.py
index ddd60d4..08e76fb 100644
--- a/Code/merge_edges.py
+++ b/Code/merge_edges.py
@@ -108,9 +108,9 @@ def fill_database(lst, conn):
def compute_time_difference_in_days(t1, t2):
''' t1 and t2 has this format: yyyymmdd. '''
- if not t1.isnumeric() and length(t1) != 8:
+ if not t1.isdigit() and length(t1) != 8:
raise Exception('t1 format wrong in compute_time_difference_in_days.')
- if not t2.isnumeric() and length(t2) != 8:
+ if not t2.isdigit() and length(t2) != 8:
raise Exception('t2 format wrong in compute_time_difference_in_days.')
t1 = datetime.date(int(t1[:4]), int(t1[4:6]), int(t1[6:]))
@@ -148,12 +148,12 @@ def make_new_edge2(d):
##main
-
+write_log_file('[merge_edges.py] Go through all edge files in the edge pool %s.' % (EDGE_POOL_DIR) , UPDATE_NETWORK_LOG_FILE)
d = {} # d will contain all edges computed so far, where the key is TargetGeneID_TFGeneID, and the value is a list of tuples. Each tuple is a historical edge.
file_count = 0
for fname in sorted(glob.glob(os.path.join(EDGE_POOL_DIR, 'edges*.*'))):
file_count += 1
- print('[merge_edges.py]: including %s.' % (fname))
+ print('[merge_edges.py]: including %s. Dictionary size %d.' % (fname, len(d)))
#write_log_file('[merge_edges.py] including file %s.' % (fname) , UPDATE_NETWORK_LOG_FILE)
f = open(fname)