waynebhayes / SANA

Simulating Annealing Network Aligner
25 stars 39 forks source link

changed sigint handler so the current alignment can be saved without stopping SANA #85

Closed rasulsafa closed 5 years ago

rasulsafa commented 5 years ago

In the past, when using CTRL+C on SANA, you would be provided with the following options:

Save alignment? (y/n)
>>

In this pull request, I have modified this behavior so that the user has the following options: exit, exit and save the alignment, or save the alignment and continue SANA.

Select an option (1 - 3):
  (1) Exit
  (2) Save Alignment and Exit
  (3) Save Alignment and Continue
>>

The first two options behave identically to the previous implementation. The third option, save alignment and continue, is what I have implemented. When that option is chosen, the current alignment and local scores will be stored in the files specified by the argument parser appended by a timestamp. For example, foo_2019-05-31_05:25:28.align or bar_2019-05-31_05:25:28.out