diff Iterative_mapping/remove_map.py @ 0:d56631911cc1 draft

Uploaded
author tyty
date Mon, 15 Sep 2014 14:41:13 -0400
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Iterative_mapping/remove_map.py	Mon Sep 15 14:41:13 2014 -0400
@@ -0,0 +1,29 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+
+import sys
+from read_file import *
+
+
+unmap_file = sys.argv[1]
+map_file = sys.argv[2]
+result_file = sys.argv[3]
+
+
+unmap = read_t_file(unmap_file)
+mapped = read_t_file(map_file)
+h = file(result_file, 'w')
+
+maps = set()
+for i in range(len(mapped)):
+    maps.add(mapped[i][0])
+
+
+for i in range(len(unmap)):
+    name = unmap[i][0]
+    if name not in maps:
+        h.write(name)
+        h.write('\n')
+
+
+h.close()