debug
This commit is contained in:
@@ -271,8 +271,13 @@ class ProgrammedSequence(fc.Readable):
|
|||||||
self.compiled_parameters['sample'] = self.read_sample()
|
self.compiled_parameters['sample'] = self.read_sample()
|
||||||
|
|
||||||
# then, load the thing into TNMR
|
# then, load the thing into TNMR
|
||||||
self.tnmr().load_sequence(filename)
|
success = self.tnmr().load_sequence(filename)
|
||||||
print(filename)
|
if not(success):
|
||||||
|
print('Retrying load sequence')
|
||||||
|
success = self.tnmr().load_sequence(filename)
|
||||||
|
if not(success):
|
||||||
|
print('WARNING: Failed!')
|
||||||
|
raise Exception()
|
||||||
|
|
||||||
# load some parameters back to TNMR
|
# load some parameters back to TNMR
|
||||||
for key, val in dashboard_params.items():
|
for key, val in dashboard_params.items():
|
||||||
|
|||||||
@@ -390,8 +390,7 @@ class TNMR:
|
|||||||
|
|
||||||
self.load_dashboard(TEMPLATE_FILE_PATH + 'dashboard.txt')
|
self.load_dashboard(TEMPLATE_FILE_PATH + 'dashboard.txt')
|
||||||
|
|
||||||
success = ntnmr.LoadSequence(filename if filename[-4:]=='.tps' else (filename+'.tps'))
|
success = ntnmr.LoadSequence((filename[:-4] if filename[-4:]=='.tps' else filename).split('/')[-1])
|
||||||
print(ntnmr.GetSequenceName())
|
|
||||||
if(success):
|
if(success):
|
||||||
print(f'Successfully loaded sequence')
|
print(f'Successfully loaded sequence')
|
||||||
else:
|
else:
|
||||||
@@ -401,15 +400,17 @@ class TNMR:
|
|||||||
ntnmr.SaveAs(TEMPLATE_FILE_PATH + 'tmper.tnt') # even more temporary
|
ntnmr.SaveAs(TEMPLATE_FILE_PATH + 'tmper.tnt') # even more temporary
|
||||||
success = ntnmr.OpenFile(TEMPLATE_FILE_PATH + 'tmper.tnt') # reload the file so that we can actually read/write to the Sequence parameters (TNMR bug)
|
success = ntnmr.OpenFile(TEMPLATE_FILE_PATH + 'tmper.tnt') # reload the file so that we can actually read/write to the Sequence parameters (TNMR bug)
|
||||||
self.set_activefile()
|
self.set_activefile()
|
||||||
print(ntnmr.GetSequenceName())
|
success_overall = ntnmr.GetSequenceName() == filename if filename[-4:]=='.tps' else (filename+'.tps')
|
||||||
|
|
||||||
if(success):
|
if(success):
|
||||||
print(f'Successfully reloaded')
|
print(f'Successfully reloaded')
|
||||||
else:
|
else:
|
||||||
print('Failed to reload')
|
print('Failed to reload')
|
||||||
return False
|
return False
|
||||||
|
if(success_overall):
|
||||||
print(f'I: Successfully loaded sequence from {filename}')
|
print(f'I: Successfully loaded sequence from {filename}')
|
||||||
|
else:
|
||||||
|
print('W: Filenames do not match for sequence!')
|
||||||
|
return False
|
||||||
return True
|
return True
|
||||||
|
|
||||||
def load_dashboard(self, dashboard_fn):
|
def load_dashboard(self, dashboard_fn):
|
||||||
|
|||||||
Reference in New Issue
Block a user