mirror of
https://github.com/Athemis/pyKinetics.git
synced 2025-04-26 06:49:12 +00:00
Reformat code using yapf
This commit is contained in:
parent
781c6ccb55
commit
c7a8525410
2 changed files with 22 additions and 22 deletions
|
@ -41,6 +41,7 @@ class ExperimentHelper():
|
||||||
|
|
||||||
Provides plotting and data output functionality for libkinetics.Experiment.
|
Provides plotting and data output functionality for libkinetics.Experiment.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(self, experiment, logger):
|
def __init__(self, experiment, logger):
|
||||||
self.exp = experiment
|
self.exp = experiment
|
||||||
self.logger = logger
|
self.logger = logger
|
||||||
|
@ -118,9 +119,7 @@ class ExperimentHelper():
|
||||||
writer = csv.writer(csvfile, dialect='excel-tab')
|
writer = csv.writer(csvfile, dialect='excel-tab')
|
||||||
writer.writerow(['LINEAR FITS'])
|
writer.writerow(['LINEAR FITS'])
|
||||||
writer.writerow([])
|
writer.writerow([])
|
||||||
writer.writerow(['concentration',
|
writer.writerow(['concentration', 'avg. slope', 'slope std_err',
|
||||||
'avg. slope',
|
|
||||||
'slope std_err',
|
|
||||||
'replicates (slope, intercept and r_squared)'])
|
'replicates (slope, intercept and r_squared)'])
|
||||||
for m in exp.measurements:
|
for m in exp.measurements:
|
||||||
row = [m.concentration, m.avg_slope, m.avg_slope_err]
|
row = [m.concentration, m.avg_slope, m.avg_slope_err]
|
||||||
|
@ -135,21 +134,18 @@ class ExperimentHelper():
|
||||||
self.logger.debug(' Writing Michaelis-Menten results.')
|
self.logger.debug(' Writing Michaelis-Menten results.')
|
||||||
writer.writerow(['MICHAELIS-MENTEN KINETICS'])
|
writer.writerow(['MICHAELIS-MENTEN KINETICS'])
|
||||||
writer.writerow(['', 'value', 'std'])
|
writer.writerow(['', 'value', 'std'])
|
||||||
writer.writerow(['vmax', exp.mm['vmax'],
|
writer.writerow(['vmax', exp.mm['vmax'], exp.mm['vmax_err']])
|
||||||
exp.mm['vmax_err']])
|
writer.writerow(['Kprime', exp.mm['Km'], exp.mm['Km_err']])
|
||||||
writer.writerow(['Kprime', exp.mm['Km'],
|
|
||||||
exp.mm['Km_err']])
|
|
||||||
if exp.hill:
|
if exp.hill:
|
||||||
self.logger.debug(' Writing Hill results.')
|
self.logger.debug(' Writing Hill results.')
|
||||||
writer.writerow([])
|
writer.writerow([])
|
||||||
writer.writerow(['HILL KINETICS'])
|
writer.writerow(['HILL KINETICS'])
|
||||||
writer.writerow(['', 'value', 'std'])
|
writer.writerow(['', 'value', 'std'])
|
||||||
writer.writerow(['vmax', exp.hill['vmax'],
|
writer.writerow(['vmax', exp.hill['vmax'],
|
||||||
exp.hill['vmax_err']])
|
exp.hill['vmax_err']])
|
||||||
writer.writerow(['Kprime', exp.hill['Kprime'],
|
writer.writerow(['Kprime', exp.hill['Kprime'],
|
||||||
exp.hill['Kprime_err']])
|
exp.hill['Kprime_err']])
|
||||||
writer.writerow(['h', exp.hill['h'],
|
writer.writerow(['h', exp.hill['h'], exp.hill['h_err']])
|
||||||
exp.hill['h_err']])
|
|
||||||
|
|
||||||
|
|
||||||
def parse_arguments():
|
def parse_arguments():
|
||||||
|
|
|
@ -372,11 +372,13 @@ class Experiment():
|
||||||
self.logger.info(' v_max: {} ± {}'.format(vmax, perr[0]))
|
self.logger.info(' v_max: {} ± {}'.format(vmax, perr[0]))
|
||||||
self.logger.info(' Km: {} ± {}'.format(Km, perr[1]))
|
self.logger.info(' Km: {} ± {}'.format(Km, perr[1]))
|
||||||
|
|
||||||
return {'vmax': np.float(vmax),
|
return {
|
||||||
'Km': np.float(Km),
|
'vmax': np.float(vmax),
|
||||||
'vmax_err': np.float(perr[0]),
|
'Km': np.float(Km),
|
||||||
'Km_err': np.float(perr[1]),
|
'vmax_err': np.float(perr[0]),
|
||||||
'x': x}
|
'Km_err': np.float(perr[1]),
|
||||||
|
'x': x
|
||||||
|
}
|
||||||
|
|
||||||
def do_hill_kinetics(self):
|
def do_hill_kinetics(self):
|
||||||
"""
|
"""
|
||||||
|
@ -420,10 +422,12 @@ class Experiment():
|
||||||
self.logger.info(' K_prime: {} ± {}'.format(Kprime, perr[1]))
|
self.logger.info(' K_prime: {} ± {}'.format(Kprime, perr[1]))
|
||||||
self.logger.info(' h: {} ± {}'.format(h, perr[2]))
|
self.logger.info(' h: {} ± {}'.format(h, perr[2]))
|
||||||
|
|
||||||
return {'vmax': np.float(vmax),
|
return {
|
||||||
'Kprime': np.float(Kprime),
|
'vmax': np.float(vmax),
|
||||||
'vmax_err': np.float(perr[0]),
|
'Kprime': np.float(Kprime),
|
||||||
'Kprime_err': np.float(perr[1]),
|
'vmax_err': np.float(perr[0]),
|
||||||
'h_err': np.float(perr[2]),
|
'Kprime_err': np.float(perr[1]),
|
||||||
'h': np.float(h),
|
'h_err': np.float(perr[2]),
|
||||||
'x': x}
|
'h': np.float(h),
|
||||||
|
'x': x
|
||||||
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue