Commit 3c162bae authored by ssomnath's avatar ssomnath
Browse files

Corrected name of parameter from BE_bins_per_read to BE_bins_per_band

Also avoiding divide by zero error when reading parameters from text files
parent 57803fef
......@@ -298,17 +298,22 @@ class BEodfTranslator(Translator):
bins_per_step = parm_dict['FORC_num_of_FORC_cycles'] * \
parm_dict['VS_number_of_cycles'] * \
parm_dict['VS_steps_per_full_cycle'] * \
parm_dict['BE_bins_per_read']
parm_dict['BE_bins_per_band']
if verbose:
print('\t\tNumber of bins per step: calculated: {}, actual {}'
''.format(bins_per_step, tot_bins))
if bins_per_step < tot_bins and tot_bins / bins_per_step % 1 == 0:
scale = int(tot_bins / bins_per_step)
warn('Number of actual ({}) bins per step {}X larger than '
'calculated ({}) values. Will scale VS cycles to get '
'number of bins to match'
''.format(tot_bins, bins_per_step, scale))
parm_dict['VS_number_of_cycles'] *= scale
if bins_per_step > 0:
if bins_per_step < tot_bins and tot_bins / bins_per_step % 1 == 0:
scale = int(tot_bins / bins_per_step)
warn('Number of actual ({}) bins per step {}X larger than '
'calculated ({}) values. Will scale VS cycles to get '
'number of bins to match'
''.format(tot_bins, scale, bins_per_step))
parm_dict['VS_number_of_cycles'] *= scale
else:
if verbose:
print('\t\tUnable to calculate number of bins per step '
'since one or more parameters were 0')
tot_bins = int(tot_bins) * tot_bins_multiplier
......@@ -1160,9 +1165,9 @@ class BEodfTranslator(Translator):
parm_dict['BE_points_per_step'] = 2 ** int(BE_parm_vec_1[7])
parm_dict['BE_repeats'] = 2 ** int(BE_parm_vec_1[8])
try:
parm_dict['BE_bins_per_read'] = matread['bins_per_band_s']
parm_dict['BE_bins_per_band'] = matread['bins_per_band_s']
except KeyError:
parm_dict['BE_bins_per_read'] = len(matread['bin_w'])
parm_dict['BE_bins_per_band'] = len(matread['bin_w'])
assembly_parm_vec = matread['assembly_parm_vec']
if verbose:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment