Skip to content

Commit 370fefc

Browse files
authored
Merge pull request #143 from neuroscout/fix_smoothing
FIX: Smoothing in fitlins occurs at incorrect level
2 parents c7231de + e2b1e41 commit 370fefc

File tree

6 files changed

+25
-10
lines changed

6 files changed

+25
-10
lines changed

Dockerfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ RUN /bin/bash -c "source activate neuro \
1717
&& pip install -q --no-cache-dir -e /src/neuroscout/" \
1818
&& sync
1919

20+
RUN /bin/bash -c "source activate neuro \
21+
&& pip install -q --no-cache-dir --upgrade git+https://github.com/poldracklab/fitlins.git@maint/0.9.x" \
22+
&& sync
23+
2024
RUN /bin/bash -c "source activate neuro \
2125
&& pip install -q --no-cache-dir --upgrade -r /src/neuroscout/requirements.txt" \
2226
&& sync

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,9 @@ Options:
4949
-w, --work-dir <dir> Optional Fitlins working directory
5050
-c, --n-cpus <n> Maximum number of threads across all processes
5151
[default: 1]
52-
-s, --smoothing <k> Smoothing kernel FWHM at group level
53-
[default: 4]
52+
-s, --smoothing <k> Smoothing to apply in format: FWHM:level:type.
53+
See fitlins documentation for more information.
54+
[default: 4:Dataset:iso]
5455
-u, --unlock Unlock datalad dataset
5556
-n, --neurovault <nv> Upload mode (disable, all, or group)
5657
[default: group]

neuroscout_cli/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = '0.5.3'
1+
__version__ = '0.5.4'

neuroscout_cli/cli.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,9 @@
1414
-w, --work-dir <dir> Optional Fitlins working directory
1515
-c, --n-cpus <n> Maximum number of threads across all processes
1616
[default: 1]
17-
-s, --smoothing <k> Smoothing kernel FWHM at group level
18-
[default: 4]
17+
-s, --smoothing <k> Smoothing to apply in format: FWHM:level:type.
18+
See fitlins documentation for more information.
19+
[default: 4:Dataset:iso]
1920
-u, --unlock Unlock datalad dataset
2021
-n, --neurovault <nv> Upload mode (disable, all, or group)
2122
[default: group]
@@ -67,5 +68,9 @@ def main():
6768
for bundle in bundles:
6869
logging.info("Analysis ID : {}".format(bundle))
6970
args['<bundle_id>'] = bundle
70-
command(deepcopy(args)).run()
71+
retcode = command(deepcopy(args)).run()
72+
73+
# If any execution fails, then exit
74+
if retcode != 0:
75+
sys.exit(retcode)
7176
sys.exit(0)

neuroscout_cli/commands/run.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ def run(self, upload_only=False):
3838
f'--model={model_path}',
3939
'--ignore=/(.*desc-confounds_regressors.*)/',
4040
f'--derivatives={str(self.bundle_dir.absolute())} {str(self.preproc_dir.absolute())}',
41-
f'--smoothing={self.options["--smoothing"]}:Dataset',
41+
f'--smoothing={self.options["--smoothing"]}',
4242
f'--estimator={self.options["--estimator"]}',
4343
f'--n-cpus={self.options["--n-cpus"]}'
4444
]
@@ -72,6 +72,7 @@ def run(self, upload_only=False):
7272
"https://github.com/neuroscout/neuroscout-cli/issues\n"
7373
"-------------------------------------------------------\n"
7474
)
75+
return retcode
7576

7677
if neurovault != 'disable':
7778
model = json.load(open(model_path, 'r'))
@@ -82,6 +83,7 @@ def run(self, upload_only=False):
8283
options = json.load((out_dir / 'options.json').open('r'))
8384
estimator = options.get('--estimator')
8485
except:
86+
options = None
8587
print("No saved options found skipping...")
8688

8789
try:
@@ -118,8 +120,11 @@ def run(self, upload_only=False):
118120
fmriprep_version=fmriprep_version,
119121
estimator=estimator,
120122
cli_version=VERSION,
123+
cli_args=options,
121124
n_subjects=n_subjects)
122125

123126
# Drop files if no separate install dir, and the user has not said otherwise.
124127
if not self.install_dir and not no_drop:
125-
drop(str(self.preproc_dir.absolute()))
128+
drop(str(self.preproc_dir.absolute()))
129+
130+
return retcode

requirements.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
docopt==0.6.2
22
datalad==0.10.2
33
tqdm
4-
pyns==0.4.7
5-
git+https://github.com/bids-standard/pybids.git@maint/0.13.x
4+
pyns==0.4.8
5+
git+https://github.com/bids-standard/pybids.git@maint/0.13.x

0 commit comments

Comments
 (0)