Skip to content

Commit 6b2b192

Browse files
authored
[FIX] Remove goodness of fit for dataset level and update container definitions (#1265)
* misc fix * rm GoF for dataset level * install java * add zip * update changelog * add unzip * fix tests
1 parent c230335 commit 6b2b192

File tree

7 files changed

+40
-28
lines changed

7 files changed

+40
-28
lines changed

.circleci/config.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,7 @@ jobs:
202202
--space MNI152NLin2009cAsym \
203203
--skip_validation \
204204
--fwhm 0 \
205+
--participant_label 01 02 \
205206
--verbosity 3 \
206207
--options /options/ds000001.json
207208

CHANGELOG.md

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2424

2525
### Added
2626

27+
* [ENH] add Apptainer definition #1254 by @Remi-Gau and @monique2208
2728
* [ENH] allow to copy anat only on raw datasets #1181 by @Remi-Gau
2829
* [ENH] add option to concatenate runs at subject level to facilite running PPI analysis #1133 by @Remi-Gau
2930
* [ENH] allow to run substeps of substeps of the bayesian model selection #1145 by @Remi-Gau
@@ -40,7 +41,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
4041

4142
### Changed
4243

44+
* [DOC] change theme and structure of the documentation #1256 @Remi-Gau
4345
* [REF] Refactor and update CLI in #1096 @Remi-Gau
46+
* [ENH] {func}`getData` only loads anat data when requested #1257 @Remi-Gau
4447

4548
### Deprecated
4649

@@ -50,12 +53,18 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
5053

5154
### Fixed
5255

56+
* [FIX] update {func}`createDefaultStatsModel` to use proper `GroupBy` at the dataset level #1248 by @d-ni374
57+
* [FIX] make {func}`getAcquisitionTime` less brittle #1248 by @d-ni374
58+
* [FIX] fix regular expression in {func}`bidsResults` to identify contrasts #1248 by @d-ni374
59+
* [FIX] pass analysis level to stats actions when using python CLI #1258 @Remi-Gau
60+
* [FIX] remove goodness of fit from dataset level analysis as it is not supported by the MACS toolbox #1265 by @Remi-Gau
61+
* [FIX] add java and zip to container recipes to allow using nidm results with octave #1265 by @Remi-Gau
5362
* [FIX] copy the MACS toolbox to the SPM toolbox folder during the initialisation #1203 by @Remi-Gau
54-
* [FIX] save onsets.mat directly in subject stats folder #1187 by @Remi-Gau
63+
* [FIX] save `onsets.mat` directly in subject stats folder #1187 by @Remi-Gau
5564
* [FIX] do not compute subject level contrast when running dataset level #1102 by @Remi-Gau
5665
* [FIX] copy `RepetitionTime` in sidecar JSON after running smoothing in #1099 by @Remi-Gau
5766
* [FIX] rename results files (csv, tsv, png, nii) of each contrasts #1104 by @Remi-Gau
58-
* [DIX] reslice ROIS before running ROI based analysis to make sure they are at the resolution of the BOLD images in #1110 by @Remi-Gau
67+
* [FIX] reslice ROIS before running ROI based analysis to make sure they are at the resolution of the BOLD images in #1110 by @Remi-Gau
5968

6069
### Security
6170

Dockerfile

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,25 +5,28 @@ ARG DEBIAN_FRONTEND="noninteractive"
55
## basic OS tools install octave
66
RUN apt-get update -qq && \
77
apt-get -qq -y --no-install-recommends install \
8-
build-essential \
9-
software-properties-common \
108
apt-utils \
9+
build-essential \
1110
ca-certificates \
12-
git \
1311
curl \
14-
python3 \
15-
python3-pip \
12+
default-jre \
1613
fonts-freefont-otf \
1714
ghostscript \
15+
git \
1816
gnuplot-x11 \
1917
libcurl4-gnutls-dev \
20-
octave \
2118
liboctave-dev \
19+
octave \
2220
octave-common \
2321
octave-io \
2422
octave-image \
2523
octave-signal \
26-
octave-statistics && \
24+
octave-statistics \
25+
python3-pip \
26+
python3 \
27+
software-properties-common \
28+
unzip \
29+
zip && \
2730
apt-get clean && \
2831
rm -rf \
2932
/tmp/hsperfdata* \
@@ -42,7 +45,6 @@ RUN mkdir /opt/spm12 && \
4245
make -C /opt/spm12/src PLATFORM=octave install && \
4346
ln -s /opt/spm12/bin/spm12-octave /usr/local/bin/spm12
4447

45-
4648
WORKDIR /home/neuro
4749

4850
COPY . /home/neuro/bidspm

bidspm.def

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,25 +13,28 @@ From: bids/base_validator:1.13.1
1313
%post
1414
apt-get -qq update
1515
DEBIAN_FRONTEND=noninteractive apt-get --yes --quiet install \
16-
build-essential \
17-
software-properties-common \
1816
apt-utils \
17+
build-essential \
1918
ca-certificates \
20-
git \
2119
curl \
22-
python3 \
23-
python3-pip \
20+
default-jre \
2421
fonts-freefont-otf \
2522
ghostscript \
23+
git \
2624
gnuplot-x11 \
2725
libcurl4-gnutls-dev \
28-
octave \
2926
liboctave-dev \
27+
octave \
3028
octave-common \
3129
octave-io \
3230
octave-image \
3331
octave-signal \
34-
octave-statistics && \
32+
octave-statistics \
33+
python3-pip \
34+
python3 \
35+
software-properties-common \
36+
unzip \
37+
zip && \
3538
apt-get clean && \
3639
rm -rf \
3740
/tmp/hsperfdata* \

demos/openneuro/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ data_ds000001:
2323
cd inputs/ds000001-fmriprep && datalad get sub-0[1-2]/func/*json -J 12
2424
cd inputs/ds000001-fmriprep && datalad get sub-0[1-2]/anat/*MNI*desc-preproc*.nii.gz -J 12
2525
cd inputs/ds000001-fmriprep && datalad get sub-0[1-2]/func/*MNI*desc-preproc*.nii.gz -J 12
26-
cd inputs/ds000001-fmriprep && datalad get sub-0[1-2]/func/*MNI*desc-*bold.nii.gz -J 12
26+
cd inputs/ds000001-fmriprep && datalad get sub-0[1-2]/func/*MNI*desc-*bold.nii.gz -J 12
2727

2828
data_ds000114:
2929
mkdir -p inputs

src/batches/stats/setBatchEstimateModel.m

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,6 @@
9191

9292
matlabbatch = returnEstimateModelBatch(matlabbatch, spmMatFile, opt);
9393
opt.orderBatches.estimate = numel(matlabbatch);
94-
matlabbatch = setBatchGoodnessOfFit(matlabbatch, opt);
9594
matlabbatch = setBatchInformationCriteria(matlabbatch, opt, rfxDir);
9695

9796
matlabbatch{end + 1}.spm.stats.review.spmmat = spmMatFile; %#ok<*AGROW>

tests/tests_slow/tests_workflows/stats/test_bidsRFX.m

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ function test_bidsRFX_rfx()
1919
% 2 dummy contrasts
2020
% 2 contrasts
2121
nbGroupLevelModels = 4;
22-
nbBatchPerModel = 8;
22+
nbBatchPerModel = 7;
2323
if bids.internal.is_octave()
2424
nbBatchPerModel = 5;
2525
end
@@ -35,7 +35,7 @@ function test_bidsRFX_rfx()
3535

3636
% setBatchEstimateModel creates 3 batches for each model (estimate, review, figure)
3737
batchOrder = extendBatchOrder();
38-
idx = 9:6:(nbGroupLevelModels * nbBatchPerModel);
38+
idx = 9:5:(nbGroupLevelModels * nbBatchPerModel);
3939
if bids.internal.is_octave()
4040
idx = 9:3:(nbGroupLevelModels * nbBatchPerModel);
4141
end
@@ -57,7 +57,7 @@ function test_bidsRFX_no_overwrite_smoke_test()
5757

5858
matlabbatch = bidsRFX('RFX', opt);
5959

60-
expectedNbBatch = 8;
60+
expectedNbBatch = 7;
6161
if bids.internal.is_octave()
6262
expectedNbBatch = 5;
6363
end
@@ -80,14 +80,13 @@ function test_bidsRFX_within_group_ttest()
8080
if bids.internal.is_octave()
8181
assertEqual(numel(matlabbatch), 10);
8282
else
83-
assertEqual(numel(matlabbatch), 16);
83+
assertEqual(numel(matlabbatch), 14);
8484
end
8585

8686
% creates 1 batch for
8787
% - specify
8888
% - figure
8989
% - estimate
90-
% - MACS: goodness of fit
9190
% - MACS: model space
9291
% - MACS: information criteria
9392
% - review
@@ -110,7 +109,7 @@ function test_bidsRFX_within_group_ttest()
110109
fileparts(matlabbatch{8}.spm.stats.fmri_est.spmmat{1}));
111110
else
112111
assertEqual(matlabbatch{3}.spm.stats.factorial_design.dir{1}, ...
113-
fileparts(matlabbatch{11}.spm.stats.fmri_est.spmmat{1}));
112+
fileparts(matlabbatch{10}.spm.stats.fmri_est.spmmat{1}));
114113
end
115114

116115
end
@@ -191,7 +190,7 @@ function test_bidsRFX_several_datasets_level()
191190
assertEqual(summary, batchOrder);
192191

193192
nbGroupLevelModelsReturned = 1;
194-
nbBatchPerModel = 8;
193+
nbBatchPerModel = 7;
195194
if bids.internal.is_octave()
196195
nbBatchPerModel = 5;
197196
end
@@ -250,13 +249,12 @@ function test_bidsRFX_contrast()
250249
batchOrder = {};
251250
end
252251
extension = {'stats', 'fmri_est'; ...
253-
'tools', 'MACS'; ... % skip on octave
254252
'tools', 'MACS'; ...
255253
'tools', 'MACS'; ...
256254
'stats', 'review'; ...
257255
'util', 'print'};
258256
if bids.internal.is_octave()
259-
extension(2:4, :) = [];
257+
extension(2:3, :) = [];
260258
end
261259
batchOrder = cat(1, batchOrder, extension);
262260
end

0 commit comments

Comments
 (0)