Skip to content

Commit 4633ed8

Browse files
committed
env variable gymnastics
1 parent c4fee16 commit 4633ed8

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/dsst_defacing_wf.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,14 +190,15 @@ def main():
190190
f.write('\n'.join(afni_refacer_failures)) # TODO Not very useful when running the pipeline in parallel
191191

192192
# unload fsl module and use fsleyes installed on conda env
193-
run_command(f"module unload fsl")
193+
run_command(f"TMP_DISPLAY=`echo $DISPLAY`; unset $DISPLAY; module unload fsl")
194194

195195
# reorganizing the directory with defaced images into BIDS tree
196196
print(f"Reorganizing the directory with defaced images into BIDS tree...\n")
197197
reorganize_into_bids(input_dir, defacing_outputs, mapping_dict, no_clean)
198198

199199
# prep for visual inspection using visualqc deface
200200
print(f"Preparing for QC by visual inspection...\n")
201+
run_command(f"export DISPLAY=$TMP_DISPLAY;")
201202
vqcdeface_cmd = vqcdeface_prep(input_dir, defacing_outputs)
202203
print(f"Run the following command to start a VisualQC Deface session:\n\t{vqcdeface_cmd}\n")
203204
with open(output / 'QC_prep' / 'defacing_qc_cmd', 'w') as f:

0 commit comments

Comments
 (0)