Skip to content

Commit e9e7e59

Browse files
committed
Updating recursion directory naming behavior.
The previous commit fixed the bug associated with 2 subtree decomposition recursions trying to write to the same directory. However, the global 'RECURSION_INDEX' attribute of the class SateAlignerJob was continuing to increment between sate iterations. This did not cause any problems, but left a less intuitive recursion directory taxonomy. This commit adds the 'reset_recursion_index' option to SateAlignerJob.__init__, which is used by sate.satejob each time a new iteration begins. As a result the recursion indices start at 0 for each sate iteration.
1 parent cdc03a4 commit e9e7e59

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

Diff for: sate/satealignerjob.py

+3
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ def __init__(self,
6565
tree,
6666
tmp_base_dir,
6767
tmp_dir_par=None,
68+
reset_recursion_index=False,
6869
**kwargs):
6970
self._job_lock = Lock()
7071
TreeHolder.__init__(self, multilocus_dataset.dataset)
@@ -86,6 +87,8 @@ def __init__(self,
8687
self.tmp_dir_par = tmp_dir_par
8788
if self.tmp_dir_par == None:
8889
self.tmp_dir_par = self.tmp_base_dir
90+
if reset_recursion_index:
91+
self.__class__.RECURSION_INDEX = 0
8992

9093
def configuration(self):
9194
d = {}

Diff for: sate/satejob.py

+1
Original file line numberDiff line numberDiff line change
@@ -356,6 +356,7 @@ def run(self, tmp_dir_par, sate_products=None):
356356
sate_team=self.sate_team,
357357
tree=tree_for_aligner,
358358
tmp_base_dir=curr_tmp_dir_par,
359+
reset_recursion_index=True,
359360
**configuration)
360361
self.sate_aligner_job = aligner
361362
aligner.launch_alignment(break_strategy=break_strategy,

0 commit comments

Comments
 (0)