@@ -265,7 +265,7 @@ def runMultiStateFBA(
265265 biomass_name , options ['target_biomass' ]
266266 )
267267 )
268- F = file (
268+ F = open (
269269 os .path .join (
270270 work_dir ,
271271 'find_input(%s)_(%s).csv' % (ModelPrefixStrIO , options ['target_biomass' ]),
@@ -681,7 +681,7 @@ def runMultiStateFBA(
681681 RESULT_DATA .append (DD )
682682 RESULT_LPS .append (mGlp )
683683
684- FR = file (os .path .join (work_dir , '%s_rpt.txt' % MultiFNbase ), 'w' )
684+ FR = open (os .path .join (work_dir , '%s_rpt.txt' % MultiFNbase ), 'w' )
685685 FR .write ('MultipleInput(%s states) Result:\n ' % len (multisolve ))
686686 # FR.write(' Flux diff: %s\n' % all_flux_diff.sum())
687687 FR .write (' optimum: %s = %s\n ' % (mGobid , mGobjval ))
@@ -704,7 +704,7 @@ def runMultiStateFBA(
704704
705705 FR .close ()
706706
707- FD = file (os .path .join (work_dir , '%s_dat.test.csv' % MultiFNbase ), 'w' )
707+ FD = open (os .path .join (work_dir , '%s_dat.test.csv' % MultiFNbase ), 'w' )
708708 head = 'Flux, '
709709 for p in ModelPrefixes :
710710 head += '%s,' % p
@@ -722,7 +722,7 @@ def runMultiStateFBA(
722722 FD .write ('%s,%s\n ' % (FluxScaling [F ], FlxAO_scaled [F , - 1 ]))
723723 FD .flush ()
724724 FD .close ()
725- FD = file (os .path .join (work_dir , '%s_dat.csv' % MultiFNbase ), 'w' )
725+ FD = open (os .path .join (work_dir , '%s_dat.csv' % MultiFNbase ), 'w' )
726726 head = 'Flux, '
727727 for p in ModelPrefixes :
728728 head += '%s,' % p
@@ -755,9 +755,9 @@ def runMultiStateFBA(
755755
756756 # multi file
757757 # if options['algorithm'] == "ABS_L1_METHOD":
758- # FD = file (os.path.join(work_dir, '%s_ABSL1_multi.csv' % OFname), 'w')
758+ # FD = open (os.path.join(work_dir, '%s_ABSL1_multi.csv' % OFname), 'w')
759759 # elif options['algorithm'] == "L1_METHOD":
760- # FD = file (os.path.join(work_dir, '%s_L1_multi.csv' % OFname), 'w')
760+ # FD = open (os.path.join(work_dir, '%s_L1_multi.csv' % OFname), 'w')
761761
762762 # dat_arr = [a['solution'] for a in RESULT_DATA]
763763 # dat_arr = numpy.hstack(dat_arr)
@@ -807,9 +807,9 @@ def runMultiStateFBA(
807807
808808 opt_out = [(a ['dev_factor' ], a ['obj_val' ], a ['flux_diff' ]) for a in RESULT_DATA ]
809809 if options ['algorithm' ] == "ABS_L1_METHOD" :
810- FR2 = file (os .path .join (work_dir , '%s_ABSL1_opt.csv' % OFname ), 'w' )
810+ FR2 = open (os .path .join (work_dir , '%s_ABSL1_opt.csv' % OFname ), 'w' )
811811 elif options ['algorithm' ] == "L1_METHOD" :
812- FR2 = file (os .path .join (work_dir , '%s_L1_opt.csv' % OFname ), 'w' )
812+ FR2 = open (os .path .join (work_dir , '%s_L1_opt.csv' % OFname ), 'w' )
813813 head = 'ObjDist(%s),optimum (%s),raw diff (%s)' % (
814814 ModelPrefixStr ,
815815 ModelPrefixStr ,
@@ -1005,7 +1005,7 @@ def runMultiStateFBA(
10051005 (fva_time_end - fva_time_start ) / 60.0 ,
10061006 )
10071007 )
1008- F = file (os .path .join (work_dir , '%s_fva_stats.txt' % OFname ), 'a' )
1008+ F = open (os .path .join (work_dir , '%s_fva_stats.txt' % OFname ), 'a' )
10091009 F .write (
10101010 '*****\n Total (%s LP\' s) time for FVA (%s threads) min: %s\n *****\n '
10111011 % (
0 commit comments