Guest User

Untitled

a guest
Oct 22nd, 2017
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. import numpy as np
  2. data2 = open('pathways.dat', 'r', errors = 'ignore')
  3. pathways = data2.readlines()
  4.  
  5. special_line_indexes = []
  6. PWY_ID = []
  7. line_cont = []
  8. L_PRMR = [] #Left primary
  9.  
  10. #i is the line number (first element of enumerate), while line is the line content (2nd elem of enumerate)
  11. for CUI in just_compound_id:
  12. for i,line in enumerate(pathways):
  13. if '//' in line:
  14. #fint the indexes of the lines containing //
  15. special_line_indexes = i+1
  16. elif 'REACTION-LAYOUT -' in line:
  17. if CUI in line:
  18. PWY_ID.append(special_line_indexes)
Add Comment
Please, Sign In to add comment