Hello!

To see the file structure, click on "tree".

Note that updates take place every 10 minutes, commits may not be seen immediately.
draft of os loc 2 at mapping mashup
authorpreecej <preecej@localhost>
Wed, 5 Mar 2014 01:18:28 +0000 (01:18 +0000)
committerpreecej <preecej@localhost>
Wed, 5 Mar 2014 01:18:28 +0000 (01:18 +0000)
svn path=/; revision=531

Personnel/preecej/python_singletons/map_os_2_at.py

index 931db6ec7ccb714df9a6d92734b4cee661f682cf..c0e3d8ff68766aeed07616d325b44017affe4169 100755 (executable)
@@ -4,9 +4,26 @@
 
 path = "/home/preecej/Documents/projects/plant_reactome/plant_reactome_site/projection/rice_to_arabidopsis/"
 
-ENS_FILE = open(path + "ensemble_plants_40_ath_to_rice_IRGSP.tab")
-RAP_IRGSP_FILE = open(path + "loc_rap_mappings.txt")
+dict_ens_ids = {}
 
-for line in ENS_FILE:
-    print line
-    
+ENS = open(path + "ensemble_plants_40_ath_to_rice_IRGSP.tab")
+ENS.readline();
+for line in ENS :
+    words = line.rstrip().split()
+    dict_ens_ids[words[2]] = words[0]
+ENS.close()
+
+OS_2_AT_MAP = open(path + "ensembl_ortho_os_2_at.tab",'w')
+
+RAP_IRGSP = open(path + "loc_rap_mappings.txt")
+RAP_IRGSP.readline();
+for line in RAP_IRGSP:
+    if line.strip() != "" :
+        words = line.rstrip().split()
+        rap_id = words[1].upper()
+        if rap_id in dict_ens_ids and rap_id != "NONE" :
+            #print dict_ens_ids[rap_id] + "\t" + words[0] 
+            OS_2_AT_MAP.write(words[0] + "\t" + dict_ens_ids[rap_id] + "\n") 
+RAP_IRGSP.close()
+
+OS_2_AT_MAP.close()