Permalink
Browse files

new version

  • Loading branch information...
1 parent d7e1b2d commit 1cb4be1dba29d3e264358a5ba2769ff7345d898b @bugrax committed Oct 5, 2011
View
2,188 Adil_SystemBiolgy_Projects/src/output_rxns/Output_rxns.txt
1,094 additions, 1,094 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
View
7 Adil_SystemBiolgy_Projects/src/output_rxns/output_reactions.py
@@ -6,7 +6,7 @@
def findInSource(list_input_mets,line):
for item in list_input_mets:
if(line.find(item) > -1):
- return 1
+ return item
return 0
def main():
f=open('input_mets.txt','r')
@@ -19,8 +19,9 @@ def main():
source = open('source.txt','r')
line = source.readline()
while(line):
- if(findInSource(input_mets,line)>0):
- w.write(line)
+ element=findInSource(input_mets,line)
+ if(element!=0):
+ w.write(element+"\t"+line)
line=source.readline()

0 comments on commit 1cb4be1

Please sign in to comment.