Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import numpy as np
- data2 = open('pathways.dat', 'r', errors = 'ignore')
- pathways = data2.readlines()
- special_line_indexes = []
- PWY_ID = []
- line_cont = []
- L_PRMR = [] #Left primary
- #i is the line number (first element of enumerate), while line is the line content (2nd elem of enumerate)
- for CUI in just_compound_id:
- for i,line in enumerate(pathways):
- if '//' in line:
- #fint the indexes of the lines containing //
- special_line_indexes = i+1
- elif 'REACTION-LAYOUT -' in line:
- if CUI in line:
- PWY_ID.append(special_line_indexes)
Add Comment
Please, Sign In to add comment