Skip to content

Commit

Permalink
_fix__set_globals_and_seq_args_misprime_lib_mishyb_lib
Browse files Browse the repository at this point in the history
  • Loading branch information
grinner committed Feb 15, 2024
1 parent 5b3d006 commit d64d8e2
Showing 1 changed file with 21 additions and 14 deletions.
35 changes: 21 additions & 14 deletions primer3/thermoanalysis.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -1213,22 +1213,29 @@ cdef class _ThermoAnalysis:
err_msg = ''
try:
global_settings_data = <p3_global_settings*> self.global_settings_data
if misprime_lib != None:
mp_lib = pdh_create_seq_lib(misprime_lib)
if mp_lib == NULL:
err_msg = f'Issue creating misprime_lib {misprime_lib}'
raise ValueError(
f'Issue creating misprime_lib {misprime_lib}'
)

global_settings_data[0].p_args.repeat_lib = mp_lib
if misprime_lib is None:
misprime_lib = {}

mp_lib = pdh_create_seq_lib(misprime_lib)
if mp_lib == NULL:
err_msg = f'Issue creating misprime_lib {misprime_lib}'
raise ValueError(
f'Issue creating misprime_lib {misprime_lib}'
)

global_settings_data[0].p_args.repeat_lib = mp_lib

if mishyb_lib is None:
mishyb_lib = {}

mh_lib = pdh_create_seq_lib(mishyb_lib)
if mh_lib == NULL:
err_msg = f'Issue creating mishyb_lib: {mishyb_lib}'
raise ValueError(err_msg)

global_settings_data[0].o_args.repeat_lib = mh_lib

if mishyb_lib != None:
mh_lib = pdh_create_seq_lib(mishyb_lib)
if mh_lib == NULL:
err_msg = f'Issue creating mishyb_lib: {mishyb_lib}'
raise ValueError(err_msg)
global_settings_data[0].o_args.repeat_lib = mh_lib
except (OSError, TypeError) as exc:
p3_destroy_global_settings(
<p3_global_settings*> self.global_settings_data
Expand Down

0 comments on commit d64d8e2

Please sign in to comment.