Skip to content

Commit

Permalink
fix bug with STA folders saving in align
Browse files Browse the repository at this point in the history
  • Loading branch information
elainehoml committed Feb 21, 2023
1 parent 74dc2b9 commit 2bd5143
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions src/Ot2Rec/aretomo.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,16 +157,6 @@ def _get_aretomo_recon_command(self, i):
# WBP
cmd.append('-Wbp')
cmd.append('1')

out_imod = self.params['AreTomo_setup']['out_imod']
if out_imod != "N/A":
outimod_lookup = {
"RELION4": "1",
"Warp": "2",
"Local alignment": "3",
}
cmd.append('-OutImod')
cmd.append(outimod_lookup[out_imod])

return cmd

Expand All @@ -184,6 +174,16 @@ def _run_aretomo(self, i):
recon_cmd = self._get_aretomo_recon_command(i)
cmd = recon_cmd

out_imod = self.params['AreTomo_setup']['out_imod']
if out_imod != "N/A":
outimod_lookup = {
"RELION4": "1",
"Warp": "2",
"Local alignment": "3",
}
cmd.append('-OutImod')
cmd.append(outimod_lookup[out_imod])

# Add extra kwargs
kwargs = self.params["AreTomo_kwargs"].keys()
for kwarg in kwargs:
Expand All @@ -206,11 +206,11 @@ def _run_aretomo(self, i):

# If STA files are generated save folder names to move to common folder
if self.params["AreTomo_setup"]["out_imod"] != "N/A":
input_mrc = self.params["AreTomo_setup"]["input_mrc"][i]
output_mrc = self.params["AreTomo_setup"]["output_mrc"][i]
self.sta[curr_ts] = (
f'{self.basis_folder}/'
f'{self.rootname}_{curr_ts:04d}{self.suffix}/'
f'{os.path.splitext(os.path.basename(input_mrc))[0]}_rec_Imod/'
f'{os.path.splitext(os.path.basename(output_mrc))[0]}_Imod/'
)

self.logObj(f"\nStdOut:{aretomo_run.stdout}\n")
Expand Down

0 comments on commit 2bd5143

Please sign in to comment.