Skip to content
Snippets Groups Projects
Commit 66e860c1 authored by Fidel Alfaro Almagro's avatar Fidel Alfaro Almagro
Browse files

Changing the way python is used in the creation of the system call

parent 6c732fc6
No related branches found
Tags 0.1.4
1 merge request!6Changing the way python is used in the creation of the system call
Pipeline #23316 passed
#!/usr/bin/env python #!/usr/bin/env python
__version__ = '0.1.3' __version__ = '0.1.4'
#!/usr/bin/env python #!/usr/bin/env python
import os import os
import sys
import math import math
import nibabel as nb import nibabel as nb
import numpy as np import numpy as np
...@@ -274,7 +275,7 @@ def dr(files, grp_maps, workdir, submit_to_cluster=True): ...@@ -274,7 +275,7 @@ def dr(files, grp_maps, workdir, submit_to_cluster=True):
# generate DR jobs # generate DR jobs
PYTHON_BIN = os.getenv('PYTHON_BIN', default='python') PYTHON_BIN = sys.executable
with open(f'{workdir}/logs/dr_commands.txt', 'w') as fpr: with open(f'{workdir}/logs/dr_commands.txt', 'w') as fpr:
df = pd.read_csv(files) df = pd.read_csv(files)
...@@ -312,7 +313,7 @@ def dr(files, grp_maps, workdir, submit_to_cluster=True): ...@@ -312,7 +313,7 @@ def dr(files, grp_maps, workdir, submit_to_cluster=True):
if not submit_to_cluster: if not submit_to_cluster:
with open(f'{workdir}/logs/dr_commands.txt', 'r') as fpr: with open(f'{workdir}/logs/dr_commands.txt', 'r') as fpr:
for command in fpr.readlines(): for command in fpr.readlines():
logger.info(' '.join(command)) logger.info(command)
output=run(command) output=run(command)
print(output) print(output)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment