From 2ef5cca8288b7cba9fa933c75621fcb67c4e2a64 Mon Sep 17 00:00:00 2001
From: "allcontributors[bot]"
<46447321+allcontributors[bot]@users.noreply.github.com>
Date: Mon, 15 Mar 2021 21:59:05 +0000
Subject: [PATCH 01/18] docs: update README.md [skip ci]
---
README.md | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/README.md b/README.md
index 4f90d642..b9ed94b4 100644
--- a/README.md
+++ b/README.md
@@ -21,7 +21,7 @@
**Contributors**
-[](#contributors-)
+[](#contributors-)
@@ -105,10 +105,13 @@ Thanks goes to these wonderful people
 CerenB π π π π» π |
 Fede F. π |
+  MichΓ¨le MacLean π» π€ |
 Mohamed Rezk π» π π¨ |
 OliColli π» π¨ π |
 Remi Gau π» π π π¨ π π β οΈ |
 anege π» π¨ |
+
+
 marcobarilari π» π¨ π π β οΈ π |
From bb7e3aead208e90a4c08258361c6643a77d2f188 Mon Sep 17 00:00:00 2001
From: "allcontributors[bot]"
<46447321+allcontributors[bot]@users.noreply.github.com>
Date: Mon, 15 Mar 2021 21:59:06 +0000
Subject: [PATCH 02/18] docs: update .all-contributorsrc [skip ci]
---
.all-contributorsrc | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/.all-contributorsrc b/.all-contributorsrc
index ebdd3ba0..3faa2c18 100644
--- a/.all-contributorsrc
+++ b/.all-contributorsrc
@@ -88,6 +88,16 @@
"code",
"review"
]
+ },
+ {
+ "login": "mwmaclean",
+ "name": "Michèle MacLean",
+ "avatar_url": "https://avatars.githubusercontent.com/u/54547865?v=4",
+ "profile": "https://github.com/mwmaclean",
+ "contributions": [
+ "code",
+ "ideas"
+ ]
}
],
"contributorsPerLine": 7,
From 16d66552c5acceaeece37850c48d4981c9bf424b Mon Sep 17 00:00:00 2001
From: Remi Gau
Date: Mon, 12 Apr 2021 14:47:51 +0200
Subject: [PATCH 03/18] update version.txt
---
version.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/version.txt b/version.txt
index 81fd7ba0..60453e69 100644
--- a/version.txt
+++ b/version.txt
@@ -1 +1 @@
-v0.2.0
\ No newline at end of file
+v1.0.0
\ No newline at end of file
From 606e61d2e87a2f80d46f90786d400082267352d4 Mon Sep 17 00:00:00 2001
From: Remi Gau
Date: Mon, 12 Apr 2021 16:17:39 +0200
Subject: [PATCH 04/18] fix system test
---
.github/workflows/run_system_tests.yml | 17 ++-------
demos/MoAE/MoAE_run.m | 7 ++--
demos/MoAE/options/options_task-auditory.json | 17 ++-------
...ptions_task-auditory_space-individual.json | 12 ++----
.../options_task-auditory_unwarp-0.json | 12 ++----
...sk-auditory_unwarp-0_space-individual.json | 12 ++----
manualTests/systemTestMoAE.m | 37 ++++++++-----------
src/utils/setFields.m | 4 +-
src/workflows/bidsFFX.m | 14 +++----
src/workflows/bidsRoiBasedGLM.m | 12 +++---
tests/test_loadAndCheckOptions.m | 20 ++++++++++
11 files changed, 73 insertions(+), 91 deletions(-)
diff --git a/.github/workflows/run_system_tests.yml b/.github/workflows/run_system_tests.yml
index 8f0f845e..2761d9c6 100644
--- a/.github/workflows/run_system_tests.yml
+++ b/.github/workflows/run_system_tests.yml
@@ -56,20 +56,9 @@ jobs:
make -C spm12/src PLATFORM=octave install
octave $OCTFLAGS --eval "addpath(fullfile(pwd, 'spm12')); savepath();"
- - name: Update octave path
- run: |
- octave $OCTFLAGS --eval "initCppSpm; savepath();"
-
- - name: Prepare data
- run: |
- inputs_folder='demos/MoAE/inputs/'
- mkdir $inputs_folder
- curl http://www.fil.ion.ucl.ac.uk/spm/download/data/MoAEpilot/MoAEpilot.bids.zip --output $inputs_folder'MoAEpilot.zip'
- unzip $inputs_folder'MoAEpilot.zip' -d $inputs_folder
- mv $inputs_folder/MoAEpilot $inputs_folder/raw
-
+
- name: Run system tests
run: |
- cd demos/MoAE
- octave $OCTFLAGS --eval "MoAEpilot_run"
+ cd manualTests/
+ octave $OCTFLAGS --eval "systemTestMoAE"
diff --git a/demos/MoAE/MoAE_run.m b/demos/MoAE/MoAE_run.m
index bee7d73d..3fdf6315 100644
--- a/demos/MoAE/MoAE_run.m
+++ b/demos/MoAE/MoAE_run.m
@@ -27,9 +27,8 @@
bidsCopyRawFolder(opt, 1);
% In case you just want to run segmentation and skull stripping
-
-bidsSegmentSkullStrip(opt);
-
+% bidsSegmentSkullStrip(opt);
+%
% NOTE: skull stripping is also included in 'bidsSpatialPrepro'
bidsSTC(opt);
@@ -43,7 +42,7 @@
bidsSmoothing(FWHM, opt);
-% The following crash on Travis CI
+% The following crash on CI
bidsFFX('specifyAndEstimate', opt, FWHM);
bidsFFX('contrasts', opt, FWHM);
bidsResults(opt, FWHM);
diff --git a/demos/MoAE/options/options_task-auditory.json b/demos/MoAE/options/options_task-auditory.json
index 00982156..198477b0 100644
--- a/demos/MoAE/options/options_task-auditory.json
+++ b/demos/MoAE/options/options_task-auditory.json
@@ -1,19 +1,12 @@
{
- "STC_referenceSlice": [],
"anatReference": {
"type": "T1w",
- "session": 1
+ "session": ""
},
- "contrastList": [],
- "dataDir": "/home/remi/github/CPP_SPM/demos/MoAE/output/MoAEpilot",
- "derivativesDir": "/home/remi/github/CPP_SPM/demos/MoAE/derivatives/default",
- "funcVoxelDims": [],
- "groups": [""],
+ "dataDir": "./inputs/raw",
+ "derivativesDir": "./outputs/",
"model": {
- "file": "/home/remi/github/CPP_SPM/demos/MoAE/models/model-MoAE_smdl.json"
- },
- "realign": {
- "useUnwarp": true
+ "file": "./models/model-MoAE_smdl.json"
},
"result": {
"Steps": {
@@ -41,9 +34,7 @@
"skullstrip": {
"threshold": 0.75
},
- "sliceOrder": [],
"space": "MNI",
- "subjects": [[]],
"taskName": "auditory",
"useFieldmaps": true,
"zeropad": 2
diff --git a/demos/MoAE/options/options_task-auditory_space-individual.json b/demos/MoAE/options/options_task-auditory_space-individual.json
index 346b482b..4abd8a40 100644
--- a/demos/MoAE/options/options_task-auditory_space-individual.json
+++ b/demos/MoAE/options/options_task-auditory_space-individual.json
@@ -1,15 +1,12 @@
{
- "STC_referenceSlice": [],
"anatReference": {
"type": "T1w",
- "session": 1
+ "session": ""
},
- "contrastList": [],
- "dataDir": "/home/remi/github/CPP_SPM/demos/MoAE/output/MoAEpilot",
- "derivativesDir": "/home/remi/github/CPP_SPM/demos/MoAE/derivatives/native",
- "funcVoxelDims": [],
+ "dataDir": "./inputs/raw",
+ "derivativesDir": "./outputs/",
"model": {
- "file": "/home/remi/github/CPP_SPM/demos/MoAE/models/model-MoAE_smdl.json"
+ "file": "./models/model-MoAE_smdl.json"
},
"realign": {
"useUnwarp": true
@@ -40,7 +37,6 @@
"skullstrip": {
"threshold": 0.75
},
- "sliceOrder": [],
"space": "individual",
"taskName": "auditory",
"useFieldmaps": true,
diff --git a/demos/MoAE/options/options_task-auditory_unwarp-0.json b/demos/MoAE/options/options_task-auditory_unwarp-0.json
index 009b8147..8430077f 100644
--- a/demos/MoAE/options/options_task-auditory_unwarp-0.json
+++ b/demos/MoAE/options/options_task-auditory_unwarp-0.json
@@ -1,15 +1,12 @@
{
- "STC_referenceSlice": [],
"anatReference": {
"type": "T1w",
- "session": 1
+ "session": ""
},
- "contrastList": [],
- "dataDir": "/home/remi/github/CPP_SPM/demos/MoAE/output/MoAEpilot",
- "derivativesDir": "/home/remi/github/CPP_SPM/demos/MoAE/derivatives/unwarp-0",
- "funcVoxelDims": [],
+ "dataDir": "./inputs/raw",
+ "derivativesDir": "./outputs/",
"model": {
- "file": "/home/remi/github/CPP_SPM/demos/MoAE/models/model-MoAE_smdl.json"
+ "file": "./models/model-MoAE_smdl.json"
},
"realign": {
"useUnwarp": false
@@ -40,7 +37,6 @@
"skullstrip": {
"threshold": 0.75
},
- "sliceOrder": [],
"space": "MNI",
"taskName": "auditory",
"useFieldmaps": true,
diff --git a/demos/MoAE/options/options_task-auditory_unwarp-0_space-individual.json b/demos/MoAE/options/options_task-auditory_unwarp-0_space-individual.json
index 6dd7198f..2d1a17e5 100644
--- a/demos/MoAE/options/options_task-auditory_unwarp-0_space-individual.json
+++ b/demos/MoAE/options/options_task-auditory_unwarp-0_space-individual.json
@@ -1,15 +1,12 @@
{
- "STC_referenceSlice": [],
"anatReference": {
"type": "T1w",
- "session": 1
+ "session": ""
},
- "contrastList": [],
- "dataDir": "/home/remi/github/CPP_SPM/demos/MoAE/output/MoAEpilot",
- "derivativesDir": "/home/remi/github/CPP_SPM/demos/MoAE/derivatives/unwarp-0_native",
- "funcVoxelDims": [],
+ "dataDir": "./inputs/raw",
+ "derivativesDir": "./outputs/",
"model": {
- "file": "/home/remi/github/CPP_SPM/demos/MoAE/models/model-MoAE_smdl.json"
+ "file": "./models/model-MoAE_smdl.json"
},
"realign": {
"useUnwarp": false
@@ -40,7 +37,6 @@
"skullstrip": {
"threshold": 0.75
},
- "sliceOrder": [],
"space": "individual",
"taskName": "auditory",
"useFieldmaps": true,
diff --git a/manualTests/systemTestMoAE.m b/manualTests/systemTestMoAE.m
index a2b87437..ad7553aa 100644
--- a/manualTests/systemTestMoAE.m
+++ b/manualTests/systemTestMoAE.m
@@ -17,6 +17,8 @@
% Smoothing to apply
FWHM = 6;
+downloadData = true;
+
% URL of the data set to download
URL = 'http://www.fil.ion.ucl.ac.uk/spm/download/data/MoAEpilot/MoAEpilot.bids.zip';
@@ -24,24 +26,11 @@
WD = fullfile(fileparts(mfilename('fullpath')), '..', 'demos', 'MoAE');
cd(WD);
-% we add all the subfunctions that are in the sub directories
-addpath(genpath(fullfile(WD, '..', '..', 'src')));
-addpath(genpath(fullfile(WD, '..', '..', 'lib')));
-
-%% Get data
-fprintf('%-10s:', 'Downloading dataset...');
-urlwrite(URL, 'MoAEpilot.zip');
-fprintf(1, ' Done\n\n');
-
-fprintf('%-10s:', 'Unzipping dataset...');
-unzip('MoAEpilot.zip', fullfile(WD, 'output'));
-fprintf(1, ' Done\n\n');
+run ../../initCppSpm.m;
-checkDependencies();
+dowload_MoAE_ds(downloadData);
%% Set up
-delete(fullfile(pwd, 'options_task-*date-*.json'));
-
optionsFilesList = { ...
'options_task-auditory.json'; ...
'options_task-auditory_unwarp-0.json'; ...
@@ -53,7 +42,7 @@
fprintf(1, repmat('\n', 1, 5));
- optionJsonFile = optionsFilesList{iOption};
+ optionJsonFile = fullfile(WD, 'options', optionsFilesList{iOption});
opt = loadAndCheckOptions(optionJsonFile);
%% Run batches
@@ -66,17 +55,21 @@
bidsSpatialPrepro(opt);
- % The following do not run on octave for now (because of spmup)
- anatomicalQA(opt);
+ % Some of the following do not run on octave for now (because of spmup)
+ % Crashes in CI
+ % anatomicalQA(opt);
+
bidsResliceTpmToFunc(opt);
- functionalQA(opt);
+
+ % Crashes in CI
+ % functionalQA(opt);
bidsSmoothing(FWHM, opt);
% The following crash on Travis CI
- bidsFFX('specifyAndEstimate', opt, FWHM);
- bidsFFX('contrasts', opt, FWHM);
- bidsResults(opt, FWHM);
+ % bidsFFX('specifyAndEstimate', opt, FWHM);
+ % bidsFFX('contrasts', opt, FWHM);
+ % bidsResults(opt, FWHM);
cd(WD);
diff --git a/src/utils/setFields.m b/src/utils/setFields.m
index 907dcb7a..31cefc41 100644
--- a/src/utils/setFields.m
+++ b/src/utils/setFields.m
@@ -68,6 +68,8 @@
function structure = setFieldToIfNotPresent(structure, fieldName, value)
if ~isfield(structure, fieldName)
- structure.(fieldName) = value;
+ for i = 1:numel(structure)
+ structure(i).(fieldName) = value;
+ end
end
end
diff --git a/src/workflows/bidsFFX.m b/src/workflows/bidsFFX.m
index 5765e289..730e166f 100644
--- a/src/workflows/bidsFFX.m
+++ b/src/workflows/bidsFFX.m
@@ -27,14 +27,14 @@ function bidsFFX(action, opt, funcFWHM)
% For unsmoothed data ``funcFWHM = 0``, for smoothed data ``funcFWHM = ... mm``.
% In this way we can make multiple ffx for different smoothing degrees.
%
-
+
if opt.glm.roibased.do
- message = sprintf(...
- ['The option opt.glm.roibased.do is set to true.\n', ...
- ' Change the option to false to use this workflow or\n', ...
- ' use the bidsRoiBasedGLM workflow to run roi based GLM.']);
- error(message);
- end
+ message = sprintf( ...
+ ['The option opt.glm.roibased.do is set to true.\n', ...
+ ' Change the option to false to use this workflow or\n', ...
+ ' use the bidsRoiBasedGLM workflow to run roi based GLM.']);
+ error(message);
+ end
[BIDS, opt] = setUpWorkflow(opt, 'subject level GLM');
diff --git a/src/workflows/bidsRoiBasedGLM.m b/src/workflows/bidsRoiBasedGLM.m
index fdc02688..65cd8a68 100644
--- a/src/workflows/bidsRoiBasedGLM.m
+++ b/src/workflows/bidsRoiBasedGLM.m
@@ -3,13 +3,13 @@
function bidsRoiBasedGLM(opt)
%
%
-
+
if ~opt.glm.roibased.do
- message = sprintf(...
- ['The option opt.glm.roibased.do is set to false.\n', ...
- ' Change the option to true to use this workflow or\n', ...
- ' use the bidsFFX workflow to run whole brain GLM.']);
- error(message);
+ message = sprintf( ...
+ ['The option opt.glm.roibased.do is set to false.\n', ...
+ ' Change the option to true to use this workflow or\n', ...
+ ' use the bidsFFX workflow to run whole brain GLM.']);
+ error(message);
end
funcFWHM = 0;
diff --git a/tests/test_loadAndCheckOptions.m b/tests/test_loadAndCheckOptions.m
index c06e2bb8..10cc6746 100644
--- a/tests/test_loadAndCheckOptions.m
+++ b/tests/test_loadAndCheckOptions.m
@@ -109,3 +109,23 @@ function test_loadAndCheckOptionsFromSeveralFiles()
assertEqual(opt, expectedOptions);
end
+
+function test_loadAndCheckOptionsMoAE()
+
+ WD = fullfile('..', 'demos', 'MoAE/');
+
+ optionsFilesList = { ...
+ 'options_task-auditory.json'; ...
+ 'options_task-auditory_unwarp-0.json'; ...
+ 'options_task-auditory_unwarp-0_space-individual.json'; ...
+ 'options_task-auditory_space-individual.json'};
+
+ for iOption = 1:size(optionsFilesList, 1)
+
+ fprintf(1, repmat('\n', 1, 5));
+
+ optionJsonFile = fullfile(WD, 'options', optionsFilesList{iOption});
+ opt = loadAndCheckOptions(optionJsonFile);
+ end
+
+end
From cb9bb8347308edfb67add68b1920e457bc2e9c6b Mon Sep 17 00:00:00 2001
From: Remi Gau
Date: Mon, 12 Apr 2021 16:28:48 +0200
Subject: [PATCH 05/18] update miss hit CI
---
.../{miss_hit.yml => miss_hit_quality.yml} | 6 +---
.github/workflows/miss_hit_style.yml | 28 +++++++++++++++++++
requirements.txt | 2 +-
3 files changed, 30 insertions(+), 6 deletions(-)
rename .github/workflows/{miss_hit.yml => miss_hit_quality.yml} (86%)
create mode 100644 .github/workflows/miss_hit_style.yml
diff --git a/.github/workflows/miss_hit.yml b/.github/workflows/miss_hit_quality.yml
similarity index 86%
rename from .github/workflows/miss_hit.yml
rename to .github/workflows/miss_hit_quality.yml
index 5c5e561d..9ff86d1f 100644
--- a/.github/workflows/miss_hit.yml
+++ b/.github/workflows/miss_hit_quality.yml
@@ -1,4 +1,4 @@
-name: miss_hit
+name: miss_hit_quality
on:
push:
@@ -29,10 +29,6 @@ jobs:
python -m pip install --upgrade pip setuptools
pip3 install -r requirements.txt
- - name: MISS_HIT Code style
- run: |
- mh_style --process-slx
-
- name: MISS_HIT Metrics
run: |
mh_metric --ci
diff --git a/.github/workflows/miss_hit_style.yml b/.github/workflows/miss_hit_style.yml
new file mode 100644
index 00000000..544e37d1
--- /dev/null
+++ b/.github/workflows/miss_hit_style.yml
@@ -0,0 +1,28 @@
+name: miss_hit_style
+
+on: push: branches: - master pull_request: branches: '\*'
+
+jobs: build:
+
+ runs-on: ubuntu-latest
+
+ steps:
+
+ - uses: actions/checkout@v2
+ with:
+ submodules: true
+ fetch-depth: 1
+
+ - name: Set up Python 3.6
+ uses: actions/setup-python@v2
+ with:
+ python-version: 3.6
+
+ - name: Install dependencies
+ run: |
+ python -m pip install --upgrade pip setuptools
+ pip3 install -r requirements.txt
+
+ - name: MISS_HIT Code style
+ run: |
+ mh_style
diff --git a/requirements.txt b/requirements.txt
index 992d0ece..578e596a 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -2,4 +2,4 @@ Sphinx
sphinxcontrib-matlabdomain
sphinxcontrib-napoleon
sphinx_rtd_theme
-miss_hit==0.9.15
\ No newline at end of file
+miss_hit==0.9.20
\ No newline at end of file
From 12fc88facebe136b4940ea645222068e179b57e0 Mon Sep 17 00:00:00 2001
From: Remi Gau
Date: Mon, 12 Apr 2021 16:31:47 +0200
Subject: [PATCH 06/18] update MH CI
---
.github/workflows/miss_hit_style.yml | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/.github/workflows/miss_hit_style.yml b/.github/workflows/miss_hit_style.yml
index 544e37d1..17e5bdca 100644
--- a/.github/workflows/miss_hit_style.yml
+++ b/.github/workflows/miss_hit_style.yml
@@ -1,8 +1,14 @@
name: miss_hit_style
-on: push: branches: - master pull_request: branches: '\*'
+on:
+ push:
+ branches:
+ - master
+ pull_request:
+ branches: '*'
-jobs: build:
+jobs:
+ build:
runs-on: ubuntu-latest
@@ -26,3 +32,4 @@ jobs: build:
- name: MISS_HIT Code style
run: |
mh_style
+
From dc49fe5003f3041efa086b4d0fab88b12bf24581 Mon Sep 17 00:00:00 2001
From: Remi Gau
Date: Mon, 12 Apr 2021 17:31:56 +0200
Subject: [PATCH 07/18] adapt file naming schema for scripts and demo folder
---
.github/workflows/run_tests.yml | 2 +-
demos/miss_hit.cfg | 13 +------------
.../{ds000001_getOption.m => ds000001_get_option.m} | 2 +-
.../{ds000114_getOption.m => ds000114_get_option.m} | 2 +-
.../{ds001168_getOption.m => ds001168_get_option.m} | 2 +-
demos/spm_face_rep/face_rep_func.m | 2 +-
.../{FaceRep_getOption.m => face_rep_get_option.m} | 2 +-
...ptionResults.m => face_rep_get_option_results.m} | 2 +-
demos/spm_face_rep/face_rep_resolution.m | 2 +-
demos/spm_face_rep/face_rep_roi_analysis.m | 2 +-
demos/vismotion/batch.m | 2 +-
demos/vismotion/{getOption.m => get_option.m} | 5 ++---
manualTests/miss_hit.cfg | 9 +++++++++
manualTests/{systemTestDS114.m => test_ds114.m} | 0
manualTests/{systemTestMoAE.m => test_moae.m} | 0
miss_hit.cfg | 3 ++-
runTests.m => run_tests.m | 0
17 files changed, 24 insertions(+), 26 deletions(-)
rename demos/openneuro/{ds000001_getOption.m => ds000001_get_option.m} (97%)
rename demos/openneuro/{ds000114_getOption.m => ds000114_get_option.m} (97%)
rename demos/openneuro/{ds001168_getOption.m => ds001168_get_option.m} (95%)
rename demos/spm_face_rep/{FaceRep_getOption.m => face_rep_get_option.m} (92%)
rename demos/spm_face_rep/{FaceRep_getOptionResults.m => face_rep_get_option_results.m} (95%)
rename demos/vismotion/{getOption.m => get_option.m} (89%)
create mode 100644 manualTests/miss_hit.cfg
rename manualTests/{systemTestDS114.m => test_ds114.m} (100%)
rename manualTests/{systemTestMoAE.m => test_moae.m} (100%)
rename runTests.m => run_tests.m (100%)
diff --git a/.github/workflows/run_tests.yml b/.github/workflows/run_tests.yml
index 3ad370d8..b9f64864 100644
--- a/.github/workflows/run_tests.yml
+++ b/.github/workflows/run_tests.yml
@@ -78,7 +78,7 @@ jobs:
- name: Run tests
run: |
- octave $OCTFLAGS --eval "runTests"
+ octave $OCTFLAGS --eval "run_tests"
cat test_report.log | grep 0
bash <(curl -s https://codecov.io/bash)
diff --git a/demos/miss_hit.cfg b/demos/miss_hit.cfg
index 25947f2d..007bd432 100644
--- a/demos/miss_hit.cfg
+++ b/demos/miss_hit.cfg
@@ -1,12 +1 @@
-# styly guide (https://florianschanda.github.io/miss_hit/style_checker.html)
-line_length: 100
-regex_function_name: "[a-zA-Z0-9]+(_*([a-zA-Z0-9]){1}[A-Za-z]+)*" # almost anything goes in the root folder
-copyright_entity: "Mohamed Rezk"
-copyright_entity: "Remi Gau"
-copyright_entity: "CPP BIDS SPM-pipeline developpers"
-
-# metrics limit for the code quality (https://florianschanda.github.io/miss_hit/metrics.html)
-metric "cnest": limit 4
-metric "file_length": limit 400
-metric "cyc": limit 12
-metric "parameters": limit 6
\ No newline at end of file
+regex_function_name: "[a-z0-9]+(_[a-z0-9]+)*"
\ No newline at end of file
diff --git a/demos/openneuro/ds000001_getOption.m b/demos/openneuro/ds000001_get_option.m
similarity index 97%
rename from demos/openneuro/ds000001_getOption.m
rename to demos/openneuro/ds000001_get_option.m
index b468ef5b..e100723d 100644
--- a/demos/openneuro/ds000001_getOption.m
+++ b/demos/openneuro/ds000001_get_option.m
@@ -1,6 +1,6 @@
% (C) Copyright 2020 CPP BIDS SPM-pipeline developers
-function opt = ds000001_getOption()
+function opt = ds000001_get_option()
% returns a structure that contains the options chosen by the user to run
% slice timing correction, pre-processing, FFX, RFX.
diff --git a/demos/openneuro/ds000114_getOption.m b/demos/openneuro/ds000114_get_option.m
similarity index 97%
rename from demos/openneuro/ds000114_getOption.m
rename to demos/openneuro/ds000114_get_option.m
index 5797314e..ed6dccf5 100644
--- a/demos/openneuro/ds000114_getOption.m
+++ b/demos/openneuro/ds000114_get_option.m
@@ -1,6 +1,6 @@
% (C) Copyright 2020 CPP BIDS SPM-pipeline developers
-function opt = ds000114_getOption()
+function opt = ds000114_get_option()
% returns a structure that contains the options chosen by the user to run
% slice timing correction, pre-processing, FFX, RFX.
diff --git a/demos/openneuro/ds001168_getOption.m b/demos/openneuro/ds001168_get_option.m
similarity index 95%
rename from demos/openneuro/ds001168_getOption.m
rename to demos/openneuro/ds001168_get_option.m
index 6a6ebfb4..5abd5ce0 100644
--- a/demos/openneuro/ds001168_getOption.m
+++ b/demos/openneuro/ds001168_get_option.m
@@ -1,6 +1,6 @@
% (C) Copyright 2020 CPP BIDS SPM-pipeline developers
-function opt = ds001168_getOption()
+function opt = ds001168_get_option()
% returns a structure that contains the options chosen by the user to run
% slice timing correction, pre-processing, FFX, RFX.
diff --git a/demos/spm_face_rep/face_rep_func.m b/demos/spm_face_rep/face_rep_func.m
index 5a104a5b..817ac8e8 100644
--- a/demos/spm_face_rep/face_rep_func.m
+++ b/demos/spm_face_rep/face_rep_func.m
@@ -24,7 +24,7 @@
run ../../initCppSpm.m;
%% Set options
-opt = FaceRep_getOption();
+opt = face_rep_get_option();
%% Removes previous analysis, gets data and converts it to BIDS
if downloadData
diff --git a/demos/spm_face_rep/FaceRep_getOption.m b/demos/spm_face_rep/face_rep_get_option.m
similarity index 92%
rename from demos/spm_face_rep/FaceRep_getOption.m
rename to demos/spm_face_rep/face_rep_get_option.m
index 660accd7..1e4200d1 100644
--- a/demos/spm_face_rep/FaceRep_getOption.m
+++ b/demos/spm_face_rep/face_rep_get_option.m
@@ -1,6 +1,6 @@
% (C) Copyright 2020 Remi Gau
-function opt = FaceRep_getOption()
+function opt = face_rep_get_option()
% returns a structure that contains the options chosen by the user to run
% slice timing correction, pre-processing, FFX, RFX.
diff --git a/demos/spm_face_rep/FaceRep_getOptionResults.m b/demos/spm_face_rep/face_rep_get_option_results.m
similarity index 95%
rename from demos/spm_face_rep/FaceRep_getOptionResults.m
rename to demos/spm_face_rep/face_rep_get_option_results.m
index 541fc08a..015206f3 100644
--- a/demos/spm_face_rep/FaceRep_getOptionResults.m
+++ b/demos/spm_face_rep/face_rep_get_option_results.m
@@ -1,6 +1,6 @@
% (C) Copyright 2021 Remi Gau
-function opt = FaceRep_getOptionResults()
+function opt = face_rep_get_option_results()
opt = FaceRep_getOption();
diff --git a/demos/spm_face_rep/face_rep_resolution.m b/demos/spm_face_rep/face_rep_resolution.m
index 3e2ec99e..9b3c225b 100644
--- a/demos/spm_face_rep/face_rep_resolution.m
+++ b/demos/spm_face_rep/face_rep_resolution.m
@@ -17,7 +17,7 @@
%% Set options
-opt = FaceRep_getOptionResults();
+opt = face_rep_get_option_results();
%% Removes previous analysis, gets data and converts it to BIDS
if downloadData
diff --git a/demos/spm_face_rep/face_rep_roi_analysis.m b/demos/spm_face_rep/face_rep_roi_analysis.m
index dc8b8af3..0f2985d2 100644
--- a/demos/spm_face_rep/face_rep_roi_analysis.m
+++ b/demos/spm_face_rep/face_rep_roi_analysis.m
@@ -5,7 +5,7 @@
run face_rep_anat.m;
-opt = FaceRep_getOption();
+opt = face_rep_get_option();
opt.roi.atlas = 'wang';
opt.roi.name = {'V1v', 'V1d'};
diff --git a/demos/vismotion/batch.m b/demos/vismotion/batch.m
index ce2ef814..9de35e96 100644
--- a/demos/vismotion/batch.m
+++ b/demos/vismotion/batch.m
@@ -9,7 +9,7 @@
run ../../initCppSpm.m;
%% Run batches
-opt = getOption();
+opt = get_option();
reportBIDS(opt);
diff --git a/demos/vismotion/getOption.m b/demos/vismotion/get_option.m
similarity index 89%
rename from demos/vismotion/getOption.m
rename to demos/vismotion/get_option.m
index dca50692..d528a3c8 100644
--- a/demos/vismotion/getOption.m
+++ b/demos/vismotion/get_option.m
@@ -1,6 +1,6 @@
% (C) Copyright 2019 CPP BIDS SPM-pipeline developers
-function opt = getOption()
+function opt = get_option()
% opt = getOption()
% returns a structure that contains the options chosen by the user to run
% slice timing correction, pre-processing, FFX, RFX.
@@ -17,8 +17,7 @@
opt.derivativesDir = '/home/remi/Documents';
% specify the model file that contains the contrasts to compute
- opt.model.file = ...
- '/home/remi/github/CPP_BIDS_SPM_pipeline/demos/vismotion/models/model-visMotionLoc_smdl.json';
+ opt.model.file = './vismotion/models/model-visMotionLoc_smdl.json';
% specify the result to compute
% Contrasts.Name has to match one of the contrast defined in the model json file
diff --git a/manualTests/miss_hit.cfg b/manualTests/miss_hit.cfg
new file mode 100644
index 00000000..d4c4fc66
--- /dev/null
+++ b/manualTests/miss_hit.cfg
@@ -0,0 +1,9 @@
+# style guide (https://florianschanda.github.io/miss_hit/style_checker.html)
+line_length: 100
+regex_function_name: "(test(_unit){0,1}_[a-z]+|[a-z]+)(([A-Z]){1}[A-Za-z0-9]+)*"
+
+# metrics limit for the code quality (https://florianschanda.github.io/miss_hit/metrics.html)
+metric "cnest": limit 4
+metric "file_length": limit 500
+metric "cyc": limit 15
+metric "parameters": limit 5
\ No newline at end of file
diff --git a/manualTests/systemTestDS114.m b/manualTests/test_ds114.m
similarity index 100%
rename from manualTests/systemTestDS114.m
rename to manualTests/test_ds114.m
diff --git a/manualTests/systemTestMoAE.m b/manualTests/test_moae.m
similarity index 100%
rename from manualTests/systemTestMoAE.m
rename to manualTests/test_moae.m
diff --git a/miss_hit.cfg b/miss_hit.cfg
index bce4b86c..a9572eb3 100644
--- a/miss_hit.cfg
+++ b/miss_hit.cfg
@@ -1,6 +1,7 @@
# styly guide (https://florianschanda.github.io/miss_hit/style_checker.html)
line_length: 100
-regex_function_name: "[a-z]+(_*([a-zA-Z0-9]){1}[A-Za-z]+)*"
+regex_function_name: "[a-z]+([a-zA-Z0-9]){1}[a-zA-Z0-9]+"
+regex_script_name: "[a-z0-9]+(_[a-z0-9]+)*"
exclude_dir: "lib"
copyright_entity: "JH"
copyright_entity: "DSS"
diff --git a/runTests.m b/run_tests.m
similarity index 100%
rename from runTests.m
rename to run_tests.m
From 369ff071b3a62ceba08218aa35f099387f432d60 Mon Sep 17 00:00:00 2001
From: Remi Gau
Date: Mon, 12 Apr 2021 18:11:11 +0200
Subject: [PATCH 08/18] rename demo folders and files
---
demos/MoAE/{dowload_MoAE_ds.m => dowload_moae_ds.m} | 2 +-
...eate_roi_extract_data.m => moae_create_roi_extract_data.m} | 2 +-
demos/MoAE/{MoAE_getOption.m => moae_get_option.m} | 2 +-
demos/MoAE/{MoAE_run.m => moae_run.m} | 4 ++--
demos/MoAE/{MoAE_slice_display.m => moae_slice_display.m} | 4 ++--
.../dowload_convert_face_rep_ds.m | 0
demos/{spm_face_rep => face_repetition}/face_rep_anat.m | 0
demos/{spm_face_rep => face_repetition}/face_rep_func.m | 0
demos/{spm_face_rep => face_repetition}/face_rep_get_option.m | 0
.../face_rep_get_option_results.m | 0
demos/{spm_face_rep => face_repetition}/face_rep_resolution.m | 0
.../{spm_face_rep => face_repetition}/face_rep_roi_analysis.m | 0
.../models/model-faceRepetition_smdl.json | 0
.../batchLesion.m => lesion_detection/batch_lesion.m} | 0
.../lesion_get_option.m} | 2 +-
manualTests/test_moae.m | 2 +-
16 files changed, 9 insertions(+), 9 deletions(-)
rename demos/MoAE/{dowload_MoAE_ds.m => dowload_moae_ds.m} (95%)
rename demos/MoAE/{MoAE_create_roi_extract_data.m => moae_create_roi_extract_data.m} (98%)
rename demos/MoAE/{MoAE_getOption.m => moae_get_option.m} (98%)
rename demos/MoAE/{MoAE_run.m => moae_run.m} (94%)
rename demos/MoAE/{MoAE_slice_display.m => moae_slice_display.m} (96%)
rename demos/{spm_face_rep => face_repetition}/dowload_convert_face_rep_ds.m (100%)
rename demos/{spm_face_rep => face_repetition}/face_rep_anat.m (100%)
rename demos/{spm_face_rep => face_repetition}/face_rep_func.m (100%)
rename demos/{spm_face_rep => face_repetition}/face_rep_get_option.m (100%)
rename demos/{spm_face_rep => face_repetition}/face_rep_get_option_results.m (100%)
rename demos/{spm_face_rep => face_repetition}/face_rep_resolution.m (100%)
rename demos/{spm_face_rep => face_repetition}/face_rep_roi_analysis.m (100%)
rename demos/{spm_face_rep => face_repetition}/models/model-faceRepetition_smdl.json (100%)
rename demos/{lesiondetection/batchLesion.m => lesion_detection/batch_lesion.m} (100%)
rename demos/{lesiondetection/Lesion_getOption.m => lesion_detection/lesion_get_option.m} (92%)
diff --git a/demos/MoAE/dowload_MoAE_ds.m b/demos/MoAE/dowload_moae_ds.m
similarity index 95%
rename from demos/MoAE/dowload_MoAE_ds.m
rename to demos/MoAE/dowload_moae_ds.m
index f0be3cf9..2f89e4ea 100644
--- a/demos/MoAE/dowload_MoAE_ds.m
+++ b/demos/MoAE/dowload_moae_ds.m
@@ -1,6 +1,6 @@
% (C) Copyright 2021 Remi Gau
-function dowload_MoAE_ds(downloadData)
+function dowload_moae_ds(downloadData)
if downloadData
diff --git a/demos/MoAE/MoAE_create_roi_extract_data.m b/demos/MoAE/moae_create_roi_extract_data.m
similarity index 98%
rename from demos/MoAE/MoAE_create_roi_extract_data.m
rename to demos/MoAE/moae_create_roi_extract_data.m
index 22e0a5be..accf97bd 100644
--- a/demos/MoAE/MoAE_create_roi_extract_data.m
+++ b/demos/MoAE/moae_create_roi_extract_data.m
@@ -6,7 +6,7 @@
% we are going to extract the value from.
%
-run MoAE_run.m;
+run moae_run.m;
subLabel = '01';
diff --git a/demos/MoAE/MoAE_getOption.m b/demos/MoAE/moae_get_option.m
similarity index 98%
rename from demos/MoAE/MoAE_getOption.m
rename to demos/MoAE/moae_get_option.m
index e36f9976..d37c8ea0 100644
--- a/demos/MoAE/MoAE_getOption.m
+++ b/demos/MoAE/moae_get_option.m
@@ -1,6 +1,6 @@
% (C) Copyright 2019 Remi Gau
-function opt = MoAE_getOption()
+function opt = moae_get_option()
% returns a structure that contains the options chosen by the user to run
% slice timing correction, pre-processing, FFX, RFX.
diff --git a/demos/MoAE/MoAE_run.m b/demos/MoAE/moae_run.m
similarity index 94%
rename from demos/MoAE/MoAE_run.m
rename to demos/MoAE/moae_run.m
index 3fdf6315..9e1ed4d4 100644
--- a/demos/MoAE/MoAE_run.m
+++ b/demos/MoAE/moae_run.m
@@ -18,9 +18,9 @@
run ../../initCppSpm.m;
%% Set options
-opt = MoAE_getOption();
+opt = moae_get_option();
-dowload_MoAE_ds(downloadData);
+dowload_moae_ds(downloadData);
%% Run batches
reportBIDS(opt);
diff --git a/demos/MoAE/MoAE_slice_display.m b/demos/MoAE/moae_slice_display.m
similarity index 96%
rename from demos/MoAE/MoAE_slice_display.m
rename to demos/MoAE/moae_slice_display.m
index bf370a0c..dfd712f0 100644
--- a/demos/MoAE/MoAE_slice_display.m
+++ b/demos/MoAE/moae_slice_display.m
@@ -1,7 +1,7 @@
% (C) Copyright 2021 Remi Gau
-run MoAE_run.m;
-run MoAE_create_roi_extract_data.m;
+run moae_run.m;
+run moae_create_roi_extract_data.m;
close all;
diff --git a/demos/spm_face_rep/dowload_convert_face_rep_ds.m b/demos/face_repetition/dowload_convert_face_rep_ds.m
similarity index 100%
rename from demos/spm_face_rep/dowload_convert_face_rep_ds.m
rename to demos/face_repetition/dowload_convert_face_rep_ds.m
diff --git a/demos/spm_face_rep/face_rep_anat.m b/demos/face_repetition/face_rep_anat.m
similarity index 100%
rename from demos/spm_face_rep/face_rep_anat.m
rename to demos/face_repetition/face_rep_anat.m
diff --git a/demos/spm_face_rep/face_rep_func.m b/demos/face_repetition/face_rep_func.m
similarity index 100%
rename from demos/spm_face_rep/face_rep_func.m
rename to demos/face_repetition/face_rep_func.m
diff --git a/demos/spm_face_rep/face_rep_get_option.m b/demos/face_repetition/face_rep_get_option.m
similarity index 100%
rename from demos/spm_face_rep/face_rep_get_option.m
rename to demos/face_repetition/face_rep_get_option.m
diff --git a/demos/spm_face_rep/face_rep_get_option_results.m b/demos/face_repetition/face_rep_get_option_results.m
similarity index 100%
rename from demos/spm_face_rep/face_rep_get_option_results.m
rename to demos/face_repetition/face_rep_get_option_results.m
diff --git a/demos/spm_face_rep/face_rep_resolution.m b/demos/face_repetition/face_rep_resolution.m
similarity index 100%
rename from demos/spm_face_rep/face_rep_resolution.m
rename to demos/face_repetition/face_rep_resolution.m
diff --git a/demos/spm_face_rep/face_rep_roi_analysis.m b/demos/face_repetition/face_rep_roi_analysis.m
similarity index 100%
rename from demos/spm_face_rep/face_rep_roi_analysis.m
rename to demos/face_repetition/face_rep_roi_analysis.m
diff --git a/demos/spm_face_rep/models/model-faceRepetition_smdl.json b/demos/face_repetition/models/model-faceRepetition_smdl.json
similarity index 100%
rename from demos/spm_face_rep/models/model-faceRepetition_smdl.json
rename to demos/face_repetition/models/model-faceRepetition_smdl.json
diff --git a/demos/lesiondetection/batchLesion.m b/demos/lesion_detection/batch_lesion.m
similarity index 100%
rename from demos/lesiondetection/batchLesion.m
rename to demos/lesion_detection/batch_lesion.m
diff --git a/demos/lesiondetection/Lesion_getOption.m b/demos/lesion_detection/lesion_get_option.m
similarity index 92%
rename from demos/lesiondetection/Lesion_getOption.m
rename to demos/lesion_detection/lesion_get_option.m
index 04e97c78..e2c3f7fd 100644
--- a/demos/lesiondetection/Lesion_getOption.m
+++ b/demos/lesion_detection/lesion_get_option.m
@@ -1,6 +1,6 @@
% (C) Copyright 2021 CPP BIDS SPM-pipeline developers
-function opt = Lesion_getOption()
+function opt = lesion_get_option()
%
% Returns a structure that contains the options chosen by the user to run the source processing
% batch workflow
diff --git a/manualTests/test_moae.m b/manualTests/test_moae.m
index ad7553aa..24f89528 100644
--- a/manualTests/test_moae.m
+++ b/manualTests/test_moae.m
@@ -28,7 +28,7 @@
run ../../initCppSpm.m;
-dowload_MoAE_ds(downloadData);
+dowload_moae_ds(downloadData);
%% Set up
optionsFilesList = { ...
From 0912e9a74abcebc902ae80234033e49175f989d9 Mon Sep 17 00:00:00 2001
From: Remi Gau
Date: Mon, 12 Apr 2021 19:44:11 +0200
Subject: [PATCH 09/18] update test load and check
---
tests/test_loadAndCheckOptions.m | 20 ++++++--------------
tests/utils/setOptions.m | 3 +++
2 files changed, 9 insertions(+), 14 deletions(-)
diff --git a/tests/test_loadAndCheckOptions.m b/tests/test_loadAndCheckOptions.m
index 10cc6746..ffebbb79 100644
--- a/tests/test_loadAndCheckOptions.m
+++ b/tests/test_loadAndCheckOptions.m
@@ -112,20 +112,12 @@ function test_loadAndCheckOptionsFromSeveralFiles()
function test_loadAndCheckOptionsMoAE()
- WD = fullfile('..', 'demos', 'MoAE/');
+ jsonContent = setOptions('MoAE');
+
+ optionJsonFile = fullfile(pwd, 'cfg', 'options_task-auditory.json');
+ spm_jsonwrite(optionJsonFile, jsonContent);
+
+ opt = loadAndCheckOptions(optionJsonFile);
- optionsFilesList = { ...
- 'options_task-auditory.json'; ...
- 'options_task-auditory_unwarp-0.json'; ...
- 'options_task-auditory_unwarp-0_space-individual.json'; ...
- 'options_task-auditory_space-individual.json'};
-
- for iOption = 1:size(optionsFilesList, 1)
-
- fprintf(1, repmat('\n', 1, 5));
-
- optionJsonFile = fullfile(WD, 'options', optionsFilesList{iOption});
- opt = loadAndCheckOptions(optionJsonFile);
- end
end
diff --git a/tests/utils/setOptions.m b/tests/utils/setOptions.m
index 9e12acb8..d942c47d 100644
--- a/tests/utils/setOptions.m
+++ b/tests/utils/setOptions.m
@@ -14,6 +14,9 @@
'..', '..', 'demos', 'MoAE', 'models', 'model-MoAE_smdl.json');
opt.taskName = 'auditory';
+
+ opt.result.Steps.Contrasts(1).Name = 'listening';
+ opt.result.Steps.Contrasts(2).Name = 'listening_inf_baseline';
else
From a9c9a0921510d93b94ece6f7a8fbd6a546d25994 Mon Sep 17 00:00:00 2001
From: Remi Gau
Date: Mon, 12 Apr 2021 20:40:01 +0200
Subject: [PATCH 10/18] mh fix
---
tests/test_loadAndCheckOptions.m | 5 ++---
tests/utils/setOptions.m | 2 +-
2 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/tests/test_loadAndCheckOptions.m b/tests/test_loadAndCheckOptions.m
index ffebbb79..30d32184 100644
--- a/tests/test_loadAndCheckOptions.m
+++ b/tests/test_loadAndCheckOptions.m
@@ -113,11 +113,10 @@ function test_loadAndCheckOptionsFromSeveralFiles()
function test_loadAndCheckOptionsMoAE()
jsonContent = setOptions('MoAE');
-
+
optionJsonFile = fullfile(pwd, 'cfg', 'options_task-auditory.json');
spm_jsonwrite(optionJsonFile, jsonContent);
-
- opt = loadAndCheckOptions(optionJsonFile);
+ opt = loadAndCheckOptions(optionJsonFile);
end
diff --git a/tests/utils/setOptions.m b/tests/utils/setOptions.m
index d942c47d..69b291bb 100644
--- a/tests/utils/setOptions.m
+++ b/tests/utils/setOptions.m
@@ -14,7 +14,7 @@
'..', '..', 'demos', 'MoAE', 'models', 'model-MoAE_smdl.json');
opt.taskName = 'auditory';
-
+
opt.result.Steps.Contrasts(1).Name = 'listening';
opt.result.Steps.Contrasts(2).Name = 'listening_inf_baseline';
From ed1ba36ac06de8a8ec751f9c8e4a6f94020c1c7c Mon Sep 17 00:00:00 2001
From: Remi Gau
Date: Tue, 13 Apr 2021 09:11:24 +0200
Subject: [PATCH 11/18] update READMEs
---
CONTRIBUTING.md | 346 ---------------------------------------------
README.md | 14 +-
tests/README.md | 94 ++----------
tests/miss_hit.cfg | 8 --
4 files changed, 28 insertions(+), 434 deletions(-)
delete mode 100644 CONTRIBUTING.md
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
deleted file mode 100644
index 88b79e16..00000000
--- a/CONTRIBUTING.md
+++ /dev/null
@@ -1,346 +0,0 @@
-# Contributing
-
-## Unit testing
-
-All tests are in the test folder. There is also an empty dummy BIDS dataset that
-is partly created using the bash script `createDummyDataSet.sh`.
-
-## Changelog
-
-
-
-
diff --git a/README.md b/README.md
index ab193907..d4bdb3ef 100644
--- a/README.md
+++ b/README.md
@@ -35,7 +35,7 @@ This is a set of functions to MRI analysis on a
## Installation
-TODO
+
We strongly recommend using the CPP fMRI analysis template repository (INSERT
URL) to use CPP_SPM.
@@ -125,6 +125,18 @@ or you get stuck: it is more likely we did not do good enough a job at
explaining things. So do not hesitate to open an issue, just to ask for
clarification.
+### Style guidelines
+
+These are some of the guidelines we try to follow.
+
+We use `camelCase` to name functions and variables for the vast majority of the
+code in this repository.
+
+Scripts names in general and as well functions related to the demos use a
+`snake_case`.
+
+Constant are written in `UPPERCASE`.
+
## Contributors
Thanks goes to these wonderful people
diff --git a/tests/README.md b/tests/README.md
index dfeb791c..9a2931f3 100644
--- a/tests/README.md
+++ b/tests/README.md
@@ -7,57 +7,27 @@ If you are not sure what unit and integration tests are, check the excellent
chapter about that in the
[Turing way](https://the-turing-way.netlify.app/reproducible-research/testing.html).
-## How to run the tests
-
-### Install MoxUnit
-
-You need to install
-[MOxUnit for matlab and octave](https://github.com/MOxUnit/MOxUnit) to run the
-tests.
-
-Note the install procedure will require you to have
-[git](https://git-scm.com/downloads) installed on your computer. If you don't,
-you can always download the MoxUnit code with this
-[link](https://github.com/MOxUnit/MOxUnit/archive/master.zip).
-
-Run the following from a terminal in the folder where you want to install
-MOxUnit. The `make install` command will find Matlab / Octave on your system and
-make sure it plays nice with MoxUnit.
-
-NOTE: only type in the terminal what is after the `$` sign:
-
-```bash
-# get the code for MOxUnit with git
-git clone https://github.com/MOxUnit/MOxUnit.git
-# enter the newly created folder and set up MoxUnit
-cd MOxUnit
-make install
-```
-
-If you want to check the code coverage on your computer, you can also install
-[MOcov for matlab and octave](https://github.com/MOcov/MOcov). Note that this is
-also part of the continuous integration of the bids-matlab, so you don't need to
-do this.
-
-To run the tests, make sure the `tests/utils` folder has bee added to the Matlab
-/ Octave path
+See
+[HERE](https://github.com/cpp-lln-lab/.github/blob/main/CONTRIBUTING.md#how-to-run-the-tests)
+for general information on how to run the tests.
## Add helper functions to the path
-There are a some help functions you need to add to the Matlab / Octave path to run the tests:
+There are a some help functions you need to add to the Matlab / Octave path to
+run the tests:
```
addpath(fullfile('tests', 'utils'))
```
-### Install the test data
+## Install the test data
You need to run a bash script to create some empty data files:
From within the `tests` folder.
```
-sh createDummyDataSet.sh
+sh createDummyDataSet.sh
```
### Run the tests
@@ -72,50 +42,16 @@ moxunit_runtests tests
moxunit_runtests tests -verbose
```
-## Adding more tests
-
-You can use the following function template to write more tests.
-
-```matlab
-function test_suite = test_functionToTest()
- % This top function is necessary for mox unit to run tests.
- % DO NOT CHANGE IT except to adapt the name of the function.
- try % assignment of 'localfunctions' is necessary in Matlab >= 2016
- test_functions = localfunctions(); %#ok<*NASGU>
- catch % no problem; early Matlab versions can use initTestSuite fine
- end
- initTestSuite;
-end
+## Adding tests
-function test_function_to_test_basic()
+See
+[HERE](https://github.com/cpp-lln-lab/.github/blob/main/CONTRIBUTING.md#adding-more-tests)
+to add more tests
- %% set up
+### Style guidelines
+#### Filenames
- %% data to test against
+- unit tests names: test*unit*\*
-
- %% test
- % assertTrue( );
- % assertFalse( );
- % assertEqual( );
-
-end
-
-
-function test_function_to_test_other_usecase()
-
- %% set up
-
-
- %% data to test against
-
-
- %% test
- % assertTrue( );
- % assertFalse( );
- % assertEqual( );
-
-end
-
-```
+- other tests names: test\_\*
diff --git a/tests/miss_hit.cfg b/tests/miss_hit.cfg
index d4c4fc66..684e5239 100644
--- a/tests/miss_hit.cfg
+++ b/tests/miss_hit.cfg
@@ -1,9 +1 @@
-# style guide (https://florianschanda.github.io/miss_hit/style_checker.html)
-line_length: 100
regex_function_name: "(test(_unit){0,1}_[a-z]+|[a-z]+)(([A-Z]){1}[A-Za-z0-9]+)*"
-
-# metrics limit for the code quality (https://florianschanda.github.io/miss_hit/metrics.html)
-metric "cnest": limit 4
-metric "file_length": limit 500
-metric "cyc": limit 15
-metric "parameters": limit 5
\ No newline at end of file
From cc2085cac6543516ff6ea0f58ac0b993b67ce1a1 Mon Sep 17 00:00:00 2001
From: Remi Gau
Date: Tue, 13 Apr 2021 09:28:45 +0200
Subject: [PATCH 12/18] update copyright demos
---
demos/MoAE/{dowload_moae_ds.m => download_moae_ds.m} | 6 +++---
demos/MoAE/moae_get_option.m | 5 +++--
demos/MoAE/moae_run.m | 2 +-
demos/MoAE/return_normalized_anat_file.m | 4 ++--
demos/face_repetition/dowload_convert_face_rep_ds.m | 7 +++----
demos/face_repetition/face_rep_anat.m | 6 ++----
demos/face_repetition/face_rep_func.m | 4 ++--
demos/face_repetition/face_rep_get_option.m | 5 +++--
demos/face_repetition/face_rep_get_option_results.m | 6 +++---
demos/face_repetition/face_rep_resolution.m | 3 +--
demos/face_repetition/face_rep_roi_analysis.m | 3 ++-
demos/lesion_detection/batch_lesion.m | 2 +-
demos/lesion_detection/lesion_get_option.m | 4 ++--
demos/openneuro/ds000001_get_option.m | 5 +++--
demos/openneuro/ds000001_run.m | 2 +-
demos/openneuro/ds000114_get_option.m | 6 ++++--
demos/openneuro/ds000114_run.m | 2 +-
demos/openneuro/ds001168_get_option.m | 6 ++++--
demos/openneuro/ds001168_run.m | 2 +-
demos/vismotion/batch.m | 2 +-
demos/vismotion/get_option.m | 8 +++++---
manualTests/miss_hit.cfg | 8 --------
miss_hit.cfg | 2 +-
23 files changed, 49 insertions(+), 51 deletions(-)
rename demos/MoAE/{dowload_moae_ds.m => download_moae_ds.m} (90%)
diff --git a/demos/MoAE/dowload_moae_ds.m b/demos/MoAE/download_moae_ds.m
similarity index 90%
rename from demos/MoAE/dowload_moae_ds.m
rename to demos/MoAE/download_moae_ds.m
index 2f89e4ea..03fc0621 100644
--- a/demos/MoAE/dowload_moae_ds.m
+++ b/demos/MoAE/download_moae_ds.m
@@ -1,6 +1,6 @@
-% (C) Copyright 2021 Remi Gau
-
-function dowload_moae_ds(downloadData)
+function download_moae_ds(downloadData)
+ %
+ % (C) Copyright 2021 Remi Gau
if downloadData
diff --git a/demos/MoAE/moae_get_option.m b/demos/MoAE/moae_get_option.m
index d37c8ea0..40110173 100644
--- a/demos/MoAE/moae_get_option.m
+++ b/demos/MoAE/moae_get_option.m
@@ -1,8 +1,9 @@
-% (C) Copyright 2019 Remi Gau
-
function opt = moae_get_option()
+ %
% returns a structure that contains the options chosen by the user to run
% slice timing correction, pre-processing, FFX, RFX.
+ %
+ % (C) Copyright 2019 Remi Gau
opt = [];
diff --git a/demos/MoAE/moae_run.m b/demos/MoAE/moae_run.m
index 9e1ed4d4..bdb12880 100644
--- a/demos/MoAE/moae_run.m
+++ b/demos/MoAE/moae_run.m
@@ -20,7 +20,7 @@
%% Set options
opt = moae_get_option();
-dowload_moae_ds(downloadData);
+download_moae_ds(downloadData);
%% Run batches
reportBIDS(opt);
diff --git a/demos/MoAE/return_normalized_anat_file.m b/demos/MoAE/return_normalized_anat_file.m
index b6a3627f..785543dc 100644
--- a/demos/MoAE/return_normalized_anat_file.m
+++ b/demos/MoAE/return_normalized_anat_file.m
@@ -1,6 +1,6 @@
-% (C) Copyright 2021 Remi Gau
-
function [anat_normalized_file, anatRange] = return_normalized_anat_file(opt, subLabel)
+ %
+ % (C) Copyright 2021 Remi Gau
[BIDS, opt] = getData(opt);
[~, anatDataDir] = getAnatFilename(BIDS, subLabel, opt);
diff --git a/demos/face_repetition/dowload_convert_face_rep_ds.m b/demos/face_repetition/dowload_convert_face_rep_ds.m
index a57bc975..72a901f7 100644
--- a/demos/face_repetition/dowload_convert_face_rep_ds.m
+++ b/demos/face_repetition/dowload_convert_face_rep_ds.m
@@ -1,12 +1,11 @@
-% (C) Copyright 2020 CPP BIDS SPM-pipeline developers
-
-function dowload_convert_face_rep_ds()
+function download_convert_face_rep_ds()
%
- % downloads the fare repetition dataset from SPM and convert it to BIDS
+ % downloads the face repetition dataset from SPM and convert it to BIDS
%
% Adapted from its counterpart for MoAE
%
%
+ % (C) Copyright 2020 CPP_SPM developers
subject = 'sub-01';
task_name = 'face repetition';
diff --git a/demos/face_repetition/face_rep_anat.m b/demos/face_repetition/face_rep_anat.m
index 0df75713..eac2850b 100644
--- a/demos/face_repetition/face_rep_anat.m
+++ b/demos/face_repetition/face_rep_anat.m
@@ -1,7 +1,5 @@
% (C) Copyright 2019 Remi Gau
-
-% This script will download the face repetition dataset from the FIL
-% and will run the basic preprocessing, FFX and contrasts on it.
+%
%
% This show how an anat only workflow would look like
%
@@ -22,7 +20,7 @@
%% Removes previous analysis, gets data and converts it to BIDS
if downloadData
- dowload_convert_face_rep_ds();
+ download_convert_face_rep_ds();
end
diff --git a/demos/face_repetition/face_rep_func.m b/demos/face_repetition/face_rep_func.m
index 817ac8e8..b8817171 100644
--- a/demos/face_repetition/face_rep_func.m
+++ b/demos/face_repetition/face_rep_func.m
@@ -1,5 +1,5 @@
% (C) Copyright 2019 Remi Gau
-
+%
% This script will download the face repetition dataset from the FIL
% and will run the basic preprocessing, FFX and contrasts on it.
%
@@ -29,7 +29,7 @@
%% Removes previous analysis, gets data and converts it to BIDS
if downloadData
- dowload_convert_face_rep_ds();
+ download_convert_face_rep_ds();
end
diff --git a/demos/face_repetition/face_rep_get_option.m b/demos/face_repetition/face_rep_get_option.m
index 1e4200d1..ea0293e3 100644
--- a/demos/face_repetition/face_rep_get_option.m
+++ b/demos/face_repetition/face_rep_get_option.m
@@ -1,8 +1,9 @@
-% (C) Copyright 2020 Remi Gau
-
function opt = face_rep_get_option()
+ %
% returns a structure that contains the options chosen by the user to run
% slice timing correction, pre-processing, FFX, RFX.
+ %
+ % (C) Copyright 2020 Remi Gau
opt = [];
diff --git a/demos/face_repetition/face_rep_get_option_results.m b/demos/face_repetition/face_rep_get_option_results.m
index 015206f3..8b36c80c 100644
--- a/demos/face_repetition/face_rep_get_option_results.m
+++ b/demos/face_repetition/face_rep_get_option_results.m
@@ -1,8 +1,8 @@
-% (C) Copyright 2021 Remi Gau
-
function opt = face_rep_get_option_results()
+ %
+ % (C) Copyright 2021 Remi Gau
- opt = FaceRep_getOption();
+ opt = face_rep_get_option();
opt.model.file = fullfile( ...
fileparts(mfilename('fullpath')), ...
diff --git a/demos/face_repetition/face_rep_resolution.m b/demos/face_repetition/face_rep_resolution.m
index 9b3c225b..7aa4b0c3 100644
--- a/demos/face_repetition/face_rep_resolution.m
+++ b/demos/face_repetition/face_rep_resolution.m
@@ -1,6 +1,5 @@
% (C) Copyright 2019 Remi Gau
-
-% adapted from face_rep_fun
+%
%
% runs preprocessing with different final spatial resolution in MNI space
%
diff --git a/demos/face_repetition/face_rep_roi_analysis.m b/demos/face_repetition/face_rep_roi_analysis.m
index 0f2985d2..4799bd3c 100644
--- a/demos/face_repetition/face_rep_roi_analysis.m
+++ b/demos/face_repetition/face_rep_roi_analysis.m
@@ -1,7 +1,8 @@
% (C) Copyright 2019 Remi Gau
-
+%
% creates a ROI in MNI space from the proba atlas
% creates its equivalent in subject space
+%
run face_rep_anat.m;
diff --git a/demos/lesion_detection/batch_lesion.m b/demos/lesion_detection/batch_lesion.m
index 7e66dc7c..87de2b2b 100644
--- a/demos/lesion_detection/batch_lesion.m
+++ b/demos/lesion_detection/batch_lesion.m
@@ -1,4 +1,4 @@
-% (C) Copyright 2021 CPP BIDS SPM-pipeline developers
+% (C) Copyright 2021 CPP_SPM developers
clear;
clc;
diff --git a/demos/lesion_detection/lesion_get_option.m b/demos/lesion_detection/lesion_get_option.m
index e2c3f7fd..2da9718f 100644
--- a/demos/lesion_detection/lesion_get_option.m
+++ b/demos/lesion_detection/lesion_get_option.m
@@ -1,5 +1,3 @@
-% (C) Copyright 2021 CPP BIDS SPM-pipeline developers
-
function opt = lesion_get_option()
%
% Returns a structure that contains the options chosen by the user to run the source processing
@@ -10,6 +8,8 @@
% opt = Lesion_getOption()
%
% :returns: - :optSource: (struct)
+ %
+ % (C) Copyright 2021 CPP_SPM developers
% The directory where the data are located
opt.dataDir = '/home/remi/gin/CVI-Datalad/data';
diff --git a/demos/openneuro/ds000001_get_option.m b/demos/openneuro/ds000001_get_option.m
index e100723d..8d9daa1b 100644
--- a/demos/openneuro/ds000001_get_option.m
+++ b/demos/openneuro/ds000001_get_option.m
@@ -1,8 +1,9 @@
-% (C) Copyright 2020 CPP BIDS SPM-pipeline developers
-
function opt = ds000001_get_option()
+ %
% returns a structure that contains the options chosen by the user to run
% slice timing correction, pre-processing, FFX, RFX.
+ %
+ % (C) Copyright 2020 CPP_SPM developers
if nargin < 1
opt = [];
diff --git a/demos/openneuro/ds000001_run.m b/demos/openneuro/ds000001_run.m
index 8e1ce6fc..98f9fa99 100644
--- a/demos/openneuro/ds000001_run.m
+++ b/demos/openneuro/ds000001_run.m
@@ -1,4 +1,4 @@
-% (C) Copyright 2020 CPP BIDS SPM-pipeline developers
+% (C) Copyright 2020 CPP_SPM developers
% runDs00014
diff --git a/demos/openneuro/ds000114_get_option.m b/demos/openneuro/ds000114_get_option.m
index ed6dccf5..caf9fd1c 100644
--- a/demos/openneuro/ds000114_get_option.m
+++ b/demos/openneuro/ds000114_get_option.m
@@ -1,8 +1,10 @@
-% (C) Copyright 2020 CPP BIDS SPM-pipeline developers
-
function opt = ds000114_get_option()
+ %
% returns a structure that contains the options chosen by the user to run
% slice timing correction, pre-processing, FFX, RFX.
+ %
+ %
+ % (C) Copyright 2020 CPP_SPM developers
if nargin < 1
opt = [];
diff --git a/demos/openneuro/ds000114_run.m b/demos/openneuro/ds000114_run.m
index 56f61cfd..ce8719c1 100644
--- a/demos/openneuro/ds000114_run.m
+++ b/demos/openneuro/ds000114_run.m
@@ -1,4 +1,4 @@
-% (C) Copyright 2020 CPP BIDS SPM-pipeline developers
+% (C) Copyright 2020 CPP_SPM developers
% runDs00014
diff --git a/demos/openneuro/ds001168_get_option.m b/demos/openneuro/ds001168_get_option.m
index 5abd5ce0..ce65ee10 100644
--- a/demos/openneuro/ds001168_get_option.m
+++ b/demos/openneuro/ds001168_get_option.m
@@ -1,8 +1,10 @@
-% (C) Copyright 2020 CPP BIDS SPM-pipeline developers
-
function opt = ds001168_get_option()
+ %
% returns a structure that contains the options chosen by the user to run
% slice timing correction, pre-processing, FFX, RFX.
+ %
+ %
+ % (C) Copyright 2020 CPP_SPM developers
if nargin < 1
opt = [];
diff --git a/demos/openneuro/ds001168_run.m b/demos/openneuro/ds001168_run.m
index 701c88c1..262a7688 100644
--- a/demos/openneuro/ds001168_run.m
+++ b/demos/openneuro/ds001168_run.m
@@ -1,4 +1,4 @@
-% (C) Copyright 2020 CPP BIDS SPM-pipeline developers
+% (C) Copyright 2020 CPP_SPM developers
% runDs001168
diff --git a/demos/vismotion/batch.m b/demos/vismotion/batch.m
index 9de35e96..b88ef07b 100644
--- a/demos/vismotion/batch.m
+++ b/demos/vismotion/batch.m
@@ -1,4 +1,4 @@
-% (C) Copyright 2019 CPP BIDS SPM-pipeline developers
+% (C) Copyright 2019 CPP_SPM developers
clear;
clc;
diff --git a/demos/vismotion/get_option.m b/demos/vismotion/get_option.m
index d528a3c8..1671e4f7 100644
--- a/demos/vismotion/get_option.m
+++ b/demos/vismotion/get_option.m
@@ -1,9 +1,11 @@
-% (C) Copyright 2019 CPP BIDS SPM-pipeline developers
-
function opt = get_option()
- % opt = getOption()
+ %
% returns a structure that contains the options chosen by the user to run
% slice timing correction, pre-processing, FFX, RFX.
+ %
+ % opt = get_option()
+ %
+ % (C) Copyright 2019 CPP_SPM developers
if nargin < 1
opt = [];
diff --git a/manualTests/miss_hit.cfg b/manualTests/miss_hit.cfg
index d4c4fc66..684e5239 100644
--- a/manualTests/miss_hit.cfg
+++ b/manualTests/miss_hit.cfg
@@ -1,9 +1 @@
-# style guide (https://florianschanda.github.io/miss_hit/style_checker.html)
-line_length: 100
regex_function_name: "(test(_unit){0,1}_[a-z]+|[a-z]+)(([A-Z]){1}[A-Za-z0-9]+)*"
-
-# metrics limit for the code quality (https://florianschanda.github.io/miss_hit/metrics.html)
-metric "cnest": limit 4
-metric "file_length": limit 500
-metric "cyc": limit 15
-metric "parameters": limit 5
\ No newline at end of file
diff --git a/miss_hit.cfg b/miss_hit.cfg
index a9572eb3..8fdd4e43 100644
--- a/miss_hit.cfg
+++ b/miss_hit.cfg
@@ -9,7 +9,7 @@ copyright_entity: "Agah Karakuzu"
copyright_entity: "Olivier Collignon"
copyright_entity: "Mohamed Rezk"
copyright_entity: "Remi Gau"
-copyright_entity: "CPP BIDS SPM-pipeline developers"
+copyright_entity: "CPP_SPM developers"
tab_width: 2
From c18f57798e44cbe2a27edda214af862e7be59066 Mon Sep 17 00:00:00 2001
From: Remi Gau
Date: Tue, 13 Apr 2021 09:33:24 +0200
Subject: [PATCH 13/18] fix copyright tests
---
tests/test_bidsCopyRawFolder.m | 2 +-
tests/test_checkOptions.m | 2 +-
tests/test_createAndReturnOnsetFile.m | 2 +-
tests/test_createDefaultModel.m | 2 +-
tests/test_getAnatFilename.m | 2 +-
tests/test_getBoldFilename.m | 2 +-
tests/test_getBoldFilenameForFFX.m | 2 +-
tests/test_getData.m | 2 +-
tests/test_getFFXdir.m | 2 +-
tests/test_getMeanFuncFilename.m | 2 +-
tests/test_getRFXdir.m | 2 +-
tests/test_getRealignParamFile.m | 2 +-
tests/test_loadAndCheckOptions.m | 2 +-
tests/test_modelFiles.m | 2 +-
tests/test_saveMatlabBatch.m | 2 +-
tests/test_setBatch3Dto4D.m | 2 +-
tests/test_setBatchComputeVDM.m | 2 +-
tests/test_setBatchCoregistrationFuncToAnat.m | 2 +-
tests/test_setBatchFactorialDesign.m | 2 +-
tests/test_setBatchImageCalculation.m | 2 +-
tests/test_setBatchMeanAnatAndMask.m | 2 +-
tests/test_setBatchNormalizationSpatialPrepro.m | 2 +-
tests/test_setBatchRealign.m | 2 +-
tests/test_setBatchResults.m | 2 +-
tests/test_setBatchSTC.m | 2 +-
tests/test_setBatchSaveCoregistrationMatrix.m | 2 +-
tests/test_setBatchSegmentation.m | 2 +-
tests/test_setBatchSelectAnat.m | 2 +-
tests/test_setBatchSkullStripping.m | 2 +-
tests/test_setBatchSmoothConImages.m | 2 +-
tests/test_setBatchSmoothing.m | 2 +-
tests/test_setBatchSmoothingFunc.m | 2 +-
tests/test_setBatchSubjectLevelContrasts.m | 2 +-
tests/test_setBatchSubjectLevelGLMSpec.m | 2 +-
tests/test_setBatchSubjectLevelResults.m | 2 +-
tests/test_setFields.m | 2 +-
tests/test_unit_cleanCrash.m | 2 +-
tests/test_unit_copyGraphWindownOutput.m | 2 +-
tests/test_unit_createDataDictionary.m | 2 +-
tests/test_unit_createGlmDirName.m | 2 +-
tests/test_unit_getFuncVoxelDims.m | 2 +-
tests/test_unit_getGrpLevelContrastToCompute.m | 2 +-
tests/test_unit_getInfo.m | 2 +-
tests/test_unit_getPrefix.m | 2 +-
tests/test_unit_getSliceOrder.m | 2 +-
tests/test_unit_getSubjectList.m | 2 +-
tests/test_unit_manageWorkersPool.m | 2 +-
tests/test_unit_returnDefaultResultsStructure.m | 2 +-
tests/test_unit_returnEmptyModel.m | 2 +-
tests/test_unit_setDerivativesDir.m | 2 +-
tests/test_unit_specifyContrasts.m | 2 +-
tests/test_unit_validationInputFile.m | 2 +-
tests/test_utils.m | 2 +-
tests/test_writeDatasetDescription.m | 2 +-
tests/utils/defaultOptions.m | 4 ++--
tests/utils/setOptions.m | 4 ++--
56 files changed, 58 insertions(+), 58 deletions(-)
diff --git a/tests/test_bidsCopyRawFolder.m b/tests/test_bidsCopyRawFolder.m
index a86801ad..b9d6fb4d 100644
--- a/tests/test_bidsCopyRawFolder.m
+++ b/tests/test_bidsCopyRawFolder.m
@@ -1,4 +1,4 @@
-% (C) Copyright 2020 CPP BIDS SPM-pipeline developers
+% (C) Copyright 2020 CPP_SPM developers
function test_suite = test_bidsCopyRawFolder %#ok<*STOUT>
try % assignment of 'localfunctions' is necessary in Matlab >= 2016
diff --git a/tests/test_checkOptions.m b/tests/test_checkOptions.m
index 071e62bf..383c71f0 100644
--- a/tests/test_checkOptions.m
+++ b/tests/test_checkOptions.m
@@ -1,4 +1,4 @@
-% (C) Copyright 2020 CPP BIDS SPM-pipeline developers
+% (C) Copyright 2020 CPP_SPM developers
function test_suite = test_checkOptions %#ok<*STOUT>
try % assignment of 'localfunctions' is necessary in Matlab >= 2016
diff --git a/tests/test_createAndReturnOnsetFile.m b/tests/test_createAndReturnOnsetFile.m
index d013bc70..6c10563f 100644
--- a/tests/test_createAndReturnOnsetFile.m
+++ b/tests/test_createAndReturnOnsetFile.m
@@ -1,4 +1,4 @@
-% (C) Copyright 2020 CPP BIDS SPM-pipeline developers
+% (C) Copyright 2020 CPP_SPM developers
function test_suite = test_createAndReturnOnsetFile %#ok<*STOUT>
try % assignment of 'localfunctions' is necessary in Matlab >= 2016
diff --git a/tests/test_createDefaultModel.m b/tests/test_createDefaultModel.m
index bf08364d..e508f1ba 100644
--- a/tests/test_createDefaultModel.m
+++ b/tests/test_createDefaultModel.m
@@ -1,4 +1,4 @@
-% (C) Copyright 2020 CPP BIDS SPM-pipeline developers
+% (C) Copyright 2020 CPP_SPM developers
function test_suite = test_createDefaultModel %#ok<*STOUT>
try % assignment of 'localfunctions' is necessary in Matlab >= 2016
diff --git a/tests/test_getAnatFilename.m b/tests/test_getAnatFilename.m
index 05098182..94e9de88 100644
--- a/tests/test_getAnatFilename.m
+++ b/tests/test_getAnatFilename.m
@@ -1,4 +1,4 @@
-% (C) Copyright 2020 CPP BIDS SPM-pipeline developers
+% (C) Copyright 2020 CPP_SPM developers
function test_suite = test_getAnatFilename %#ok<*STOUT>
try % assignment of 'localfunctions' is necessary in Matlab >= 2016
diff --git a/tests/test_getBoldFilename.m b/tests/test_getBoldFilename.m
index ee3aa79a..4a84d601 100644
--- a/tests/test_getBoldFilename.m
+++ b/tests/test_getBoldFilename.m
@@ -1,4 +1,4 @@
-% (C) Copyright 2020 CPP BIDS SPM-pipeline developers
+% (C) Copyright 2020 CPP_SPM developers
function test_suite = test_getBoldFilename %#ok<*STOUT>
try % assignment of 'localfunctions' is necessary in Matlab >= 2016
diff --git a/tests/test_getBoldFilenameForFFX.m b/tests/test_getBoldFilenameForFFX.m
index 63675f46..a6bd762c 100644
--- a/tests/test_getBoldFilenameForFFX.m
+++ b/tests/test_getBoldFilenameForFFX.m
@@ -1,4 +1,4 @@
-% (C) Copyright 2020 CPP BIDS SPM-pipeline developers
+% (C) Copyright 2020 CPP_SPM developers
function test_suite = test_getBoldFilenameForFFX %#ok<*STOUT>
try % assignment of 'localfunctions' is necessary in Matlab >= 2016
diff --git a/tests/test_getData.m b/tests/test_getData.m
index 6cbd66c4..7a2cbe68 100644
--- a/tests/test_getData.m
+++ b/tests/test_getData.m
@@ -1,4 +1,4 @@
-% (C) Copyright 2020 CPP BIDS SPM-pipeline developers
+% (C) Copyright 2020 CPP_SPM developers
function test_suite = test_getData %#ok<*STOUT>
try % assignment of 'localfunctions' is necessary in Matlab >= 2016
diff --git a/tests/test_getFFXdir.m b/tests/test_getFFXdir.m
index 1e0c4005..28734ca8 100644
--- a/tests/test_getFFXdir.m
+++ b/tests/test_getFFXdir.m
@@ -1,4 +1,4 @@
-% (C) Copyright 2020 CPP BIDS SPM-pipeline developers
+% (C) Copyright 2020 CPP_SPM developers
function test_suite = test_getFFXdir %#ok<*STOUT>
try % assignment of 'localfunctions' is necessary in Matlab >= 2016
diff --git a/tests/test_getMeanFuncFilename.m b/tests/test_getMeanFuncFilename.m
index c5bf35ef..5e7de78d 100644
--- a/tests/test_getMeanFuncFilename.m
+++ b/tests/test_getMeanFuncFilename.m
@@ -1,4 +1,4 @@
-% (C) Copyright 2020 CPP BIDS SPM-pipeline developers
+% (C) Copyright 2020 CPP_SPM developers
function test_suite = test_getMeanFuncFilename %#ok<*STOUT>
try % assignment of 'localfunctions' is necessary in Matlab >= 2016
diff --git a/tests/test_getRFXdir.m b/tests/test_getRFXdir.m
index c59f51a9..2fb709d1 100644
--- a/tests/test_getRFXdir.m
+++ b/tests/test_getRFXdir.m
@@ -1,4 +1,4 @@
-% (C) Copyright 2020 CPP BIDS SPM-pipeline developers
+% (C) Copyright 2020 CPP_SPM developers
function test_suite = test_getRFXdir %#ok<*STOUT>
try % assignment of 'localfunctions' is necessary in Matlab >= 2016
diff --git a/tests/test_getRealignParamFile.m b/tests/test_getRealignParamFile.m
index a71a9070..2c4fd28e 100644
--- a/tests/test_getRealignParamFile.m
+++ b/tests/test_getRealignParamFile.m
@@ -1,4 +1,4 @@
-% (C) Copyright 2020 CPP BIDS SPM-pipeline developers
+% (C) Copyright 2020 CPP_SPM developers
function test_suite = test_getRealignParamFile %#ok<*STOUT>
try % assignment of 'localfunctions' is necessary in Matlab >= 2016
diff --git a/tests/test_loadAndCheckOptions.m b/tests/test_loadAndCheckOptions.m
index 30d32184..624063e8 100644
--- a/tests/test_loadAndCheckOptions.m
+++ b/tests/test_loadAndCheckOptions.m
@@ -1,4 +1,4 @@
-% (C) Copyright 2020 CPP BIDS SPM-pipeline developers
+% (C) Copyright 2020 CPP_SPM developers
function test_suite = test_loadAndCheckOptions %#ok<*STOUT>
try % assignment of 'localfunctions' is necessary in Matlab >= 2016
diff --git a/tests/test_modelFiles.m b/tests/test_modelFiles.m
index 1a80e561..6024012b 100644
--- a/tests/test_modelFiles.m
+++ b/tests/test_modelFiles.m
@@ -1,4 +1,4 @@
-% (C) Copyright 2020 CPP BIDS SPM-pipeline developers
+% (C) Copyright 2020 CPP_SPM developers
function test_suite = test_modelFiles %#ok<*STOUT>
try % assignment of 'localfunctions' is necessary in Matlab >= 2016
diff --git a/tests/test_saveMatlabBatch.m b/tests/test_saveMatlabBatch.m
index af8327e7..94d956a8 100644
--- a/tests/test_saveMatlabBatch.m
+++ b/tests/test_saveMatlabBatch.m
@@ -1,4 +1,4 @@
-% (C) Copyright 2020 CPP BIDS SPM-pipeline developers
+% (C) Copyright 2020 CPP_SPM developers
function test_suite = test_saveMatlabBatch %#ok<*STOUT>
try % assignment of 'localfunctions' is necessary in Matlab >= 2016
diff --git a/tests/test_setBatch3Dto4D.m b/tests/test_setBatch3Dto4D.m
index 53d3eded..cd21d71f 100644
--- a/tests/test_setBatch3Dto4D.m
+++ b/tests/test_setBatch3Dto4D.m
@@ -1,4 +1,4 @@
-% (C) Copyright 2020 CPP BIDS SPM-pipeline developers
+% (C) Copyright 2020 CPP_SPM developers
function test_suite = test_setBatch3Dto4D %#ok<*STOUT>
try % assignment of 'localfunctions' is necessary in Matlab >= 2016
diff --git a/tests/test_setBatchComputeVDM.m b/tests/test_setBatchComputeVDM.m
index 1f46e1a5..0efe5e5e 100644
--- a/tests/test_setBatchComputeVDM.m
+++ b/tests/test_setBatchComputeVDM.m
@@ -1,4 +1,4 @@
-% (C) Copyright 2020 CPP BIDS SPM-pipeline developers
+% (C) Copyright 2020 CPP_SPM developers
function test_suite = test_setBatchComputeVDM %#ok<*STOUT>
try % assignment of 'localfunctions' is necessary in Matlab >= 2016
diff --git a/tests/test_setBatchCoregistrationFuncToAnat.m b/tests/test_setBatchCoregistrationFuncToAnat.m
index 45589a53..a789212e 100644
--- a/tests/test_setBatchCoregistrationFuncToAnat.m
+++ b/tests/test_setBatchCoregistrationFuncToAnat.m
@@ -1,4 +1,4 @@
-% (C) Copyright 2020 CPP BIDS SPM-pipeline developers
+% (C) Copyright 2020 CPP_SPM developers
function test_suite = test_setBatchCoregistrationFuncToAnat %#ok<*STOUT>
try % assignment of 'localfunctions' is necessary in Matlab >= 2016
diff --git a/tests/test_setBatchFactorialDesign.m b/tests/test_setBatchFactorialDesign.m
index 7be5aff5..e5fcd5ba 100644
--- a/tests/test_setBatchFactorialDesign.m
+++ b/tests/test_setBatchFactorialDesign.m
@@ -1,4 +1,4 @@
-% (C) Copyright 2020 CPP BIDS SPM-pipeline developers
+% (C) Copyright 2020 CPP_SPM developers
function test_suite = test_setBatchFactorialDesign %#ok<*STOUT>
try % assignment of 'localfunctions' is necessary in Matlab >= 2016
diff --git a/tests/test_setBatchImageCalculation.m b/tests/test_setBatchImageCalculation.m
index bc21e0db..0e70d94c 100644
--- a/tests/test_setBatchImageCalculation.m
+++ b/tests/test_setBatchImageCalculation.m
@@ -1,4 +1,4 @@
-% (C) Copyright 2020 CPP BIDS SPM-pipeline developers
+% (C) Copyright 2020 CPP_SPM developers
function test_suite = test_setBatchImageCalculation %#ok<*STOUT>
try % assignment of 'localfunctions' is necessary in Matlab >= 2016
diff --git a/tests/test_setBatchMeanAnatAndMask.m b/tests/test_setBatchMeanAnatAndMask.m
index af30e028..6b15f9fd 100644
--- a/tests/test_setBatchMeanAnatAndMask.m
+++ b/tests/test_setBatchMeanAnatAndMask.m
@@ -1,4 +1,4 @@
-% (C) Copyright 2020 CPP BIDS SPM-pipeline developers
+% (C) Copyright 2020 CPP_SPM developers
function test_suite = test_setBatchMeanAnatAndMask %#ok<*STOUT>
try % assignment of 'localfunctions' is necessary in Matlab >= 2016
diff --git a/tests/test_setBatchNormalizationSpatialPrepro.m b/tests/test_setBatchNormalizationSpatialPrepro.m
index 7abcf8f6..cb505861 100644
--- a/tests/test_setBatchNormalizationSpatialPrepro.m
+++ b/tests/test_setBatchNormalizationSpatialPrepro.m
@@ -1,4 +1,4 @@
-% (C) Copyright 2020 CPP BIDS SPM-pipeline developers
+% (C) Copyright 2020 CPP_SPM developers
function test_suite = test_setBatchNormalizationSpatialPrepro %#ok<*STOUT>
try % assignment of 'localfunctions' is necessary in Matlab >= 2016
diff --git a/tests/test_setBatchRealign.m b/tests/test_setBatchRealign.m
index 7ead8b76..cc48d55c 100644
--- a/tests/test_setBatchRealign.m
+++ b/tests/test_setBatchRealign.m
@@ -1,4 +1,4 @@
-% (C) Copyright 2020 CPP BIDS SPM-pipeline developers
+% (C) Copyright 2020 CPP_SPM developers
function test_suite = test_setBatchRealign %#ok<*STOUT>
try % assignment of 'localfunctions' is necessary in Matlab >= 2016
diff --git a/tests/test_setBatchResults.m b/tests/test_setBatchResults.m
index 4efd602e..490577ae 100644
--- a/tests/test_setBatchResults.m
+++ b/tests/test_setBatchResults.m
@@ -1,4 +1,4 @@
-% (C) Copyright 2020 CPP BIDS SPM-pipeline developers
+% (C) Copyright 2020 CPP_SPM developers
function test_suite = test_setBatchResults %#ok<*STOUT>
try % assignment of 'localfunctions' is necessary in Matlab >= 2016
diff --git a/tests/test_setBatchSTC.m b/tests/test_setBatchSTC.m
index 39435854..85817da4 100644
--- a/tests/test_setBatchSTC.m
+++ b/tests/test_setBatchSTC.m
@@ -1,4 +1,4 @@
-% (C) Copyright 2020 CPP BIDS SPM-pipeline developers
+% (C) Copyright 2020 CPP_SPM developers
function test_suite = test_setBatchSTC %#ok<*STOUT>
try % assignment of 'localfunctions' is necessary in Matlab >= 2016
diff --git a/tests/test_setBatchSaveCoregistrationMatrix.m b/tests/test_setBatchSaveCoregistrationMatrix.m
index 9492e226..b21575b0 100644
--- a/tests/test_setBatchSaveCoregistrationMatrix.m
+++ b/tests/test_setBatchSaveCoregistrationMatrix.m
@@ -1,4 +1,4 @@
-% (C) Copyright 2020 CPP BIDS SPM-pipeline developers
+% (C) Copyright 2020 CPP_SPM developers
function test_suite = test_setBatchSaveCoregistrationMatrix %#ok<*STOUT>
try % assignment of 'localfunctions' is necessary in Matlab >= 2016
diff --git a/tests/test_setBatchSegmentation.m b/tests/test_setBatchSegmentation.m
index 7304369b..91872c4d 100644
--- a/tests/test_setBatchSegmentation.m
+++ b/tests/test_setBatchSegmentation.m
@@ -1,4 +1,4 @@
-% (C) Copyright 2020 CPP BIDS SPM-pipeline developers
+% (C) Copyright 2020 CPP_SPM developers
function test_suite = test_setBatchSegmentation %#ok<*STOUT>
try % assignment of 'localfunctions' is necessary in Matlab >= 2016
diff --git a/tests/test_setBatchSelectAnat.m b/tests/test_setBatchSelectAnat.m
index 7edda8c1..083a9c32 100644
--- a/tests/test_setBatchSelectAnat.m
+++ b/tests/test_setBatchSelectAnat.m
@@ -1,4 +1,4 @@
-% (C) Copyright 2020 CPP BIDS SPM-pipeline developers
+% (C) Copyright 2020 CPP_SPM developers
function test_suite = test_setBatchSelectAnat %#ok<*STOUT>
try % assignment of 'localfunctions' is necessary in Matlab >= 2016
diff --git a/tests/test_setBatchSkullStripping.m b/tests/test_setBatchSkullStripping.m
index 788e0875..921c227f 100644
--- a/tests/test_setBatchSkullStripping.m
+++ b/tests/test_setBatchSkullStripping.m
@@ -1,4 +1,4 @@
-% (C) Copyright 2019 CPP BIDS SPM-pipeline developers
+% (C) Copyright 2019 CPP_SPM developers
function test_suite = test_setBatchSkullStripping %#ok<*STOUT>
try % assignment of 'localfunctions' is necessary in Matlab >= 2016
diff --git a/tests/test_setBatchSmoothConImages.m b/tests/test_setBatchSmoothConImages.m
index 7a3364c9..98357b9c 100644
--- a/tests/test_setBatchSmoothConImages.m
+++ b/tests/test_setBatchSmoothConImages.m
@@ -1,4 +1,4 @@
-% (C) Copyright 2020 CPP BIDS SPM-pipeline developers
+% (C) Copyright 2020 CPP_SPM developers
function test_suite = test_setBatchSmoothConImages %#ok<*STOUT>
try % assignment of 'localfunctions' is necessary in Matlab >= 2016
diff --git a/tests/test_setBatchSmoothing.m b/tests/test_setBatchSmoothing.m
index ec5f0e2d..f1016267 100644
--- a/tests/test_setBatchSmoothing.m
+++ b/tests/test_setBatchSmoothing.m
@@ -1,4 +1,4 @@
-% (C) Copyright 2020 CPP BIDS SPM-pipeline developers
+% (C) Copyright 2020 CPP_SPM developers
function test_suite = test_setBatchSmoothing %#ok<*STOUT>
try % assignment of 'localfunctions' is necessary in Matlab >= 2016
diff --git a/tests/test_setBatchSmoothingFunc.m b/tests/test_setBatchSmoothingFunc.m
index de198f1d..564f93ed 100644
--- a/tests/test_setBatchSmoothingFunc.m
+++ b/tests/test_setBatchSmoothingFunc.m
@@ -1,4 +1,4 @@
-% (C) Copyright 2020 CPP BIDS SPM-pipeline developers
+% (C) Copyright 2020 CPP_SPM developers
function test_suite = test_setBatchSmoothingFunc %#ok<*STOUT>
try % assignment of 'localfunctions' is necessary in Matlab >= 2016
diff --git a/tests/test_setBatchSubjectLevelContrasts.m b/tests/test_setBatchSubjectLevelContrasts.m
index 7995a8ab..e2d3c548 100644
--- a/tests/test_setBatchSubjectLevelContrasts.m
+++ b/tests/test_setBatchSubjectLevelContrasts.m
@@ -1,4 +1,4 @@
-% (C) Copyright 2020 CPP BIDS SPM-pipeline developers
+% (C) Copyright 2020 CPP_SPM developers
function test_suite = test_setBatchSubjectLevelContrasts %#ok<*STOUT>
try % assignment of 'localfunctions' is necessary in Matlab >= 2016
diff --git a/tests/test_setBatchSubjectLevelGLMSpec.m b/tests/test_setBatchSubjectLevelGLMSpec.m
index 410a9599..94347c23 100644
--- a/tests/test_setBatchSubjectLevelGLMSpec.m
+++ b/tests/test_setBatchSubjectLevelGLMSpec.m
@@ -1,4 +1,4 @@
-% (C) Copyright 2020 CPP BIDS SPM-pipeline developers
+% (C) Copyright 2020 CPP_SPM developers
function test_suite = test_setBatchSubjectLevelGLMSpec %#ok<*STOUT>
try % assignment of 'localfunctions' is necessary in Matlab >= 2016
diff --git a/tests/test_setBatchSubjectLevelResults.m b/tests/test_setBatchSubjectLevelResults.m
index b8f4d636..6ca6d728 100644
--- a/tests/test_setBatchSubjectLevelResults.m
+++ b/tests/test_setBatchSubjectLevelResults.m
@@ -1,4 +1,4 @@
-% (C) Copyright 2020 CPP BIDS SPM-pipeline developers
+% (C) Copyright 2020 CPP_SPM developers
function test_suite = test_setBatchSubjectLevelResults %#ok<*STOUT>
try % assignment of 'localfunctions' is necessary in Matlab >= 2016
diff --git a/tests/test_setFields.m b/tests/test_setFields.m
index dceeb75b..04412fd3 100644
--- a/tests/test_setFields.m
+++ b/tests/test_setFields.m
@@ -1,4 +1,4 @@
-% (C) Copyright 2020 CPP BIDS SPM-pipeline developers
+% (C) Copyright 2020 CPP_SPM developers
function test_suite = test_setFields %#ok<*STOUT>
try % assignment of 'localfunctions' is necessary in Matlab >= 2016
diff --git a/tests/test_unit_cleanCrash.m b/tests/test_unit_cleanCrash.m
index ae8cbfbe..55deacc7 100644
--- a/tests/test_unit_cleanCrash.m
+++ b/tests/test_unit_cleanCrash.m
@@ -1,4 +1,4 @@
-% (C) Copyright 2020 CPP BIDS SPM-pipeline developers
+% (C) Copyright 2020 CPP_SPM developers
function test_suite = test_unit_cleanCrash %#ok<*STOUT>
try % assignment of 'localfunctions' is necessary in Matlab >= 2016
diff --git a/tests/test_unit_copyGraphWindownOutput.m b/tests/test_unit_copyGraphWindownOutput.m
index b0698f7b..27d603e3 100644
--- a/tests/test_unit_copyGraphWindownOutput.m
+++ b/tests/test_unit_copyGraphWindownOutput.m
@@ -1,4 +1,4 @@
-% (C) Copyright 2020 CPP BIDS SPM-pipeline developers
+% (C) Copyright 2020 CPP_SPM developers
function test_suite = test_unit_copyGraphWindownOutput %#ok<*STOUT>
try % assignment of 'localfunctions' is necessary in Matlab >= 2016
diff --git a/tests/test_unit_createDataDictionary.m b/tests/test_unit_createDataDictionary.m
index ba1aeecf..f9bbe888 100644
--- a/tests/test_unit_createDataDictionary.m
+++ b/tests/test_unit_createDataDictionary.m
@@ -1,4 +1,4 @@
-% (C) Copyright 2020 CPP BIDS SPM-pipeline developers
+% (C) Copyright 2020 CPP_SPM developers
function test_suite = test_unit_createDataDictionary %#ok<*STOUT>
try % assignment of 'localfunctions' is necessary in Matlab >= 2016
diff --git a/tests/test_unit_createGlmDirName.m b/tests/test_unit_createGlmDirName.m
index c99b3fec..67765e2d 100644
--- a/tests/test_unit_createGlmDirName.m
+++ b/tests/test_unit_createGlmDirName.m
@@ -1,4 +1,4 @@
-% (C) Copyright 2021 CPP BIDS SPM-pipeline developers
+% (C) Copyright 2021 CPP_SPM developers
function test_suite = test_unit_createGlmDirName %#ok<*STOUT>
try % assignment of 'localfunctions' is necessary in Matlab >= 2016
diff --git a/tests/test_unit_getFuncVoxelDims.m b/tests/test_unit_getFuncVoxelDims.m
index 2e70c5d5..929e0195 100644
--- a/tests/test_unit_getFuncVoxelDims.m
+++ b/tests/test_unit_getFuncVoxelDims.m
@@ -1,4 +1,4 @@
-% (C) Copyright 2020 CPP BIDS SPM-pipeline developers
+% (C) Copyright 2020 CPP_SPM developers
function test_suite = test_unit_getFuncVoxelDims %#ok<*STOUT>
try % assignment of 'localfunctions' is necessary in Matlab >= 2016
diff --git a/tests/test_unit_getGrpLevelContrastToCompute.m b/tests/test_unit_getGrpLevelContrastToCompute.m
index 5947e431..368ca7a8 100644
--- a/tests/test_unit_getGrpLevelContrastToCompute.m
+++ b/tests/test_unit_getGrpLevelContrastToCompute.m
@@ -1,4 +1,4 @@
-% (C) Copyright 2020 CPP BIDS SPM-pipeline developers
+% (C) Copyright 2020 CPP_SPM developers
function test_suite = test_unit_getGrpLevelContrastToCompute %#ok<*STOUT>
try % assignment of 'localfunctions' is necessary in Matlab >= 2016
diff --git a/tests/test_unit_getInfo.m b/tests/test_unit_getInfo.m
index ec5198ca..6e948881 100644
--- a/tests/test_unit_getInfo.m
+++ b/tests/test_unit_getInfo.m
@@ -1,4 +1,4 @@
-% (C) Copyright 2020 CPP BIDS SPM-pipeline developers
+% (C) Copyright 2020 CPP_SPM developers
function test_suite = test_getInfo %#ok<*STOUT>
try % assignment of 'localfunctions' is necessary in Matlab >= 2016
diff --git a/tests/test_unit_getPrefix.m b/tests/test_unit_getPrefix.m
index 27e2e50f..619a9e91 100644
--- a/tests/test_unit_getPrefix.m
+++ b/tests/test_unit_getPrefix.m
@@ -1,4 +1,4 @@
-% (C) Copyright 2020 CPP BIDS SPM-pipeline developers
+% (C) Copyright 2020 CPP_SPM developers
function test_suite = test_unit_getPrefix %#ok<*STOUT>
try % assignment of 'localfunctions' is necessary in Matlab >= 2016
diff --git a/tests/test_unit_getSliceOrder.m b/tests/test_unit_getSliceOrder.m
index 379e0ab1..543c141e 100644
--- a/tests/test_unit_getSliceOrder.m
+++ b/tests/test_unit_getSliceOrder.m
@@ -1,4 +1,4 @@
-% (C) Copyright 2020 CPP BIDS SPM-pipeline developers
+% (C) Copyright 2020 CPP_SPM developers
function test_suite = test_unit_getSliceOrder %#ok<*STOUT>
try % assignment of 'localfunctions' is necessary in Matlab >= 2016
diff --git a/tests/test_unit_getSubjectList.m b/tests/test_unit_getSubjectList.m
index 880c1d89..fd9a0c8e 100644
--- a/tests/test_unit_getSubjectList.m
+++ b/tests/test_unit_getSubjectList.m
@@ -1,4 +1,4 @@
-% (C) Copyright 2020 CPP BIDS SPM-pipeline developers
+% (C) Copyright 2020 CPP_SPM developers
function test_suite = test_unit_getSubjectList %#ok<*STOUT>
try % assignment of 'localfunctions' is necessary in Matlab >= 2016
diff --git a/tests/test_unit_manageWorkersPool.m b/tests/test_unit_manageWorkersPool.m
index b7c6c6f8..159ae73a 100644
--- a/tests/test_unit_manageWorkersPool.m
+++ b/tests/test_unit_manageWorkersPool.m
@@ -1,4 +1,4 @@
-% (C) Copyright 2020 CPP BIDS SPM-pipeline developers
+% (C) Copyright 2020 CPP_SPM developers
function test_suite = test_unit_manageWorkersPool %#ok<*STOUT>
try % assignment of 'localfunctions' is necessary in Matlab >= 2016
diff --git a/tests/test_unit_returnDefaultResultsStructure.m b/tests/test_unit_returnDefaultResultsStructure.m
index 8ef9ec10..6e7df827 100644
--- a/tests/test_unit_returnDefaultResultsStructure.m
+++ b/tests/test_unit_returnDefaultResultsStructure.m
@@ -1,4 +1,4 @@
-% (C) Copyright 2020 CPP BIDS SPM-pipeline developers
+% (C) Copyright 2020 CPP_SPM developers
function test_suite = test_unit_returnDefaultResultsStructure %#ok<*STOUT>
try % assignment of 'localfunctions' is necessary in Matlab >= 2016
diff --git a/tests/test_unit_returnEmptyModel.m b/tests/test_unit_returnEmptyModel.m
index cb006589..2b8525bb 100644
--- a/tests/test_unit_returnEmptyModel.m
+++ b/tests/test_unit_returnEmptyModel.m
@@ -1,4 +1,4 @@
-% (C) Copyright 2020 CPP BIDS SPM-pipeline developers
+% (C) Copyright 2020 CPP_SPM developers
function test_suite = test_unit_returnEmptyModel %#ok<*STOUT>
try % assignment of 'localfunctions' is necessary in Matlab >= 2016
diff --git a/tests/test_unit_setDerivativesDir.m b/tests/test_unit_setDerivativesDir.m
index 4df4a2cc..6cf46f8c 100644
--- a/tests/test_unit_setDerivativesDir.m
+++ b/tests/test_unit_setDerivativesDir.m
@@ -1,4 +1,4 @@
-% (C) Copyright 2020 CPP BIDS SPM-pipeline developers
+% (C) Copyright 2020 CPP_SPM developers
function test_suite = test_unit_setDerivativesDir %#ok<*STOUT>
try % assignment of 'localfunctions' is necessary in Matlab >= 2016
diff --git a/tests/test_unit_specifyContrasts.m b/tests/test_unit_specifyContrasts.m
index 373a13c5..01332c50 100644
--- a/tests/test_unit_specifyContrasts.m
+++ b/tests/test_unit_specifyContrasts.m
@@ -1,4 +1,4 @@
-% (C) Copyright 2020 CPP BIDS SPM-pipeline developers
+% (C) Copyright 2020 CPP_SPM developers
function test_suite = test_unit_specifyContrasts %#ok<*STOUT>
try % assignment of 'localfunctions' is necessary in Matlab >= 2016
diff --git a/tests/test_unit_validationInputFile.m b/tests/test_unit_validationInputFile.m
index 29ad4135..d76c0537 100644
--- a/tests/test_unit_validationInputFile.m
+++ b/tests/test_unit_validationInputFile.m
@@ -1,4 +1,4 @@
-% (C) Copyright 2020 CPP BIDS SPM-pipeline developers
+% (C) Copyright 2020 CPP_SPM developers
function test_suite = test_unit_validationInputFile %#ok<*STOUT>
try % assignment of 'localfunctions' is necessary in Matlab >= 2016
diff --git a/tests/test_utils.m b/tests/test_utils.m
index ec276918..38efe2b1 100644
--- a/tests/test_utils.m
+++ b/tests/test_utils.m
@@ -1,4 +1,4 @@
-% (C) Copyright 2020 CPP BIDS SPM-pipeline developers
+% (C) Copyright 2020 CPP_SPM developers
function test_suite = test_utils %#ok<*STOUT>
try % assignment of 'localfunctions' is necessary in Matlab >= 2016
diff --git a/tests/test_writeDatasetDescription.m b/tests/test_writeDatasetDescription.m
index a88804f7..af922521 100644
--- a/tests/test_writeDatasetDescription.m
+++ b/tests/test_writeDatasetDescription.m
@@ -1,4 +1,4 @@
-% (C) Copyright 2020 CPP BIDS SPM-pipeline developers
+% (C) Copyright 2020 CPP_SPM developers
function test_suite = test_writeDatasetDescription %#ok<*STOUT>
try % assignment of 'localfunctions' is necessary in Matlab >= 2016
diff --git a/tests/utils/defaultOptions.m b/tests/utils/defaultOptions.m
index 5c7211f8..d258de43 100644
--- a/tests/utils/defaultOptions.m
+++ b/tests/utils/defaultOptions.m
@@ -1,6 +1,6 @@
-% (C) Copyright 2021 CPP BIDS SPM-pipeline developers
-
function expectedOptions = defaultOptions(taskName)
+ %
+ % (C) Copyright 2021 CPP_SPM developers
expectedOptions.sliceOrder = [];
expectedOptions.STC_referenceSlice = [];
diff --git a/tests/utils/setOptions.m b/tests/utils/setOptions.m
index 69b291bb..6717eb29 100644
--- a/tests/utils/setOptions.m
+++ b/tests/utils/setOptions.m
@@ -1,6 +1,6 @@
-% (C) Copyright 2021 CPP BIDS SPM-pipeline developers
-
function opt = setOptions(task, subLabel)
+ %
+ % (C) Copyright 2021 CPP_SPM developers
thisDir = fileparts(mfilename('fullpath'));
From 6381287595f2834b3f39bea4ac8abcfcd3630e10 Mon Sep 17 00:00:00 2001
From: Remi Gau
Date: Tue, 13 Apr 2021 10:07:48 +0200
Subject: [PATCH 14/18] update more copyrights
---
README.md | 8 +++
initCppSpm.m | 6 ++-
manualTests/test_bidsSegmentSkullStrip.m | 2 +-
manualTests/test_ds114.m | 2 +-
manualTests/test_moae.m | 2 +-
manualTests/test_setBatchCoregistrationFmap.m | 2 +-
manualTests/test_setBatchCreateVDMs.m | 2 +-
miss_hit.cfg | 3 ++
run_tests.m | 2 +-
src/QA/anatomicalQA.m | 3 +-
src/QA/functionalQA.m | 4 +-
src/defaults/checkOptions.m | 4 +-
src/defaults/createDefaultModel.m | 3 +-
src/defaults/datasetDescriptionDefaults.m | 5 +-
src/defaults/miss_hit.cfg | 9 ----
src/defaults/returnDefaultResultsStructure.m | 4 +-
src/defaults/returnEmptyModel.m | 3 +-
src/defaults/spm_my_defaults.m | 4 +-
src/fieldmaps/getBlipDirection.m | 3 +-
.../getMetadataFromIntendedForFunc.m | 4 +-
src/fieldmaps/getTotalReadoutTime.m | 3 +-
src/fieldmaps/getVdmFile.m | 3 +-
src/getAnatFilename.m | 3 +-
src/getBoldFilename.m | 3 +-
src/getData.m | 4 +-
src/getFuncVoxelDims.m | 3 +-
src/getInfo.m | 3 +-
src/getMeanFuncFilename.m | 3 +-
src/getPrefix.m | 3 +-
src/getRealignParamFile.m | 4 +-
src/getSliceOrder.m | 3 +-
.../getGrpLevelContrastToCompute.m | 3 +-
src/group_level/getRFXdir.m | 3 +-
src/reports/copyFigures.m | 3 +-
src/reports/copyGraphWindownOutput.m | 3 +-
src/reports/reportBIDS.m | 3 +-
src/results/returnName.m | 6 ++-
src/results/setMontage.m | 6 +--
src/setDerivativesDir.m | 52 +++++++++----------
src/setStatsDir.m | 8 ++-
src/subject_level/convertOnsetTsvToMat.m | 3 +-
src/subject_level/createAndReturnOnsetFile.m | 3 +-
src/subject_level/deleteResidualImages.m | 3 +-
src/subject_level/getBoldFilenameForFFX.m | 3 +-
src/subject_level/getFFXdir.m | 3 +-
src/subject_level/specifyContrasts.m | 4 +-
src/templates/bidsTemplateWorkflow.m | 3 +-
src/templates/setBatchTemplate.m | 4 +-
src/templates/templateFunction.m | 4 +-
src/templates/templateFunctionExample.m | 4 +-
src/templates/templateGetOption.m | 5 +-
src/unzipImgAndReturnsFullpathName.m | 3 +-
src/workflows/bidsConcatBetaTmaps.m | 3 +-
src/workflows/bidsCopyRawFolder.m | 3 +-
src/workflows/bidsCreateROI.m | 4 +-
src/workflows/bidsCreateVDM.m | 3 +-
src/workflows/bidsFFX.m | 3 +-
src/workflows/bidsLesionSegmentation.m | 3 +-
src/workflows/bidsRFX.m | 3 +-
src/workflows/bidsRealignReslice.m | 3 +-
src/workflows/bidsRealignUnwarp.m | 3 +-
src/workflows/bidsResliceTpmToFunc.m | 3 +-
src/workflows/bidsResults.m | 3 +-
src/workflows/bidsRoiBasedGLM.m | 7 ++-
src/workflows/bidsSTC.m | 3 +-
src/workflows/bidsSegmentSkullStrip.m | 3 +-
src/workflows/bidsSmoothing.m | 3 +-
src/workflows/bidsSpatialPrepro.m | 3 +-
src/workflows/saveAndRunWorkflow.m | 3 +-
src/workflows/setUpWorkflow.m | 3 +-
70 files changed, 136 insertions(+), 162 deletions(-)
diff --git a/README.md b/README.md
index d4bdb3ef..681cf30e 100644
--- a/README.md
+++ b/README.md
@@ -114,6 +114,14 @@ Please see our
[documentation](https://cpp-bids-spm.readthedocs.io/en/latest/index.html) for
more info.
+## Octave compatibility
+
+The following features do not yet work with Octave:
+
+- anatomicalQA
+- functionalQA
+- slice_display toolbox
+
## Contributing
Feel free to open issues to report a bug and ask for improvements.
diff --git a/initCppSpm.m b/initCppSpm.m
index c4bdd80f..0ef52513 100644
--- a/initCppSpm.m
+++ b/initCppSpm.m
@@ -1,6 +1,8 @@
-% (C) Copyright 2021 CPP BIDS SPM-pipeline developers
-
function initCppSpm()
+ %
+ % adds the relevant folders to the path
+ %
+ % (C) Copyright 2021 CPP_SPM developers
global CPP_SPM_INITIALIZED
diff --git a/manualTests/test_bidsSegmentSkullStrip.m b/manualTests/test_bidsSegmentSkullStrip.m
index f10ea4b2..5e193627 100644
--- a/manualTests/test_bidsSegmentSkullStrip.m
+++ b/manualTests/test_bidsSegmentSkullStrip.m
@@ -1,4 +1,4 @@
-% (C) Copyright 2020 CPP BIDS SPM-pipeline developers
+% (C) Copyright 2020 CPP_SPM developers
function test_suite = test_bidsSegmentSkullStrip %#ok<*STOUT>
try % assignment of 'localfunctions' is necessary in Matlab >= 2016
diff --git a/manualTests/test_ds114.m b/manualTests/test_ds114.m
index b9dfb487..b9c18231 100644
--- a/manualTests/test_ds114.m
+++ b/manualTests/test_ds114.m
@@ -1,5 +1,5 @@
% (C) Copyright 2019 Remi Gau
-
+%
% Script to run to check that the whole pipeline works fine with different
% options encoded in json files
%
diff --git a/manualTests/test_moae.m b/manualTests/test_moae.m
index 24f89528..2a7dc395 100644
--- a/manualTests/test_moae.m
+++ b/manualTests/test_moae.m
@@ -1,5 +1,5 @@
% (C) Copyright 2019 Remi Gau
-
+%
% Script to run to check that the whole pipeline works fine with different
% options encoded in json files
%
diff --git a/manualTests/test_setBatchCoregistrationFmap.m b/manualTests/test_setBatchCoregistrationFmap.m
index eaa1f88c..4d055052 100644
--- a/manualTests/test_setBatchCoregistrationFmap.m
+++ b/manualTests/test_setBatchCoregistrationFmap.m
@@ -1,4 +1,4 @@
-% (C) Copyright 2020 CPP BIDS SPM-pipeline developers
+% (C) Copyright 2020 CPP_SPM developers
function test_suite = test_setBatchCoregistrationFmap %#ok<*STOUT>
try % assignment of 'localfunctions' is necessary in Matlab >= 2016
diff --git a/manualTests/test_setBatchCreateVDMs.m b/manualTests/test_setBatchCreateVDMs.m
index 314008e5..e87e6350 100644
--- a/manualTests/test_setBatchCreateVDMs.m
+++ b/manualTests/test_setBatchCreateVDMs.m
@@ -1,4 +1,4 @@
-% (C) Copyright 2020 CPP BIDS SPM-pipeline developers
+% (C) Copyright 2020 CPP_SPM developers
function test_suite = test_setBatchCreateVDMs %#ok<*STOUT>
try % assignment of 'localfunctions' is necessary in Matlab >= 2016
diff --git a/miss_hit.cfg b/miss_hit.cfg
index 8fdd4e43..3c2173ce 100644
--- a/miss_hit.cfg
+++ b/miss_hit.cfg
@@ -1,8 +1,11 @@
# styly guide (https://florianschanda.github.io/miss_hit/style_checker.html)
line_length: 100
+
regex_function_name: "[a-z]+([a-zA-Z0-9]){1}[a-zA-Z0-9]+"
regex_script_name: "[a-z0-9]+(_[a-z0-9]+)*"
+
exclude_dir: "lib"
+
copyright_entity: "JH"
copyright_entity: "DSS"
copyright_entity: "Agah Karakuzu"
diff --git a/run_tests.m b/run_tests.m
index f1e02a48..98dc6821 100644
--- a/run_tests.m
+++ b/run_tests.m
@@ -1,4 +1,4 @@
-% (C) Copyright 2019 CPP BIDS SPM-pipeline developers
+% (C) Copyright 2019 CPP_SPM developers
warning('OFF');
diff --git a/src/QA/anatomicalQA.m b/src/QA/anatomicalQA.m
index c147602d..3e689e8c 100644
--- a/src/QA/anatomicalQA.m
+++ b/src/QA/anatomicalQA.m
@@ -1,5 +1,3 @@
-% (C) Copyright 2020 CPP BIDS SPM-pipeline developers
-
function anatomicalQA(opt)
%
% Computes several metrics for anatomical image.
@@ -11,6 +9,7 @@ function anatomicalQA(opt)
% :param opt: Options chosen for the analysis. See ``checkOptions()``.
% :type opt: structure
%
+ % (C) Copyright 2020 CPP_SPM developers
if isOctave()
warning('\nanatomicalQA is not yet supported on Octave. This step will be skipped.');
diff --git a/src/QA/functionalQA.m b/src/QA/functionalQA.m
index fa356499..f74ff38c 100644
--- a/src/QA/functionalQA.m
+++ b/src/QA/functionalQA.m
@@ -1,5 +1,3 @@
-% (C) Copyright 2020 CPP BIDS SPM-pipeline developers
-
function functionalQA(opt)
%
% For functional data, QA consists in getting temporal SNR and then
@@ -23,6 +21,8 @@ function functionalQA(opt)
% - the tissue probability maps have been generated in the "native" space of each subject
% (using ``bidsSpatialPrepro()`` or ``bidsSegmentSkullStrip()``) and have been
% resliced to the dimension of the functional with ``bidsResliceTpmToFunc()``
+ %
+ % (C) Copyright 2020 CPP_SPM developers
if isOctave()
warning('\nfunctionalQA is not yet supported on Octave. This step will be skipped.');
diff --git a/src/defaults/checkOptions.m b/src/defaults/checkOptions.m
index e5bb94e1..98e099de 100644
--- a/src/defaults/checkOptions.m
+++ b/src/defaults/checkOptions.m
@@ -1,5 +1,3 @@
-% (C) Copyright 2019 CPP BIDS SPM-pipeline developers
-
function opt = checkOptions(opt)
%
% Check the option inputs and add any missing field with some defaults
@@ -62,6 +60,8 @@
% substantially improves fMRI reliability'
% _https://www.nature.com/articles/s41467-019-09230-w.pdf
%
+ %
+ % (C) Copyright 2019 CPP_SPM developers
fieldsToSet = setDefaultOption();
diff --git a/src/defaults/createDefaultModel.m b/src/defaults/createDefaultModel.m
index 0de2252f..9a541612 100644
--- a/src/defaults/createDefaultModel.m
+++ b/src/defaults/createDefaultModel.m
@@ -1,5 +1,3 @@
-% (C) Copyright 2020 CPP BIDS SPM-pipeline developers
-
function opt = createDefaultModel(BIDS, opt)
%
% Creates a default model json file.
@@ -49,6 +47,7 @@
%
% createDefaultModel(BIDS, opt);
%
+ % (C) Copyright 2020 CPP_SPM developers
% TODO deal with the Transformations and Convolve fields
diff --git a/src/defaults/datasetDescriptionDefaults.m b/src/defaults/datasetDescriptionDefaults.m
index a9bc50bf..86d51462 100644
--- a/src/defaults/datasetDescriptionDefaults.m
+++ b/src/defaults/datasetDescriptionDefaults.m
@@ -1,6 +1,7 @@
-% (C) Copyright 2020 CPP BIDS SPM-pipeline developers
-
function datasetDescription = datasetDescriptionDefaults()
+ %
+ %
+ % (C) Copyright 2020 CPP_SPM developers
datasetDescription.Name = 'cpp_spm outputs';
datasetDescription.BIDSVersion = '1.4.1';
diff --git a/src/defaults/miss_hit.cfg b/src/defaults/miss_hit.cfg
index 636a9186..a9f91c98 100644
--- a/src/defaults/miss_hit.cfg
+++ b/src/defaults/miss_hit.cfg
@@ -1,10 +1 @@
-# styly guide (https://florianschanda.github.io/miss_hit/style_checker.html)
-line_length: 100
regex_function_name: "[a-z]+(_*([a-zA-Z0-9]){1}[A-Za-z]+)*" # almost anything goes in the root folder
-copyright_entity: "CPP BIDS SPM-pipeline developpers"
-
-# metrics limit for the code quality (https://florianschanda.github.io/miss_hit/metrics.html)
-metric "cnest": limit 4
-metric "file_length": limit 400
-metric "cyc": limit 12
-metric "parameters": limit 6
\ No newline at end of file
diff --git a/src/defaults/returnDefaultResultsStructure.m b/src/defaults/returnDefaultResultsStructure.m
index 96cbeb08..7d1eaa21 100644
--- a/src/defaults/returnDefaultResultsStructure.m
+++ b/src/defaults/returnDefaultResultsStructure.m
@@ -1,6 +1,6 @@
-% (C) Copyright 2019 CPP BIDS SPM-pipeline developers
-
function results = returnDefaultResultsStructure()
+ %
+ % (C) Copyright 2019 CPP_SPM developers
Contrasts = struct( ...
'Name', '', ...
diff --git a/src/defaults/returnEmptyModel.m b/src/defaults/returnEmptyModel.m
index 3148a97f..d4664741 100644
--- a/src/defaults/returnEmptyModel.m
+++ b/src/defaults/returnEmptyModel.m
@@ -1,5 +1,3 @@
-% (C) Copyright 2020 CPP BIDS SPM-pipeline developers
-
function content = returnEmptyModel()
%
% Creates the content of a basic model.json file for GLM analysis with
@@ -22,6 +20,7 @@
% filename = fullfile(pwd, 'models', 'model-empty_smdl.json')
% spm_jsonwrite(filename, content, jsonOptions);
%
+ % (C) Copyright 2020 CPP_SPM developers
content.Name = ' ';
content.Description = ' ';
diff --git a/src/defaults/spm_my_defaults.m b/src/defaults/spm_my_defaults.m
index 43b67496..eac7591e 100644
--- a/src/defaults/spm_my_defaults.m
+++ b/src/defaults/spm_my_defaults.m
@@ -1,5 +1,3 @@
-% (C) Copyright 2019 CPP BIDS SPM-pipeline developers
-
function spm_my_defaults()
%
% Short description of what the function does goes here.
@@ -15,6 +13,8 @@ function spm_my_defaults()
% When "not enough" information is specified in the batch files, SPM falls
% back on the defaults to fill in the blanks. This allows to make the
% script simpler.
+ %
+ % (C) Copyright 2019 CPP_SPM developers
global defaults
diff --git a/src/fieldmaps/getBlipDirection.m b/src/fieldmaps/getBlipDirection.m
index 33bbb2db..1d8660db 100644
--- a/src/fieldmaps/getBlipDirection.m
+++ b/src/fieldmaps/getBlipDirection.m
@@ -1,5 +1,3 @@
-% (C) Copyright 2020 CPP BIDS SPM-pipeline developers
-
function blipDir = getBlipDirection(metadata)
%
% Gets the total read out time of a sequence.
@@ -15,6 +13,7 @@
%
% Used to create the voxel dsiplacement map (VDM) from the fieldmap
%
+ % (C) Copyright 2020 CPP_SPM developers
blipDir = 1;
diff --git a/src/fieldmaps/getMetadataFromIntendedForFunc.m b/src/fieldmaps/getMetadataFromIntendedForFunc.m
index 29d8ee57..1bfeb148 100644
--- a/src/fieldmaps/getMetadataFromIntendedForFunc.m
+++ b/src/fieldmaps/getMetadataFromIntendedForFunc.m
@@ -1,5 +1,3 @@
-% (C) Copyright 2020 CPP BIDS SPM-pipeline developers
-
function [totalReadoutTime, blipDir] = getMetadataFromIntendedForFunc(BIDS, fmapMetadata)
%
% Gets metadata of the associated bold file:
@@ -26,6 +24,8 @@
%
% - if there are several func file for this fmap and they have different
% characteristic this may require creating a VDM for each
+ %
+ % (C) Copyright 2020 CPP_SPM developers
for iFile = 1:size(fmapMetadata.IntendedFor)
diff --git a/src/fieldmaps/getTotalReadoutTime.m b/src/fieldmaps/getTotalReadoutTime.m
index f9f2122a..46c5c5c1 100644
--- a/src/fieldmaps/getTotalReadoutTime.m
+++ b/src/fieldmaps/getTotalReadoutTime.m
@@ -1,5 +1,3 @@
-% (C) Copyright 2020 CPP BIDS SPM-pipeline developers
-
function totalReadoutTime = getTotalReadoutTime(metadata)
%
% Gets the total read out time of a sequence.
@@ -15,6 +13,7 @@
%
% Used to create the voxel dsiplacement map (VDM) from the fieldmap
%
+ % (C) Copyright 2020 CPP_SPM developers
totalReadoutTime = '';
diff --git a/src/fieldmaps/getVdmFile.m b/src/fieldmaps/getVdmFile.m
index 2c96416e..51bb36c0 100644
--- a/src/fieldmaps/getVdmFile.m
+++ b/src/fieldmaps/getVdmFile.m
@@ -1,5 +1,3 @@
-% (C) Copyright 2020 CPP BIDS SPM-pipeline developers
-
function vdmFile = getVdmFile(BIDS, opt, boldFilename)
%
% returns the voxel displacement map associated with a given bold file
@@ -17,6 +15,7 @@
%
% :returns: - :vdmFile: (string)
%
+ % (C) Copyright 2020 CPP_SPM developers
vdmFile = '';
diff --git a/src/getAnatFilename.m b/src/getAnatFilename.m
index 880f6838..f0b2dd37 100644
--- a/src/getAnatFilename.m
+++ b/src/getAnatFilename.m
@@ -1,5 +1,3 @@
-% (C) Copyright 2020 CPP BIDS SPM-pipeline developers
-
function [anatImage, anatDataDir] = getAnatFilename(BIDS, subLabel, opt)
%
% Get the filename and the directory of an anat file for a given session and run.
@@ -21,6 +19,7 @@
% :returns: - :anatImage: (string)
% - :anatDataDir: (string)
%
+ % (C) Copyright 2020 CPP_SPM developers
anatSuffix = opt.anatReference.type;
anatSession = opt.anatReference.session;
diff --git a/src/getBoldFilename.m b/src/getBoldFilename.m
index 302856b4..243e6495 100644
--- a/src/getBoldFilename.m
+++ b/src/getBoldFilename.m
@@ -1,5 +1,3 @@
-% (C) Copyright 2020 CPP BIDS SPM-pipeline developers
-
function [boldFileName, subFuncDataDir] = getBoldFilename(varargin)
%
% Get the filename and the directory of a bold file for a given session /
@@ -28,6 +26,7 @@
% - :subFuncDataDir: (string)
%
%
+ % (C) Copyright 2020 CPP_SPM developers
[BIDS, subID, sessionID, runID, opt] = deal(varargin{:});
diff --git a/src/getData.m b/src/getData.m
index 7277c20f..fd60aec6 100644
--- a/src/getData.m
+++ b/src/getData.m
@@ -1,5 +1,3 @@
-% (C) Copyright 2020 CPP BIDS SPM-pipeline developers
-
function [BIDS, opt] = getData(opt, BIDSdir, type)
%
% Reads the specified BIDS data set and updates the list of subjects to analyze.
@@ -27,6 +25,8 @@
% IMPORTANT NOTE: if you specify the type variable for T1w then you must
% make sure that the T1w.json is also present in the anat folder because
% of the way the bids.query function works at the moment
+ %
+ % (C) Copyright 2020 CPP_SPM developers
if nargin < 2 || (exist('BIDSdir', 'var') && isempty(BIDSdir))
% The directory where the derivatives are located
diff --git a/src/getFuncVoxelDims.m b/src/getFuncVoxelDims.m
index 296398fc..bb38ab19 100644
--- a/src/getFuncVoxelDims.m
+++ b/src/getFuncVoxelDims.m
@@ -1,5 +1,3 @@
-% (C) Copyright 2020 CPP BIDS SPM-pipeline developers
-
function [voxDim, opt] = getFuncVoxelDims(opt, subFuncDataDir, prefix, fileName)
%
% Short description of what the function does goes here.
@@ -22,6 +20,7 @@
%
%
%
+ % (C) Copyright 2020 CPP_SPM developers
% get native resolution to reuse it at normalisation;
if ~isempty(opt.funcVoxelDims) % If voxel dimensions is defined in the opt
diff --git a/src/getInfo.m b/src/getInfo.m
index 0ea7af07..3765875c 100644
--- a/src/getInfo.m
+++ b/src/getInfo.m
@@ -1,5 +1,3 @@
-% (C) Copyright 2020 CPP BIDS SPM-pipeline developers
-
function varargout = getInfo(BIDS, subLabel, opt, info, varargin)
%
% Wrapper function to fetch specific info in a BIDS structure returned by
@@ -47,6 +45,7 @@
% :param type: datatype (``bold``, ``events``, ``physio``)
% :type type: string
%
+ % (C) Copyright 2020 CPP_SPM developers
varargout = {}; %#ok<*NASGU>
diff --git a/src/getMeanFuncFilename.m b/src/getMeanFuncFilename.m
index b9057cc6..bea6ea44 100644
--- a/src/getMeanFuncFilename.m
+++ b/src/getMeanFuncFilename.m
@@ -1,5 +1,3 @@
-% (C) Copyright 2020 CPP BIDS SPM-pipeline developers
-
function [meanImage, meanFuncDir] = getMeanFuncFilename(BIDS, subLabel, opt)
%
% Get the filename and the directory of an mean functional file.
@@ -18,6 +16,7 @@
% :returns: - :meanImage: (string)
% - :meanFuncDir: (string)
%
+ % (C) Copyright 2020 CPP_SPM developers
sessions = getInfo(BIDS, subLabel, opt, 'Sessions');
runs = getInfo(BIDS, subLabel, opt, 'Runs', sessions{1});
diff --git a/src/getPrefix.m b/src/getPrefix.m
index 5c8c334b..ef334d9b 100644
--- a/src/getPrefix.m
+++ b/src/getPrefix.m
@@ -1,5 +1,3 @@
-% (C) Copyright 2020 CPP BIDS SPM-pipeline developers
-
function [prefix, motionRegressorPrefix] = getPrefix(step, opt, funcFWHM)
%
% Generates prefix to append to file name to look for
@@ -19,6 +17,7 @@
% - :motionRegressorPrefix:
%
%
+ % (C) Copyright 2020 CPP_SPM developers
if nargin < 3
funcFWHM = 0;
diff --git a/src/getRealignParamFile.m b/src/getRealignParamFile.m
index d5cc6111..e049ce9b 100644
--- a/src/getRealignParamFile.m
+++ b/src/getRealignParamFile.m
@@ -1,5 +1,3 @@
-% (C) Copyright 2020 CPP BIDS SPM-pipeline developers
-
function realignParamFile = getRealignParamFile(fullpathBoldFileName, prefix)
%
% Short description of what the function does goes here.
@@ -18,6 +16,8 @@
%
% :returns: - :argout1: (type) (dimension)
% - :argout2: (type) (dimension)
+ %
+ % (C) Copyright 2020 CPP_SPM developers
[funcDataDir, boldFileName] = spm_fileparts(fullpathBoldFileName);
diff --git a/src/getSliceOrder.m b/src/getSliceOrder.m
index 8cc2f553..1d2e1037 100644
--- a/src/getSliceOrder.m
+++ b/src/getSliceOrder.m
@@ -1,5 +1,3 @@
-% (C) Copyright 2020 CPP BIDS SPM-pipeline developers
-
function sliceOrder = getSliceOrder(opt, verbose)
%
% Get the slice order information from the BIDS metadata or from the ``opt``
@@ -25,6 +23,7 @@
%
% See also: ``bidsSTC``
%
+ % (C) Copyright 2020 CPP_SPM developers
if nargin < 2
verbose = false;
diff --git a/src/group_level/getGrpLevelContrastToCompute.m b/src/group_level/getGrpLevelContrastToCompute.m
index 52ec91ad..d7bedf6d 100644
--- a/src/group_level/getGrpLevelContrastToCompute.m
+++ b/src/group_level/getGrpLevelContrastToCompute.m
@@ -1,5 +1,3 @@
-% (C) Copyright 2019 CPP BIDS SPM-pipeline developers
-
function [grpLvlCon, iStep] = getGrpLevelContrastToCompute(opt)
%
% Returns the autocontrast part of the dataset step of the BIDS model
@@ -14,6 +12,7 @@
% :returns: - :grpLvlCon:
% - :iStep:
%
+ % (C) Copyright 2019 CPP_SPM developers
model = spm_jsonread(opt.model.file);
diff --git a/src/group_level/getRFXdir.m b/src/group_level/getRFXdir.m
index 7a96acba..a54e58b9 100644
--- a/src/group_level/getRFXdir.m
+++ b/src/group_level/getRFXdir.m
@@ -1,5 +1,3 @@
-% (C) Copyright 2019 CPP BIDS SPM-pipeline developers
-
function rfxDir = getRFXdir(opt, funcFWHM, conFWHM)
%
% Sets the name the group level analysis directory and creates it if it does not exist
@@ -21,6 +19,7 @@
%
% :returns: :rfxDir: (string) Fullpath of the group level directory
%
+ % (C) Copyright 2019 CPP_SPM developers
glmDirName = createGlmDirName(opt, funcFWHM);
diff --git a/src/reports/copyFigures.m b/src/reports/copyFigures.m
index 04bcce9f..6a939581 100644
--- a/src/reports/copyFigures.m
+++ b/src/reports/copyFigures.m
@@ -1,5 +1,3 @@
-% (C) Copyright 2019 CPP BIDS SPM-pipeline developers
-
function copyFigures(BIDS, opt, subLabel)
%
% Copy the figures from spatial preprocessing into a separate folder.
@@ -16,6 +14,7 @@ function copyFigures(BIDS, opt, subLabel)
% :type subLabel: string
%
%
+ % (C) Copyright 2019 CPP_SPM developers
imgNb = copyGraphWindownOutput(opt, subLabel, 'realign');
diff --git a/src/reports/copyGraphWindownOutput.m b/src/reports/copyGraphWindownOutput.m
index a7821cd0..825043db 100644
--- a/src/reports/copyGraphWindownOutput.m
+++ b/src/reports/copyGraphWindownOutput.m
@@ -1,5 +1,3 @@
-% (C) Copyright 2019 CPP BIDS SPM-pipeline developers
-
function imgNb = copyGraphWindownOutput(opt, subID, action, imgNb)
%
% Looks into the current directory for an ``spm_.*imgNb.png`` file and moves it into
@@ -23,6 +21,7 @@
%
% :returns: :imgNb: (integer) number of the next image to get.
%
+ % (C) Copyright 2019 CPP_SPM developers
if nargin < 4 || isempty(imgNb)
imgNb = 1;
diff --git a/src/reports/reportBIDS.m b/src/reports/reportBIDS.m
index 4c617840..97d04f9c 100644
--- a/src/reports/reportBIDS.m
+++ b/src/reports/reportBIDS.m
@@ -1,5 +1,3 @@
-% (C) Copyright 2020 CPP BIDS SPM-pipeline developers
-
function reportBIDS(opt)
%
% Prints out a human readable description of a BIDS data set.
@@ -16,6 +14,7 @@ function reportBIDS(opt)
%
% - save output in the derivatires folder
% derivativeDir = fullfile(rawDir, '..', 'derivatives', 'cpp_spm');
+ % (C) Copyright 2020 CPP_SPM developers
bids.report(opt.dataDir);
diff --git a/src/results/returnName.m b/src/results/returnName.m
index 8fcc2ffb..12fb43d1 100644
--- a/src/results/returnName.m
+++ b/src/results/returnName.m
@@ -1,6 +1,8 @@
-% (C) Copyright 2019 CPP BIDS SPM-pipeline developers
-
function name = returnName(result)
+ %
+ % To help naming of files generated when computing results of a given contrast
+ %
+ % (C) Copyright 2019 CPP_SPM developers
name = sprintf('%s_p-%0.3f_k-%i_MC-%s', ...
result.Contrasts.Name, ...
diff --git a/src/results/setMontage.m b/src/results/setMontage.m
index 23e949d1..0507d67f 100644
--- a/src/results/setMontage.m
+++ b/src/results/setMontage.m
@@ -1,11 +1,11 @@
-% (C) Copyright 2019 CPP BIDS SPM-pipeline developers
-
function montage = setMontage(result)
-
+ %
% TO DO
% - adapt so that the background image is in MNI only if opt.space is MNI
% - add possibility to easily select mean functional or the anatomical:
% - at the group level or subject level
+ %
+ % (C) Copyright 2019 CPP_SPM developers
montage.background = {result.Output.montage.background};
montage.orientation = result.Output.montage.orientation;
diff --git a/src/setDerivativesDir.m b/src/setDerivativesDir.m
index b0cf3183..7b27b581 100644
--- a/src/setDerivativesDir.m
+++ b/src/setDerivativesDir.m
@@ -1,5 +1,3 @@
-% (C) Copyright 2020 CPP BIDS SPM-pipeline developers
-
function opt = setDerivativesDir(opt)
%
% Sets the derivatives folder and the directory where to save the SPM jobs.
@@ -17,34 +15,36 @@
% - :opt: structure or json filename containing the options. See
% ``checkOptions()`` and ``loadAndCheckOptions()``.
%
- % Examples:
- % % opt.dataDir = '/home/remi/data';
- % % opt.taskName = 'testTask';
- % % opt = setDerivativesDir(opt);
- % %
- % % disp(opt.derivativesDir)
- % %|| '/home/remi/data/../derivatives/cpp_spm'
- % %
- % % disp(opt.opt.jobsDir)
- % %|| '/home/remi/data/../derivatives/cpp_spm/JOBS/testTask
+ % Examples::
+ %
+ % opt.dataDir = '/home/remi/data';
+ % opt.taskName = 'testTask';
+ % opt = setDerivativesDir(opt);
+ %
+ % disp(opt.derivativesDir)
+ % '/home/remi/data/../derivatives/cpp_spm'
+ %
+ % disp(opt.opt.jobsDir)
+ % '/home/remi/data/../derivatives/cpp_spm/JOBS/testTask
+ %
+ % opt.dataDir = '/home/remi/data';
+ % opt.dataDir = '/home/remi/otherFolder';
+ % opt.taskName = 'testTask';
+ % opt = setDerivativesDir(opt);
+ %
+ % disp(opt.derivativesDir)
+ % '/home/remi/otherFolder/derivatives/cpp_spm'
%
- % % opt.dataDir = '/home/remi/data';
- % % opt.dataDir = '/home/remi/otherFolder';
- % % opt.taskName = 'testTask';
- % % opt = setDerivativesDir(opt);
- % %
- % % disp(opt.derivativesDir)
- % %|| '/home/remi/otherFolder/derivatives/cpp_spm'
+ % opt.dataDir = '/home/remi/data';
+ % opt.dataDir = '/home/remi/derivatives/preprocessing';
+ % opt.taskName = 'testTask';
+ % opt = setDerivativesDir(opt);
%
- % % opt.dataDir = '/home/remi/data';
- % % opt.dataDir = '/home/remi/derivatives/preprocessing';
- % % opt.taskName = 'testTask';
- % % opt = setDerivativesDir(opt);
- % %
- % % disp(opt.derivativesDir)
- % %|| '/home/remi/otherFolder/derivatives/preprocessing'
+ % disp(opt.derivativesDir)
+ % '/home/remi/otherFolder/derivatives/preprocessing'
%
%
+ % (C) Copyright 2020 CPP_SPM developers
if ~isfield(opt, 'derivativesDir') || isempty(opt.derivativesDir)
opt.derivativesDir = fullfile(opt.dataDir, '..', 'derivatives', 'cpp_spm');
diff --git a/src/setStatsDir.m b/src/setStatsDir.m
index 48aa4072..637f1420 100644
--- a/src/setStatsDir.m
+++ b/src/setStatsDir.m
@@ -1,6 +1,10 @@
-% (C) Copyright 2021 CPP BIDS SPM-pipeline developers
-
function opt = setStatsDir(opt)
+ %
+ % USAGE::
+ %
+ % opt = setStatsDir(opt)
+ %
+ % (C) Copyright 2021 CPP_SPM developers
opt = setDerivativesDir(opt);
diff --git a/src/subject_level/convertOnsetTsvToMat.m b/src/subject_level/convertOnsetTsvToMat.m
index c561f122..d737e8a8 100644
--- a/src/subject_level/convertOnsetTsvToMat.m
+++ b/src/subject_level/convertOnsetTsvToMat.m
@@ -1,5 +1,3 @@
-% (C) Copyright 2019 CPP BIDS SPM-pipeline developers
-
function fullpathOnsetFileName = convertOnsetTsvToMat(opt, tsvFile)
%
% Converts an events.tsv file to an onset file suitable for SPM subject level
@@ -18,6 +16,7 @@
%
% :returns: - :fullpathOnsetFileName: (string) name of the output `.mat` file.
%
+ % (C) Copyright 2019 CPP_SPM developers
%
[pth, file, ext] = spm_fileparts(tsvFile);
diff --git a/src/subject_level/createAndReturnOnsetFile.m b/src/subject_level/createAndReturnOnsetFile.m
index 73e50eed..5fd280f2 100644
--- a/src/subject_level/createAndReturnOnsetFile.m
+++ b/src/subject_level/createAndReturnOnsetFile.m
@@ -1,5 +1,3 @@
-% (C) Copyright 2019 CPP BIDS SPM-pipeline developers
-
function onsetFileName = createAndReturnOnsetFile(opt, subID, tsvFile, funcFWHM)
%
% For a given events.tsv file it creates a .mat file that can directly be used
@@ -23,6 +21,7 @@
% :returns: - :onsetFileName: (string) fullpath name of the file created.
% Removes any prefix.
%
+ % (C) Copyright 2019 CPP_SPM developers
onsetFileName = convertOnsetTsvToMat(opt, tsvFile);
diff --git a/src/subject_level/deleteResidualImages.m b/src/subject_level/deleteResidualImages.m
index a6b10bf4..59838998 100644
--- a/src/subject_level/deleteResidualImages.m
+++ b/src/subject_level/deleteResidualImages.m
@@ -1,5 +1,3 @@
-% (C) Copyright 2020 CPP BIDS SPM-pipeline developers
-
function deleteResidualImages(ffxDir)
%
% USAGE::
@@ -9,6 +7,7 @@ function deleteResidualImages(ffxDir)
% :param ffxDir:
% :type ffxDir: string
%
+ % (C) Copyright 2020 CPP_SPM developers
delete(fullfile(ffxDir, 'Res_*.nii'));
delete(fullfile(ffxDir, 'res4d.nii*'));
diff --git a/src/subject_level/getBoldFilenameForFFX.m b/src/subject_level/getBoldFilenameForFFX.m
index 117ed609..b53b6f3e 100644
--- a/src/subject_level/getBoldFilenameForFFX.m
+++ b/src/subject_level/getBoldFilenameForFFX.m
@@ -1,5 +1,3 @@
-% (C) Copyright 2020 CPP BIDS SPM-pipeline developers
-
function [boldFileName, prefix] = getBoldFilenameForFFX(varargin)
%
% Gets the filename for this bold run for this task for the FFX setup
@@ -26,6 +24,7 @@
% - :prefix: (srting)
%
%
+ % (C) Copyright 2020 CPP_SPM developers
[BIDS, opt, subID, funcFWHM, iSes, iRun] = deal(varargin{:});
diff --git a/src/subject_level/getFFXdir.m b/src/subject_level/getFFXdir.m
index cad5cb71..677ec0cd 100644
--- a/src/subject_level/getFFXdir.m
+++ b/src/subject_level/getFFXdir.m
@@ -1,5 +1,3 @@
-% (C) Copyright 2019 CPP BIDS SPM-pipeline developers
-
function ffxDir = getFFXdir(subLabel, funcFWFM, opt)
%
% Sets the name the FFX directory and creates it if it does not exist
@@ -17,6 +15,7 @@
%
% :returns: - :ffxDir: (string)
%
+ % (C) Copyright 2019 CPP_SPM developers
glmDirName = createGlmDirName(opt, funcFWFM);
diff --git a/src/subject_level/specifyContrasts.m b/src/subject_level/specifyContrasts.m
index 811c6e27..7b2e5854 100644
--- a/src/subject_level/specifyContrasts.m
+++ b/src/subject_level/specifyContrasts.m
@@ -1,5 +1,3 @@
-% (C) Copyright 2019 CPP BIDS SPM-pipeline developers
-
function contrasts = specifyContrasts(ffxDir, taskName, opt)
%
% Specifies the first level contrasts
@@ -30,6 +28,8 @@
% Sn(1) R4
% Sn(1) R5
% Sn(1) R6
+ %
+ % (C) Copyright 2019 CPP_SPM developers
load(fullfile(ffxDir, 'SPM.mat'));
diff --git a/src/templates/bidsTemplateWorkflow.m b/src/templates/bidsTemplateWorkflow.m
index 39721e4c..2294c51b 100644
--- a/src/templates/bidsTemplateWorkflow.m
+++ b/src/templates/bidsTemplateWorkflow.m
@@ -1,8 +1,7 @@
-% (C) Copyright 2021 CPP BIDS SPM-pipeline developers
-
function bidsTemplateWorkflow(opt)
%
%
+ % (C) Copyright 2021 CPP_SPM developers
[BIDS, opt] = setUpWorkflow(opt, 'workflow name');
diff --git a/src/templates/setBatchTemplate.m b/src/templates/setBatchTemplate.m
index 7a7536b6..f17b0d03 100644
--- a/src/templates/setBatchTemplate.m
+++ b/src/templates/setBatchTemplate.m
@@ -1,5 +1,3 @@
-% (C) Copyright 2020 CPP BIDS SPM-pipeline developers
-
function matlabbatch = setBatchTemplate(matlabbatch, BIDS, opt, subID, info, varargin)
%
% template to creae new setBatch functions
@@ -12,6 +10,8 @@
% :type matlabbatch:
%
% :returns: - :matlabbatch: (structure) The matlabbatch ready to run the spm job
+ %
+ % (C) Copyright 2020 CPP_SPM developers
printBatchName('name for this batch');
diff --git a/src/templates/templateFunction.m b/src/templates/templateFunction.m
index 6897f2f2..c80726d3 100644
--- a/src/templates/templateFunction.m
+++ b/src/templates/templateFunction.m
@@ -1,5 +1,3 @@
-% (C) Copyright 2020 CPP BIDS SPM-pipeline developers
-
function [argout1, argout2] = templateFunction(argin1, argin2, argin3)
%
% Short description of what the function does goes here.
@@ -23,6 +21,8 @@
%
% - item 1
% - item 2
+ %
+ % (C) Copyright 2020 CPP_SPM developers
% The code goes below
diff --git a/src/templates/templateFunctionExample.m b/src/templates/templateFunctionExample.m
index 941690b5..d0bd6970 100644
--- a/src/templates/templateFunctionExample.m
+++ b/src/templates/templateFunctionExample.m
@@ -1,5 +1,3 @@
-% (C) Copyright 2020 CPP BIDS SPM-pipeline developers
-
function templateFunctionExample()
% This function illustrates a documentation test defined for MOdox.
% Other than that it does absolutely nothinghort description of what
@@ -36,6 +34,8 @@ function templateFunctionExample()
%
%
% % tests end here because test indentation has ended
+ %
+ % (C) Copyright 2020 CPP_SPM developers
% The code goes below
diff --git a/src/templates/templateGetOption.m b/src/templates/templateGetOption.m
index 4946a976..797a3540 100644
--- a/src/templates/templateGetOption.m
+++ b/src/templates/templateGetOption.m
@@ -1,8 +1,9 @@
-% (C) Copyright 2020 CPP BIDS SPM-pipeline developers
-
function opt = templateGetOption()
+ %
% returns a structure that contains the options chosen by the user to return
% the different workflows
+ %
+ % (C) Copyright 2020 CPP_SPM developers
if nargin < 1
opt = [];
diff --git a/src/unzipImgAndReturnsFullpathName.m b/src/unzipImgAndReturnsFullpathName.m
index b8a4d6eb..0f4681c8 100644
--- a/src/unzipImgAndReturnsFullpathName.m
+++ b/src/unzipImgAndReturnsFullpathName.m
@@ -1,5 +1,3 @@
-% (C) Copyright 2020 CPP BIDS SPM-pipeline developers
-
function unzippedFullpathImgName = unzipImgAndReturnsFullpathName(fullpathImgName)
%
% Unzips an image if necessary
@@ -18,6 +16,7 @@
% - make it work on several images
%
%
+ % (C) Copyright 2020 CPP_SPM developers
[directory, filename, ext] = spm_fileparts(fullpathImgName);
diff --git a/src/workflows/bidsConcatBetaTmaps.m b/src/workflows/bidsConcatBetaTmaps.m
index dc757327..ed11cc87 100644
--- a/src/workflows/bidsConcatBetaTmaps.m
+++ b/src/workflows/bidsConcatBetaTmaps.m
@@ -1,5 +1,3 @@
-% (C) Copyright 2019 CPP BIDS SPM-pipeline developers
-
function bidsConcatBetaTmaps(opt, funcFWHM, deleteIndBeta, deleteIndTmaps)
%
% Make 4D images of beta and t-maps for the MVPA. ::
@@ -15,6 +13,7 @@ function bidsConcatBetaTmaps(opt, funcFWHM, deleteIndBeta, deleteIndTmaps)
% :param deleteIndTmaps: decide to delete t-maps
% :type funcFWHM: (boolean)
%
+ % (C) Copyright 2019 CPP_SPM developers
% delete individual Beta and tmaps
if nargin < 3
diff --git a/src/workflows/bidsCopyRawFolder.m b/src/workflows/bidsCopyRawFolder.m
index fb75608d..230eeb98 100644
--- a/src/workflows/bidsCopyRawFolder.m
+++ b/src/workflows/bidsCopyRawFolder.m
@@ -1,5 +1,3 @@
-% (C) Copyright 2019 CPP BIDS SPM-pipeline developers
-
function bidsCopyRawFolder(opt, deleteZippedNii, modalitiesToCopy, unZip)
%
% Copies the folders from the ``raw`` folder to the
@@ -25,6 +23,7 @@ function bidsCopyRawFolder(opt, deleteZippedNii, modalitiesToCopy, unZip)
% :param unZip:
% :type unZip: boolean
%
+ % (C) Copyright 2019 CPP_SPM developers
%% input variables default values
diff --git a/src/workflows/bidsCreateROI.m b/src/workflows/bidsCreateROI.m
index 2349c503..28263901 100644
--- a/src/workflows/bidsCreateROI.m
+++ b/src/workflows/bidsCreateROI.m
@@ -1,6 +1,6 @@
-% (C) Copyright 2021 CPP BIDS SPM-pipeline developers
-
function bidsCreateROI(opt)
+ %
+ % (C) Copyright 2021 CPP_SPM developers
if nargin < 1
opt = [];
diff --git a/src/workflows/bidsCreateVDM.m b/src/workflows/bidsCreateVDM.m
index 461ed2fe..c235682c 100644
--- a/src/workflows/bidsCreateVDM.m
+++ b/src/workflows/bidsCreateVDM.m
@@ -1,5 +1,3 @@
-% (C) Copyright 2020 CPP BIDS SPM-pipeline developers
-
function bidsCreateVDM(opt)
%
% Creates the voxel displacement maps from the fieldmaps of a BIDS
@@ -20,6 +18,7 @@ function bidsCreateVDM(opt)
% Inspired from spmup ``spmup_BIDS_preprocess`` (@ commit 198c980d6d7520b1a99)
% (URL missing)
%
+ % (C) Copyright 2020 CPP_SPM developers
[BIDS, opt] = setUpWorkflow(opt, 'create voxel displacement map');
diff --git a/src/workflows/bidsFFX.m b/src/workflows/bidsFFX.m
index 730e166f..ceee4257 100644
--- a/src/workflows/bidsFFX.m
+++ b/src/workflows/bidsFFX.m
@@ -1,5 +1,3 @@
-% (C) Copyright 2020 CPP BIDS SPM-pipeline developers
-
function bidsFFX(action, opt, funcFWHM)
%
% - builds the subject level fMRI model and estimates it.
@@ -27,6 +25,7 @@ function bidsFFX(action, opt, funcFWHM)
% For unsmoothed data ``funcFWHM = 0``, for smoothed data ``funcFWHM = ... mm``.
% In this way we can make multiple ffx for different smoothing degrees.
%
+ % (C) Copyright 2020 CPP_SPM developers
if opt.glm.roibased.do
message = sprintf( ...
diff --git a/src/workflows/bidsLesionSegmentation.m b/src/workflows/bidsLesionSegmentation.m
index 627cba8e..af0fb8da 100755
--- a/src/workflows/bidsLesionSegmentation.m
+++ b/src/workflows/bidsLesionSegmentation.m
@@ -1,5 +1,3 @@
-% (C) Copyright 2021 CPP BIDS SPM-pipeline developers
-
function bidsLesionSegmentation(opt)
%
% Performs segmentation to detect lesions of anatomical image.
@@ -14,6 +12,7 @@ function bidsLesionSegmentation(opt)
%
% Segmentation will be performed using the information provided in the BIDS data set.
%
+ % (C) Copyright 2021 CPP_SPM developers
[BIDS, opt] = setUpWorkflow(opt, 'lesion segmentation');
diff --git a/src/workflows/bidsRFX.m b/src/workflows/bidsRFX.m
index a735c538..96bc3153 100644
--- a/src/workflows/bidsRFX.m
+++ b/src/workflows/bidsRFX.m
@@ -1,5 +1,3 @@
-% (C) Copyright 2020 CPP BIDS SPM-pipeline developers
-
function bidsRFX(action, opt, funcFWHM, conFWHM)
%
% - smooths all contrast images created at the subject level
@@ -30,6 +28,7 @@ function bidsRFX(action, opt, funcFWHM, conFWHM)
% - case ``RFX``: Mean Struct, MeanMask, Factorial design specification and
% estimation, Contrast estimation
%
+ % (C) Copyright 2020 CPP_SPM developers
if nargin < 4 || isempty(funcFWHM)
funcFWHM = 0;
diff --git a/src/workflows/bidsRealignReslice.m b/src/workflows/bidsRealignReslice.m
index d2dd05bf..0b90bb8d 100644
--- a/src/workflows/bidsRealignReslice.m
+++ b/src/workflows/bidsRealignReslice.m
@@ -1,5 +1,3 @@
-% (C) Copyright 2020 CPP BIDS SPM-pipeline developers
-
function bidsRealignReslice(opt)
%
% Realigns and reslices the functional data of a given task.
@@ -14,6 +12,7 @@ function bidsRealignReslice(opt)
%
% Assumes that ``bidsSTC()`` has already been run.
%
+ % (C) Copyright 2020 CPP_SPM developers
[BIDS, opt] = setUpWorkflow(opt, 'realign and reslice');
diff --git a/src/workflows/bidsRealignUnwarp.m b/src/workflows/bidsRealignUnwarp.m
index 5ec1c452..c56387a6 100644
--- a/src/workflows/bidsRealignUnwarp.m
+++ b/src/workflows/bidsRealignUnwarp.m
@@ -1,5 +1,3 @@
-% (C) Copyright 2020 CPP BIDS SPM-pipeline developers
-
function bidsRealignUnwarp(opt)
%
% Realigns and unwarps the functional data of a given task.
@@ -17,6 +15,7 @@ function bidsRealignUnwarp(opt)
% If the ``bidsCreateVDM()`` workflow has been run before the voxel displacement
% maps will be used unless ``opt.useFieldmaps`` is set to ``false``.
%
+ % (C) Copyright 2020 CPP_SPM developers
[BIDS, opt] = setUpWorkflow(opt, 'realign and unwarp');
diff --git a/src/workflows/bidsResliceTpmToFunc.m b/src/workflows/bidsResliceTpmToFunc.m
index 788c971f..3394c54f 100644
--- a/src/workflows/bidsResliceTpmToFunc.m
+++ b/src/workflows/bidsResliceTpmToFunc.m
@@ -1,5 +1,3 @@
-% (C) Copyright 2020 CPP BIDS SPM-pipeline developers
-
function bidsResliceTpmToFunc(opt)
%
% Reslices the tissue probability map (TPMs) from the segmentation to the mean
@@ -20,6 +18,7 @@ function bidsResliceTpmToFunc(opt)
% as the computation of the tSNR by ``spmup`` requires the TPMs to have the same dimension
% as the functional.
%
+ % (C) Copyright 2020 CPP_SPM developers
[BIDS, opt] = setUpWorkflow(opt, 'reslicing tissue probability maps to functional dimension');
diff --git a/src/workflows/bidsResults.m b/src/workflows/bidsResults.m
index 08497bc6..ae744de4 100644
--- a/src/workflows/bidsResults.m
+++ b/src/workflows/bidsResults.m
@@ -1,5 +1,3 @@
-% (C) Copyright 2020 CPP BIDS SPM-pipeline developers
-
function bidsResults(opt, funcFWHM, conFWHM)
%
% Computes the results for a series of contrast that can be
@@ -20,6 +18,7 @@ function bidsResults(opt, funcFWHM, conFWHM)
% images (Gaussian kernel size).
% :type conFWHM: scalar
%
+ % (C) Copyright 2020 CPP_SPM developers
[BIDS, opt] = setUpWorkflow(opt, 'computing GLM results');
diff --git a/src/workflows/bidsRoiBasedGLM.m b/src/workflows/bidsRoiBasedGLM.m
index 65cd8a68..948a5a96 100644
--- a/src/workflows/bidsRoiBasedGLM.m
+++ b/src/workflows/bidsRoiBasedGLM.m
@@ -1,8 +1,11 @@
-% (C) Copyright 2021 CPP BIDS SPM-pipeline developers
-
function bidsRoiBasedGLM(opt)
%
+ % Will run a GLM within a ROI using MarsBar.
+ %
+ % Will compute the percent signal change and the time course of the events
+ % or blocks of contrast specified in the BIDS model.
%
+ % (C) Copyright 2021 CPP_SPM developers
if ~opt.glm.roibased.do
message = sprintf( ...
diff --git a/src/workflows/bidsSTC.m b/src/workflows/bidsSTC.m
index 58aaf908..76c19eb5 100644
--- a/src/workflows/bidsSTC.m
+++ b/src/workflows/bidsSTC.m
@@ -1,5 +1,3 @@
-% (C) Copyright 2019 CPP BIDS SPM-pipeline developers
-
function bidsSTC(opt)
%
% Performs the slie timing correction of the functional data.
@@ -29,6 +27,7 @@ function bidsSTC(opt)
%
% See the documentation for more information about slice timing correction.
%
+ % (C) Copyright 2019 CPP_SPM developers
[BIDS, opt] = setUpWorkflow(opt, 'slice timing correction');
diff --git a/src/workflows/bidsSegmentSkullStrip.m b/src/workflows/bidsSegmentSkullStrip.m
index d990bba3..978e2b0c 100644
--- a/src/workflows/bidsSegmentSkullStrip.m
+++ b/src/workflows/bidsSegmentSkullStrip.m
@@ -1,5 +1,3 @@
-% (C) Copyright 2020 CPP BIDS SPM-pipeline developers
-
function bidsSegmentSkullStrip(opt)
%
% Segments and skullstrips the anatomical image.
@@ -12,6 +10,7 @@ function bidsSegmentSkullStrip(opt)
% ``checkOptions()`` and ``loadAndCheckOptions()``.
% :type opt: structure
%
+ % (C) Copyright 2020 CPP_SPM developers
[BIDS, opt] = setUpWorkflow(opt, 'segmentation and skulltripping');
diff --git a/src/workflows/bidsSmoothing.m b/src/workflows/bidsSmoothing.m
index 05f52964..6ca15aeb 100644
--- a/src/workflows/bidsSmoothing.m
+++ b/src/workflows/bidsSmoothing.m
@@ -1,5 +1,3 @@
-% (C) Copyright 2020 CPP BIDS SPM-pipeline developers
-
function bidsSmoothing(funcFWHM, opt)
%
% This performs smoothing to the functional data using a full width
@@ -15,6 +13,7 @@ function bidsSmoothing(funcFWHM, opt)
% :param opt: structure or json filename containing the options. See
% ``checkOptions()`` and ``loadAndCheckOptions()``.
% :type opt: structure
+ % (C) Copyright 2020 CPP_SPM developers
[BIDS, opt] = setUpWorkflow(opt, 'smoothing functional data');
diff --git a/src/workflows/bidsSpatialPrepro.m b/src/workflows/bidsSpatialPrepro.m
index e3a4948d..b144192c 100644
--- a/src/workflows/bidsSpatialPrepro.m
+++ b/src/workflows/bidsSpatialPrepro.m
@@ -1,5 +1,3 @@
-% (C) Copyright 2019 CPP BIDS SPM-pipeline developers
-
function bidsSpatialPrepro(opt)
%
% Performs spatial preprocessing of the functional and structural data.
@@ -37,6 +35,7 @@ function bidsSpatialPrepro(opt)
%
% - average T1s across sessions if necessarry
%
+ % (C) Copyright 2019 CPP_SPM developers
[BIDS, opt] = setUpWorkflow(opt, 'spatial preprocessing');
diff --git a/src/workflows/saveAndRunWorkflow.m b/src/workflows/saveAndRunWorkflow.m
index d6972712..646894de 100644
--- a/src/workflows/saveAndRunWorkflow.m
+++ b/src/workflows/saveAndRunWorkflow.m
@@ -1,5 +1,3 @@
-% (C) Copyright 2019 CPP BIDS SPM-pipeline developers
-
function saveAndRunWorkflow(matlabbatch, batchName, opt, subLabel)
%
% Saves the SPM matlabbatch and runs it
@@ -17,6 +15,7 @@ function saveAndRunWorkflow(matlabbatch, batchName, opt, subLabel)
% :type opt: structure
% :param subID: subject ID
% :type subID: string
+ % (C) Copyright 2019 CPP_SPM developers
if nargin < 4
subLabel = [];
diff --git a/src/workflows/setUpWorkflow.m b/src/workflows/setUpWorkflow.m
index d79ffb29..85fd5e85 100644
--- a/src/workflows/setUpWorkflow.m
+++ b/src/workflows/setUpWorkflow.m
@@ -1,5 +1,3 @@
-% (C) Copyright 2019 CPP BIDS SPM-pipeline developers
-
function [BIDS, opt] = setUpWorkflow(opt, workflowName)
%
% Calls some common functions to:
@@ -24,6 +22,7 @@
% - :opt: options checked
% - :group:
%
+ % (C) Copyright 2019 CPP_SPM developers
opt = loadAndCheckOptions(opt);
From 977bf0a45e1e26b2f4edffe493cd793014e870ac Mon Sep 17 00:00:00 2001
From: Remi Gau
Date: Tue, 13 Apr 2021 10:43:54 +0200
Subject: [PATCH 15/18] update demos
---
demos/MoAE/moae_run.m | 10 +++++++---
demos/MoAE/moae_slice_display.m | 1 -
...rt_face_rep_ds.m => download_convert_face_rep_ds.m} | 0
demos/face_repetition/face_rep_resolution.m | 7 ++++++-
demos/openneuro/ds000001_run.m | 2 +-
demos/openneuro/ds000114_run.m | 2 +-
demos/openneuro/ds001168_run.m | 2 +-
7 files changed, 16 insertions(+), 8 deletions(-)
rename demos/face_repetition/{dowload_convert_face_rep_ds.m => download_convert_face_rep_ds.m} (100%)
diff --git a/demos/MoAE/moae_run.m b/demos/MoAE/moae_run.m
index bdb12880..4d4d71b0 100644
--- a/demos/MoAE/moae_run.m
+++ b/demos/MoAE/moae_run.m
@@ -36,13 +36,17 @@
bidsSpatialPrepro(opt);
% The following do not run on octave for now (because of spmup)
-% anatomicalQA(opt);
-% bidsResliceTpmToFunc(opt);
-% functionalQA(opt);
+anatomicalQA(opt);
+bidsResliceTpmToFunc(opt);
+functionalQA(opt);
bidsSmoothing(FWHM, opt);
% The following crash on CI
+WD = pwd;
bidsFFX('specifyAndEstimate', opt, FWHM);
+cd(WD);
bidsFFX('contrasts', opt, FWHM);
+cd(WD);
bidsResults(opt, FWHM);
+cd(WD);
diff --git a/demos/MoAE/moae_slice_display.m b/demos/MoAE/moae_slice_display.m
index dfd712f0..a0662caa 100644
--- a/demos/MoAE/moae_slice_display.m
+++ b/demos/MoAE/moae_slice_display.m
@@ -1,6 +1,5 @@
% (C) Copyright 2021 Remi Gau
-run moae_run.m;
run moae_create_roi_extract_data.m;
close all;
diff --git a/demos/face_repetition/dowload_convert_face_rep_ds.m b/demos/face_repetition/download_convert_face_rep_ds.m
similarity index 100%
rename from demos/face_repetition/dowload_convert_face_rep_ds.m
rename to demos/face_repetition/download_convert_face_rep_ds.m
diff --git a/demos/face_repetition/face_rep_resolution.m b/demos/face_repetition/face_rep_resolution.m
index 7aa4b0c3..38461e17 100644
--- a/demos/face_repetition/face_rep_resolution.m
+++ b/demos/face_repetition/face_rep_resolution.m
@@ -21,7 +21,7 @@
%% Removes previous analysis, gets data and converts it to BIDS
if downloadData
- dowload_convert_face_rep_ds();
+ download_convert_face_rep_ds();
end
@@ -41,6 +41,10 @@
'derivatives', ...
['cpp_spm-res' num2str(iResolution)]), 'cpath');
+ % create a new BIDS model json file
+ % this way the GLM output will be store in a different directory for each
+ % resolution as the name of the GLM directory is based on the name of the
+ % model in the BIDS model
content = spm_jsonread(opt.model.file);
content.Name = [content.Name, ' resolution - ', num2str(iResolution)];
@@ -51,6 +55,7 @@
spm_jsonwrite(newModel, content, struct('indent', ' '));
+ % run analysis
bidsCopyRawFolder(opt, 1);
bidsSTC(opt);
diff --git a/demos/openneuro/ds000001_run.m b/demos/openneuro/ds000001_run.m
index 98f9fa99..a0d11fab 100644
--- a/demos/openneuro/ds000001_run.m
+++ b/demos/openneuro/ds000001_run.m
@@ -12,7 +12,7 @@
run ../../initCppSpm.m;
%% Set options
-opt = ds000001_getOption();
+opt = ds000001_get_option();
reportBIDS(opt);
diff --git a/demos/openneuro/ds000114_run.m b/demos/openneuro/ds000114_run.m
index ce8719c1..f3d8dd1d 100644
--- a/demos/openneuro/ds000114_run.m
+++ b/demos/openneuro/ds000114_run.m
@@ -12,7 +12,7 @@
run ../../initCppSpm.m;
%% Set options
-opt = ds000114_getOption();
+opt = ds000114_get_option();
%% Run batches
diff --git a/demos/openneuro/ds001168_run.m b/demos/openneuro/ds001168_run.m
index 262a7688..695b3b6d 100644
--- a/demos/openneuro/ds001168_run.m
+++ b/demos/openneuro/ds001168_run.m
@@ -11,7 +11,7 @@
run ../../initCppSpm.m;
%% Set options
-opt = ds001168_getOption();
+opt = ds001168_get_option();
%% Run batches
From 8d6fe7ac41e2022992b076cca66e7b6403924974 Mon Sep 17 00:00:00 2001
From: Remi Gau
Date: Tue, 13 Apr 2021 10:44:32 +0200
Subject: [PATCH 16/18] finish fixing copyright
---
manualTests/test_bidsSegmentSkullStrip.m | 29 -------------------
manualTests/test_moae.m | 2 ++
src/batches/setBatch3Dto4D.m | 3 +-
src/batches/setBatchComputeVDM.m | 4 +--
src/batches/setBatchContrasts.m | 3 +-
src/batches/setBatchCoregistration.m | 3 +-
src/batches/setBatchCoregistrationFmap.m | 5 ++--
.../setBatchCoregistrationFuncToAnat.m | 17 +++++------
src/batches/setBatchCreateVDMs.m | 4 +--
src/batches/setBatchEstimateModel.m | 3 +-
src/batches/setBatchFactorialDesign.m | 3 +-
src/batches/setBatchGroupLevelContrasts.m | 4 +--
src/batches/setBatchImageCalculation.m | 3 +-
.../setBatchLesionAbnormalitiesDetection.m | 4 +--
src/batches/setBatchLesionOverlapMap.m | 4 +--
src/batches/setBatchLesionSegmentation.m | 4 +--
src/batches/setBatchMeanAnatAndMask.m | 3 +-
.../setBatchNormalizationSpatialPrepro.m | 3 +-
src/batches/setBatchNormalize.m | 3 +-
src/batches/setBatchPrintFigure.m | 4 +--
src/batches/setBatchRealign.m | 11 +++----
src/batches/setBatchReslice.m | 3 +-
src/batches/setBatchResults.m | 4 +--
src/batches/setBatchSTC.m | 3 +-
.../setBatchSaveCoregistrationMatrix.m | 3 +-
src/batches/setBatchSegmentation.m | 3 +-
src/batches/setBatchSelectAnat.m | 4 +--
src/batches/setBatchSkullStripping.m | 4 +--
src/batches/setBatchSmoothConImages.m | 3 +-
src/batches/setBatchSmoothing.m | 3 +-
src/batches/setBatchSmoothingFunc.m | 3 +-
src/batches/setBatchSubjectLevelContrasts.m | 3 +-
src/batches/setBatchSubjectLevelGLMSpec.m | 3 +-
src/batches/setBatchSubjectLevelResults.m | 3 +-
src/utils/checkDependencies.m | 12 ++------
src/utils/cleanCrash.m | 3 +-
src/utils/createDataDictionary.m | 3 +-
src/utils/createDerivativeDir.m | 3 +-
src/utils/createGlmDirName.m | 4 +--
src/utils/getEnvInfo.m | 3 +-
src/utils/getSubjectList.m | 4 +--
src/utils/getVersion.m | 3 +-
src/utils/isOctave.m | 5 ++--
src/utils/loadAndCheckOptions.m | 4 +--
src/utils/manageWorkersPool.m | 3 +-
src/utils/printBatchName.m | 4 +--
src/utils/printCredits.m | 7 +++--
src/utils/printProcessingRun.m | 4 +--
src/utils/printProcessingSubject.m | 4 +--
src/utils/printWorklowName.m | 4 +--
src/utils/removeSpmPrefix.m | 4 +--
src/utils/rmTrialTypeStr.m | 3 +-
src/utils/saveMatlabBatch.m | 3 +-
src/utils/saveOptions.m | 3 +-
src/utils/setFields.m | 3 +-
src/utils/setGraphicWindow.m | 3 +-
src/utils/validationInputFile.m | 3 +-
src/utils/writeDatasetDescription.m | 6 ++--
src/workflows/bidsCreateROI.m | 6 ++--
59 files changed, 101 insertions(+), 164 deletions(-)
delete mode 100644 manualTests/test_bidsSegmentSkullStrip.m
diff --git a/manualTests/test_bidsSegmentSkullStrip.m b/manualTests/test_bidsSegmentSkullStrip.m
deleted file mode 100644
index 5e193627..00000000
--- a/manualTests/test_bidsSegmentSkullStrip.m
+++ /dev/null
@@ -1,29 +0,0 @@
-% (C) Copyright 2020 CPP_SPM developers
-
-function test_suite = test_bidsSegmentSkullStrip %#ok<*STOUT>
- try % assignment of 'localfunctions' is necessary in Matlab >= 2016
- test_functions = localfunctions(); %#ok<*NASGU>
- catch % no problem; early Matlab versions can use initTestSuite fine
- end
- initTestSuite;
-end
-
-function test_bidsSegmentSkullStripBasic()
-
- % smoke test
-
- % directory with this script becomes the current directory
- opt.dataDir = fullfile( ...
- fileparts(mfilename('fullpath')), ...
- '..', 'demos', 'MoAE', 'output', 'MoAEpilot');
- % task to analyze
- opt.taskName = 'auditory';
- opt = checkOptions(opt);
-
- %% Run batches
- checkDependencies();
- reportBIDS(opt);
- bidsCopyRawFolder(opt, 1);
- bidsSegmentSkullStrip(opt);
-
-end
diff --git a/manualTests/test_moae.m b/manualTests/test_moae.m
index 2a7dc395..62892cd9 100644
--- a/manualTests/test_moae.m
+++ b/manualTests/test_moae.m
@@ -66,6 +66,8 @@
bidsSmoothing(FWHM, opt);
+ bidsSegmentSkullStrip(opt);
+
% The following crash on Travis CI
% bidsFFX('specifyAndEstimate', opt, FWHM);
% bidsFFX('contrasts', opt, FWHM);
diff --git a/src/batches/setBatch3Dto4D.m b/src/batches/setBatch3Dto4D.m
index 90e761bb..d9811282 100644
--- a/src/batches/setBatch3Dto4D.m
+++ b/src/batches/setBatch3Dto4D.m
@@ -1,5 +1,3 @@
-% (C) Copyright 2020 CPP BIDS SPM-pipeline developers
-
function matlabbatch = setBatch3Dto4D(matlabbatch, volumesList, RT, outputName, dataType)
%
% Set the batch for 3D to 4D conversion
@@ -31,6 +29,7 @@
% - 16: FLOAT32 - single prec. float
% - 64: FLOAT64 - double prec. float
%
+ % (C) Copyright 2020 CPP_SPM developers
if nargin < 5 || isempty(dataType)
dataType = 0;
diff --git a/src/batches/setBatchComputeVDM.m b/src/batches/setBatchComputeVDM.m
index 00321ae4..dddf02bb 100644
--- a/src/batches/setBatchComputeVDM.m
+++ b/src/batches/setBatchComputeVDM.m
@@ -1,5 +1,3 @@
-% (C) Copyright 2020 CPP BIDS SPM-pipeline developers
-
function matlabbatch = setBatchComputeVDM(matlabbatch, fmapType, refImage)
%
% Short description of what the function does goes here.
@@ -21,6 +19,8 @@
%
% adapted from spmup get_FM_workflow.m (@ commit
% 198c980d6d7520b1a996f0e56269e2ceab72cc83)
+ %
+ % (C) Copyright 2020 CPP_SPM developers
switch lower(fmapType)
case 'phasediff'
diff --git a/src/batches/setBatchContrasts.m b/src/batches/setBatchContrasts.m
index ea047235..89162fe7 100644
--- a/src/batches/setBatchContrasts.m
+++ b/src/batches/setBatchContrasts.m
@@ -1,5 +1,3 @@
-% (C) Copyright 2019 CPP BIDS SPM-pipeline developers
-
function matlabbatch = setBatchContrasts(matlabbatch, spmMatFile, consess)
%
% Short description of what the function does goes here.
@@ -17,6 +15,7 @@
%
% :returns: - :matlabbatch: (structure)
%
+ % (C) Copyright 2019 CPP_SPM developers
printBatchName('contrasts specification');
diff --git a/src/batches/setBatchCoregistration.m b/src/batches/setBatchCoregistration.m
index 8fb4d51f..5efa1477 100644
--- a/src/batches/setBatchCoregistration.m
+++ b/src/batches/setBatchCoregistration.m
@@ -1,5 +1,3 @@
-% (C) Copyright 2020 CPP BIDS SPM-pipeline developers
-
function matlabbatch = setBatchCoregistration(matlabbatch, ref, src, other)
%
% Set the batch for coregistering the source images into the reference image
@@ -21,6 +19,7 @@
%
% matlabbatch = setBatchCoregistrationGeneral(matlabbatch, ref, src, other)
%
+ % (C) Copyright 2020 CPP_SPM developers
printBatchName('coregistration');
diff --git a/src/batches/setBatchCoregistrationFmap.m b/src/batches/setBatchCoregistrationFmap.m
index cdf5ab90..2d1bcab7 100644
--- a/src/batches/setBatchCoregistrationFmap.m
+++ b/src/batches/setBatchCoregistrationFmap.m
@@ -1,5 +1,3 @@
-% (C) Copyright 2020 CPP BIDS SPM-pipeline developers
-
function matlabbatch = setBatchCoregistrationFmap(matlabbatch, BIDS, opt, subLabel)
%
% Set the batch for the coregistration of field maps
@@ -18,9 +16,10 @@
%
% :returns: - :matlabbatch: (structure) The matlabbatch ready to run the spm job
%
-
% TODO
% - implement for 'phase12', 'fieldmap', 'epi'
+ %
+ % (C) Copyright 2020 CPP_SPM developers
printBatchName('coregister fieldmaps data to functional');
diff --git a/src/batches/setBatchCoregistrationFuncToAnat.m b/src/batches/setBatchCoregistrationFuncToAnat.m
index b9bc7dfa..70b4761a 100644
--- a/src/batches/setBatchCoregistrationFuncToAnat.m
+++ b/src/batches/setBatchCoregistrationFuncToAnat.m
@@ -1,5 +1,3 @@
-% (C) Copyright 2020 CPP BIDS SPM-pipeline developers
-
function matlabbatch = setBatchCoregistrationFuncToAnat(matlabbatch, BIDS, opt, subLabel)
%
% Set the batch for corregistering the functional images to the
@@ -21,17 +19,18 @@
%
% :returns: - :matlabbatch: (structure) The matlabbatch ready to run the spm job
%
+ % (C) Copyright 2020 CPP_SPM developers
printBatchName('coregister functional data to anatomical');
matlabbatch{end + 1}.spm.spatial.coreg.estimate.ref(1) = ...
- cfg_dep('Named File Selector: Anatomical(1) - Files', ...
- substruct( ...
- '.', 'val', '{}', {opt.orderBatches.selectAnat}, ...
- '.', 'val', '{}', {1}, ...
- '.', 'val', '{}', {1}, ...
- '.', 'val', '{}', {1}), ...
- substruct('.', 'files', '{}', {1}));
+ cfg_dep('Named File Selector: Anatomical(1) - Files', ...
+ substruct( ...
+ '.', 'val', '{}', {opt.orderBatches.selectAnat}, ...
+ '.', 'val', '{}', {1}, ...
+ '.', 'val', '{}', {1}, ...
+ '.', 'val', '{}', {1}), ...
+ substruct('.', 'files', '{}', {1}));
% SOURCE IMAGE : DEPENDENCY FROM REALIGNEMENT
% Mean Image
diff --git a/src/batches/setBatchCreateVDMs.m b/src/batches/setBatchCreateVDMs.m
index 54f4a08e..9851ed7f 100644
--- a/src/batches/setBatchCreateVDMs.m
+++ b/src/batches/setBatchCreateVDMs.m
@@ -1,5 +1,3 @@
-% (C) Copyright 2020 CPP BIDS SPM-pipeline developers
-
function matlabbatch = setBatchCreateVDMs(matlabbatch, BIDS, opt, subID)
%
% Short description of what the function does goes here.
@@ -22,6 +20,8 @@
%
% TODO
% - implement for 'phase12', 'fieldmap', 'epi'
+ %
+ % (C) Copyright 2020 CPP_SPM developers
printBatchName('create voxel displacement map');
diff --git a/src/batches/setBatchEstimateModel.m b/src/batches/setBatchEstimateModel.m
index 719e284e..de0ff6bf 100644
--- a/src/batches/setBatchEstimateModel.m
+++ b/src/batches/setBatchEstimateModel.m
@@ -1,5 +1,3 @@
-% (C) Copyright 2019 CPP BIDS SPM-pipeline developers
-
function matlabbatch = setBatchEstimateModel(matlabbatch, opt, grpLvlCon)
%
% Short description of what the function does goes here.
@@ -15,6 +13,7 @@
%
% :returns: - :matlabbatch: (structure)
%
+ % (C) Copyright 2019 CPP_SPM developers
switch nargin
diff --git a/src/batches/setBatchFactorialDesign.m b/src/batches/setBatchFactorialDesign.m
index ec5c9262..c063e68b 100644
--- a/src/batches/setBatchFactorialDesign.m
+++ b/src/batches/setBatchFactorialDesign.m
@@ -1,5 +1,3 @@
-% (C) Copyright 2019 CPP BIDS SPM-pipeline developers
-
function matlabbatch = setBatchFactorialDesign(matlabbatch, opt, funcFWHM, conFWHM)
%
% Short description of what the function does goes here.
@@ -19,6 +17,7 @@
%
% :returns: - :matlabbatch: (structure)
%
+ % (C) Copyright 2019 CPP_SPM developers
printBatchName('specify group level fmri model');
diff --git a/src/batches/setBatchGroupLevelContrasts.m b/src/batches/setBatchGroupLevelContrasts.m
index 5d83966c..f6346c4c 100644
--- a/src/batches/setBatchGroupLevelContrasts.m
+++ b/src/batches/setBatchGroupLevelContrasts.m
@@ -1,6 +1,6 @@
-% (C) Copyright 2019 CPP BIDS SPM-pipeline developers
-
function matlabbatch = setBatchGroupLevelContrasts(matlabbatch, grpLvlCon, rfxDir)
+ %
+ % (C) Copyright 2019 CPP_SPM developers
printBatchName('group level contrast estimation');
diff --git a/src/batches/setBatchImageCalculation.m b/src/batches/setBatchImageCalculation.m
index 771aee1e..e350d6b6 100644
--- a/src/batches/setBatchImageCalculation.m
+++ b/src/batches/setBatchImageCalculation.m
@@ -1,5 +1,3 @@
-% (C) Copyright 2020 CPP BIDS SPM-pipeline developers
-
function matlabbatch = setBatchImageCalculation(matlabbatch, input, output, outDir, expression)
%
% Set a batch for a image calculation
@@ -21,6 +19,7 @@
%
% :returns: - :matlabbatch:
%
+ % (C) Copyright 2020 CPP_SPM developers
printBatchName('image calculation');
diff --git a/src/batches/setBatchLesionAbnormalitiesDetection.m b/src/batches/setBatchLesionAbnormalitiesDetection.m
index cf906292..d0365e86 100755
--- a/src/batches/setBatchLesionAbnormalitiesDetection.m
+++ b/src/batches/setBatchLesionAbnormalitiesDetection.m
@@ -1,5 +1,3 @@
-% (C) Copyright 2021 CPP BIDS SPM-pipeline developers
-
function matlabbatch = setBatchLesionAbnormalities(matlabbatch, BIDS, opt, subLabel)
%
% Creates a batch to detect lesion abnormalities
@@ -12,6 +10,8 @@
% :type matlabbatch: structure
%
% :returns: - :matlabbatch: (structure)
+ %
+ % (C) Copyright 2021 CPP_SPM developers
printBatchName('Lesion abnormalities');
diff --git a/src/batches/setBatchLesionOverlapMap.m b/src/batches/setBatchLesionOverlapMap.m
index 01c7af5e..3f7dfc37 100755
--- a/src/batches/setBatchLesionOverlapMap.m
+++ b/src/batches/setBatchLesionOverlapMap.m
@@ -1,5 +1,3 @@
-% (C) Copyright 2021 CPP BIDS SPM-pipeline developers
-
function matlabbatch = setBatchLesionOverlapMap(matlabbatch, BIDS, opt, subLabel)
%
% Creates a batch for the lesion overlap map
@@ -12,6 +10,8 @@
% :type matlabbatch: structure
%
% :returns: - :matlabbatch: (structure)
+ %
+ % (C) Copyright 2021 CPP_SPM developers
printBatchName('Lesion overlap map');
diff --git a/src/batches/setBatchLesionSegmentation.m b/src/batches/setBatchLesionSegmentation.m
index 8a0a7e22..858cea1d 100755
--- a/src/batches/setBatchLesionSegmentation.m
+++ b/src/batches/setBatchLesionSegmentation.m
@@ -1,5 +1,3 @@
-% (C) Copyright 2021 CPP BIDS SPM-pipeline developers
-
function matlabbatch = setBatchLesionSegmentation(matlabbatch, BIDS, opt, subLabel)
%
% Creates a batch to segment the anatomical image for lesion detection
@@ -12,6 +10,8 @@
% :type matlabbatch: structure
%
% :returns: - :matlabbatch: (structure)
+ %
+ % (C) Copyright 2021 CPP_SPM developers
printBatchName('Lesion segmentation');
diff --git a/src/batches/setBatchMeanAnatAndMask.m b/src/batches/setBatchMeanAnatAndMask.m
index 41839db5..cb661973 100644
--- a/src/batches/setBatchMeanAnatAndMask.m
+++ b/src/batches/setBatchMeanAnatAndMask.m
@@ -1,5 +1,3 @@
-% (C) Copyright 2019 CPP BIDS SPM-pipeline developers
-
function matlabbatch = setBatchMeanAnatAndMask(matlabbatch, opt, funcFWHM, outputDir)
%
% Creates batxh to create mean anatomical image and a group mask
@@ -18,6 +16,7 @@
%
% :returns: - :matlabbatch: (structure)
%
+ % (C) Copyright 2019 CPP_SPM developers
[BIDS, opt] = getData(opt);
diff --git a/src/batches/setBatchNormalizationSpatialPrepro.m b/src/batches/setBatchNormalizationSpatialPrepro.m
index effe07e1..918ae121 100644
--- a/src/batches/setBatchNormalizationSpatialPrepro.m
+++ b/src/batches/setBatchNormalizationSpatialPrepro.m
@@ -1,5 +1,3 @@
-% (C) Copyright 2019 CPP BIDS SPM-pipeline developers
-
function matlabbatch = setBatchNormalizationSpatialPrepro(matlabbatch, opt, voxDim)
%
% Short description of what the function does goes here.
@@ -17,6 +15,7 @@
%
% :returns: - :matlabbatch: (structure)
%
+ % (C) Copyright 2019 CPP_SPM developers
jobsToAdd = numel(matlabbatch) + 1;
diff --git a/src/batches/setBatchNormalize.m b/src/batches/setBatchNormalize.m
index 4416d37d..5af36e79 100644
--- a/src/batches/setBatchNormalize.m
+++ b/src/batches/setBatchNormalize.m
@@ -1,5 +1,3 @@
-% (C) Copyright 2019 CPP BIDS SPM-pipeline developers
-
function matlabbatch = setBatchNormalize(matlabbatch, deformField, voxDim, imgToResample)
%
% Short description of what the function does goes here.
@@ -19,6 +17,7 @@
%
% :returns: - :matlabbatch: (structure)
%
+ % (C) Copyright 2019 CPP_SPM developers
if nargin > 1 && ~isempty(deformField)
matlabbatch{end + 1}.spm.spatial.normalise.write.subj.def(1) = deformField;
diff --git a/src/batches/setBatchPrintFigure.m b/src/batches/setBatchPrintFigure.m
index fbdac056..2f6fb363 100644
--- a/src/batches/setBatchPrintFigure.m
+++ b/src/batches/setBatchPrintFigure.m
@@ -1,5 +1,3 @@
-% (C) Copyright 2020 CPP BIDS SPM-pipeline developers
-
function matlabbatch = setBatchPrintFigure(matlabbatch, figureName)
%
% template to creae new setBatch functions
@@ -14,6 +12,8 @@
% :type figureName: string
%
% :returns: - :matlabbatch: (structure) The matlabbatch ready to run the spm job
+ %
+ % (C) Copyright 2020 CPP_SPM developers
if spm('CmdLine', true)
diff --git a/src/batches/setBatchRealign.m b/src/batches/setBatchRealign.m
index a911aa12..f04d6e63 100644
--- a/src/batches/setBatchRealign.m
+++ b/src/batches/setBatchRealign.m
@@ -1,5 +1,3 @@
-% (C) Copyright 2020 CPP BIDS SPM-pipeline developers
-
function [matlabbatch, voxDim] = setBatchRealign(varargin)
%
% Set the batch for realign / realign and reslice / realign and unwarp
@@ -25,9 +23,12 @@
%
% :returns: - :matlabbatch: (structure) (dimension)
% - :voxDim: (array) (dimension)
-
- % TODO:
- % make which image is resliced more consistent 'which = []'
+ %
+ % TODO::
+ %
+ % make which image is resliced more consistent 'which = []'
+ %
+ % (C) Copyright 2020 CPP_SPM developers
if numel(varargin) < 5
[matlabbatch, BIDS, opt, subLabel] = deal(varargin{:});
diff --git a/src/batches/setBatchReslice.m b/src/batches/setBatchReslice.m
index 97a08d94..534a4f92 100644
--- a/src/batches/setBatchReslice.m
+++ b/src/batches/setBatchReslice.m
@@ -1,5 +1,3 @@
-% (C) Copyright 2020 CPP BIDS SPM-pipeline developers
-
function matlabbatch = setBatchReslice(matlabbatch, referenceImg, sourceImages, interp)
%
% Set the batch for reslicing source images to the reference image resolution
@@ -18,6 +16,7 @@
%
% :returns: - :matlabbatch: (structure) The matlabbatch ready to run the spm job
%
+ % (C) Copyright 2020 CPP_SPM developers
printBatchName('reslicing');
diff --git a/src/batches/setBatchResults.m b/src/batches/setBatchResults.m
index 84b73eab..4e4cf24b 100644
--- a/src/batches/setBatchResults.m
+++ b/src/batches/setBatchResults.m
@@ -1,5 +1,3 @@
-% (C) Copyright 2019 CPP BIDS SPM-pipeline developers
-
function matlabbatch = setBatchResults(matlabbatch, result)
%
% Outputs the typical matlabbatch to compute the results for a given contrast
@@ -21,6 +19,8 @@
% :returns: - :matlabbatch: (structure)
%
%
+ % (C) Copyright 2019 CPP_SPM developers
+
result.outputNameStructure.sub = result.label;
result.outputNameStructure.desc = result.Contrasts.Name;
result.outputNameStructure.p = num2str(result.Contrasts.p);
diff --git a/src/batches/setBatchSTC.m b/src/batches/setBatchSTC.m
index 0d4d9658..462493a0 100644
--- a/src/batches/setBatchSTC.m
+++ b/src/batches/setBatchSTC.m
@@ -1,5 +1,3 @@
-% (C) Copyright 2019 CPP BIDS SPM-pipeline developers
-
function matlabbatch = setBatchSTC(matlabbatch, BIDS, opt, subLabel)
%
% Creates batch for slice timing correction
@@ -30,6 +28,7 @@
% If not specified this function will take the mid-volume time point as reference
% to do the slice timing correction
%
+ % (C) Copyright 2019 CPP_SPM developers
% get slice order
sliceOrder = getSliceOrder(opt, 1);
diff --git a/src/batches/setBatchSaveCoregistrationMatrix.m b/src/batches/setBatchSaveCoregistrationMatrix.m
index ab9fb872..2af36499 100644
--- a/src/batches/setBatchSaveCoregistrationMatrix.m
+++ b/src/batches/setBatchSaveCoregistrationMatrix.m
@@ -1,5 +1,3 @@
-% (C) Copyright 2020 CPP BIDS SPM-pipeline developers
-
function matlabbatch = setBatchSaveCoregistrationMatrix(matlabbatch, BIDS, opt, subLabel)
%
% Short description of what the function does goes here.
@@ -19,6 +17,7 @@
%
% :returns: - :matlabbatch:
%
+ % (C) Copyright 2020 CPP_SPM developers
printBatchName('saving coregistration matrix');
diff --git a/src/batches/setBatchSegmentation.m b/src/batches/setBatchSegmentation.m
index 395cc588..2b86fe4b 100644
--- a/src/batches/setBatchSegmentation.m
+++ b/src/batches/setBatchSegmentation.m
@@ -1,5 +1,3 @@
-% (C) Copyright 2020 CPP BIDS SPM-pipeline developers
-
function matlabbatch = setBatchSegmentation(matlabbatch, opt, imageToSegment)
%
% Creates a batch to segment the anatomical image
@@ -16,6 +14,7 @@
%
% :returns: :matlabbatch: (structure)
%
+ % (C) Copyright 2020 CPP_SPM developers
printBatchName('Segmentation anatomical image');
diff --git a/src/batches/setBatchSelectAnat.m b/src/batches/setBatchSelectAnat.m
index e8e11bd1..b934ce5f 100644
--- a/src/batches/setBatchSelectAnat.m
+++ b/src/batches/setBatchSelectAnat.m
@@ -1,5 +1,3 @@
-% (C) Copyright 2020 CPP BIDS SPM-pipeline developers
-
function matlabbatch = setBatchSelectAnat(matlabbatch, BIDS, opt, subLabel)
%
% Creates a batch to set an anatomical image
@@ -26,6 +24,8 @@
% - session to select the anat from = opt.anatReference.session (default = 1)
%
% We assume that the first anat of that type is the "correct" one
+ %
+ % (C) Copyright 2020 CPP_SPM developers
printBatchName('selecting anatomical image');
diff --git a/src/batches/setBatchSkullStripping.m b/src/batches/setBatchSkullStripping.m
index 52166108..db416ea3 100644
--- a/src/batches/setBatchSkullStripping.m
+++ b/src/batches/setBatchSkullStripping.m
@@ -1,5 +1,3 @@
-% (C) Copyright 2020 CPP BIDS SPM-pipeline developers
-
function matlabbatch = setBatchSkullStripping(matlabbatch, BIDS, opt, subLabel)
%
% Creates a batch to compute a brain mask based on the tissue probability maps
@@ -33,6 +31,8 @@
% Any voxel with p(grayMatter) + p(whiteMatter) + p(CSF) > threshold
% will be included in the skull stripping mask.
%
+ %
+ % (C) Copyright 2020 CPP_SPM developers
printBatchName('skull stripping');
diff --git a/src/batches/setBatchSmoothConImages.m b/src/batches/setBatchSmoothConImages.m
index 9e8d6dd0..f92b5a06 100644
--- a/src/batches/setBatchSmoothConImages.m
+++ b/src/batches/setBatchSmoothConImages.m
@@ -1,5 +1,3 @@
-% (C) Copyright 2019 CPP BIDS SPM-pipeline developers
-
function matlabbatch = setBatchSmoothConImages(matlabbatch, opt, funcFWHM, conFWHM)
%
% Creates a batch to smooth all the con images of all subjects
@@ -21,6 +19,7 @@
%
% :returns: - :matlabbatch:
%
+ % (C) Copyright 2019 CPP_SPM developers
printBatchName('smoothing contrast images');
diff --git a/src/batches/setBatchSmoothing.m b/src/batches/setBatchSmoothing.m
index f0e353de..349077bc 100644
--- a/src/batches/setBatchSmoothing.m
+++ b/src/batches/setBatchSmoothing.m
@@ -1,5 +1,3 @@
-% (C) Copyright 2019 CPP BIDS SPM-pipeline developers
-
function matlabbatch = setBatchSmoothing(matlabbatch, images, FWHM, prefix)
%
% Small wrapper to create smoothing batch
@@ -20,6 +18,7 @@
% :returns: - :matlabbatch: (structure)
%
%
+ % (C) Copyright 2019 CPP_SPM developers
printBatchName('smoothing images');
diff --git a/src/batches/setBatchSmoothingFunc.m b/src/batches/setBatchSmoothingFunc.m
index 3baf0487..e2aea02c 100644
--- a/src/batches/setBatchSmoothingFunc.m
+++ b/src/batches/setBatchSmoothingFunc.m
@@ -1,5 +1,3 @@
-% (C) Copyright 2019 CPP BIDS SPM-pipeline developers
-
function matlabbatch = setBatchSmoothingFunc(matlabbatch, BIDS, opt, subID, funcFWHM)
%
% Short description of what the function does goes here.
@@ -22,6 +20,7 @@
% :returns: - :matlabbatch: (structure)
%
%
+ % (C) Copyright 2019 CPP_SPM developers
printBatchName('smoothing functional images');
diff --git a/src/batches/setBatchSubjectLevelContrasts.m b/src/batches/setBatchSubjectLevelContrasts.m
index 593d4973..7791b17c 100644
--- a/src/batches/setBatchSubjectLevelContrasts.m
+++ b/src/batches/setBatchSubjectLevelContrasts.m
@@ -1,5 +1,3 @@
-% (C) Copyright 2019 CPP BIDS SPM-pipeline developers
-
function matlabbatch = setBatchSubjectLevelContrasts(matlabbatch, opt, subLabel, funcFWHM)
%
% Short description of what the function does goes here.
@@ -19,6 +17,7 @@
%
% :returns: - :matlabbatch:
%
+ % (C) Copyright 2019 CPP_SPM developers
printBatchName('subject level contrasts specification');
diff --git a/src/batches/setBatchSubjectLevelGLMSpec.m b/src/batches/setBatchSubjectLevelGLMSpec.m
index 65688901..70fd2795 100644
--- a/src/batches/setBatchSubjectLevelGLMSpec.m
+++ b/src/batches/setBatchSubjectLevelGLMSpec.m
@@ -1,5 +1,3 @@
-% (C) Copyright 2019 CPP BIDS SPM-pipeline developers
-
function matlabbatch = setBatchSubjectLevelGLMSpec(varargin)
%
% Short description of what the function does goes here.
@@ -18,6 +16,7 @@
% :returns: - :argout1: (type) (dimension)
% - :argout2: (type) (dimension)
%
+ % (C) Copyright 2019 CPP_SPM developers
[matlabbatch, BIDS, opt, subLabel, funcFWHM] = deal(varargin{:});
diff --git a/src/batches/setBatchSubjectLevelResults.m b/src/batches/setBatchSubjectLevelResults.m
index ff2638d3..7a73cd55 100644
--- a/src/batches/setBatchSubjectLevelResults.m
+++ b/src/batches/setBatchSubjectLevelResults.m
@@ -1,5 +1,3 @@
-% (C) Copyright 2019 CPP BIDS SPM-pipeline developers
-
function matlabbatch = setBatchSubjectLevelResults(varargin)
%
% Short description of what the function does goes here.
@@ -23,6 +21,7 @@
%
% :returns: - :matlabbatch: (structure)
%
+ % (C) Copyright 2019 CPP_SPM developers
[matlabbatch, opt, subLabel, funcFWHM, iStep, iCon] = deal(varargin{:});
diff --git a/src/utils/checkDependencies.m b/src/utils/checkDependencies.m
index 2dd645ce..dfb09d5b 100644
--- a/src/utils/checkDependencies.m
+++ b/src/utils/checkDependencies.m
@@ -1,20 +1,14 @@
-% (C) Copyright 2019 CPP BIDS SPM-pipeline developers
-
function checkDependencies()
%
- % Checks that that the right dependencies are installed:
- % - SPM
- % - Nifti tools
- % Also loads the spm defaults.
+ % Checks that that the right dependencies are installeda and
+ % loads the spm defaults.
%
% USAGE::
%
% checkDependencies()
%
- % .. TODO:
- % - refactor in a several sub functions to cehck each dependency
- % - need to check other dependencies (bids-matlab, spmup)
%
+ % (C) Copyright 2019 CPP_SPM developers
fprintf('Checking dependencies\n');
diff --git a/src/utils/cleanCrash.m b/src/utils/cleanCrash.m
index c8cce61d..d0b594b3 100644
--- a/src/utils/cleanCrash.m
+++ b/src/utils/cleanCrash.m
@@ -1,5 +1,3 @@
-% (C) Copyright 2020 CPP BIDS SPM-pipeline developers
-
function cleanCrash()
%
% Removes any files left over from a previous unfinished run of the pipeline,
@@ -10,6 +8,7 @@ function cleanCrash()
% cleanCrash()
%
%
+ % (C) Copyright 2020 CPP_SPM developers
files = {'spm.*.png'};
diff --git a/src/utils/createDataDictionary.m b/src/utils/createDataDictionary.m
index 973b1c0d..f7073d11 100644
--- a/src/utils/createDataDictionary.m
+++ b/src/utils/createDataDictionary.m
@@ -1,5 +1,3 @@
-% (C) Copyright 2020 CPP BIDS SPM-pipeline developers
-
function createDataDictionary(subFuncDataDir, fileName, nbColums)
%
% Short description of what the function does goes here.
@@ -15,6 +13,7 @@ function createDataDictionary(subFuncDataDir, fileName, nbColums)
% :param nbColums: Number of extra columns to add as censoring regressors.
% :type nbColums: integer
%
+ % (C) Copyright 2020 CPP_SPM developers
namecColumns = { ...
'trans_x', ...
diff --git a/src/utils/createDerivativeDir.m b/src/utils/createDerivativeDir.m
index dd947ac0..2f4b7fef 100644
--- a/src/utils/createDerivativeDir.m
+++ b/src/utils/createDerivativeDir.m
@@ -1,5 +1,3 @@
-% (C) Copyright 2019 CPP BIDS SPM-pipeline developers
-
function createDerivativeDir(opt)
%
% Creates the derivative folder if it does not exist.
@@ -11,6 +9,7 @@ function createDerivativeDir(opt)
% :param opt: Options chosen for the analysis. See ``checkOptions()``.
% :type opt: structure
%
+ % (C) Copyright 2019 CPP_SPM developers
if ~exist(opt.derivativesDir, 'dir')
mkdir(opt.derivativesDir);
diff --git a/src/utils/createGlmDirName.m b/src/utils/createGlmDirName.m
index 8406337f..43e5dcd9 100644
--- a/src/utils/createGlmDirName.m
+++ b/src/utils/createGlmDirName.m
@@ -1,6 +1,6 @@
-% (C) Copyright 2021 CPP BIDS SPM-pipeline developers
-
function glmDirName = createGlmDirName(opt, FWHM)
+ %
+ % (C) Copyright 2021 CPP_SPM developers
glmDirName = ['task-', opt.taskName, ...
'_space-' opt.space, ...
diff --git a/src/utils/getEnvInfo.m b/src/utils/getEnvInfo.m
index 6d54cf54..0f8734ba 100644
--- a/src/utils/getEnvInfo.m
+++ b/src/utils/getEnvInfo.m
@@ -1,5 +1,3 @@
-% (C) Copyright 2020 CPP BIDS SPM-pipeline developers
-
function [OS, GeneratedBy] = getEnvInfo()
%
% Gets information about the environement and operating system to help generate
@@ -12,6 +10,7 @@
% :returns: :OS: (structure) (dimension)
% :GeneratedBy: (structure) (dimension)
%
+ % (C) Copyright 2020 CPP_SPM developers
GeneratedBy(1).name = 'cpp_spm';
GeneratedBy(1).Version = getVersion();
diff --git a/src/utils/getSubjectList.m b/src/utils/getSubjectList.m
index 75d05ef1..9bb2a3ae 100644
--- a/src/utils/getSubjectList.m
+++ b/src/utils/getSubjectList.m
@@ -1,5 +1,3 @@
-% (C) Copyright 2021 CPP BIDS SPM-pipeline developers
-
function opt = getSubjectList(BIDS, opt)
%
% Returns the subjects to analyze in ``opt.subjects``
@@ -38,6 +36,8 @@
%
% opt.groups = {''};
% opt.subjects = {'01', 'cont01', 'cat02', 'ctrl02', 'blind01'};
+ %
+ % (C) Copyright 2021 CPP_SPM developers
allSubjects = bids.query(BIDS, 'subjects');
diff --git a/src/utils/getVersion.m b/src/utils/getVersion.m
index a0ef2b7a..f3471a6a 100644
--- a/src/utils/getVersion.m
+++ b/src/utils/getVersion.m
@@ -1,5 +1,3 @@
-% (C) Copyright 2020 CPP BIDS SPM-pipeline developers
-
function versionNumber = getVersion()
%
% Reads the version number of the pipeline from the txt file in the root of the
@@ -11,6 +9,7 @@
%
% :returns: :versionNumber: (string) Use semantic versioning format (like v0.1.0)
%
+ % (C) Copyright 2020 CPP_SPM developers
try
versionNumber = fileread(fullfile(fileparts(mfilename('fullpath')), ...
diff --git a/src/utils/isOctave.m b/src/utils/isOctave.m
index 5fe03b9f..a0c14fa7 100644
--- a/src/utils/isOctave.m
+++ b/src/utils/isOctave.m
@@ -1,6 +1,3 @@
-% (C) Copyright 2020 Agah Karakuzu
-% (C) Copyright 2020 CPP BIDS SPM-pipeline developers
-
function retval = isOctave()
%
% Returns true if the environment is Octave.
@@ -11,6 +8,8 @@
%
% :returns: :retval: (boolean)
%
+ % (C) Copyright 2020 Agah Karakuzu
+ % (C) Copyright 2020 CPP_SPM developers
persistent cacheval % speeds up repeated calls
diff --git a/src/utils/loadAndCheckOptions.m b/src/utils/loadAndCheckOptions.m
index 72df76b5..5ee90829 100644
--- a/src/utils/loadAndCheckOptions.m
+++ b/src/utils/loadAndCheckOptions.m
@@ -1,5 +1,3 @@
-% (C) Copyright 2020 CPP BIDS SPM-pipeline developers
-
function opt = loadAndCheckOptions(optionJsonFile)
%
% Loads the json file provided describing the options of an analysis. It then checks
@@ -23,6 +21,8 @@
% .. TODO
%
% - add test for when the input is a structure.
+ %
+ % (C) Copyright 2020 CPP_SPM developers
if nargin < 1 || isempty(optionJsonFile)
optionJsonFile = spm_select('FPList', ...
diff --git a/src/utils/manageWorkersPool.m b/src/utils/manageWorkersPool.m
index b5a8c08b..76a1f3e6 100644
--- a/src/utils/manageWorkersPool.m
+++ b/src/utils/manageWorkersPool.m
@@ -1,5 +1,3 @@
-% (C) Copyright 2020 CPP BIDS SPM-pipeline developers
-
function manageWorkersPool(action, opt)
%
% Check matlab version and opens pool of workers for parallel work.
@@ -19,6 +17,7 @@ function manageWorkersPool(action, opt)
% opt.parallelize.nbWorkers = 3;
% opt.parallelize.killOnExit = true;
%
+ % (C) Copyright 2020 CPP_SPM developers
if ~opt.parallelize.do
opt.parallelize.nbWorkers = 1;
diff --git a/src/utils/printBatchName.m b/src/utils/printBatchName.m
index 32471cfe..8d103b6d 100644
--- a/src/utils/printBatchName.m
+++ b/src/utils/printBatchName.m
@@ -1,6 +1,6 @@
-% (C) Copyright 2019 CPP BIDS SPM-pipeline developers
-
function printBatchName(batchName)
+ %
+ % (C) Copyright 2019 CPP_SPM developers
fprintf(1, '\n BUILDING JOB: %s\n', lower(batchName));
diff --git a/src/utils/printCredits.m b/src/utils/printCredits.m
index 5e3cb4d7..d1122a28 100644
--- a/src/utils/printCredits.m
+++ b/src/utils/printCredits.m
@@ -1,10 +1,11 @@
-% (C) Copyright 2019 CPP BIDS SPM-pipeline developers
-
function printCredits()
+ %
+ % TODO: use the .zenodo.json to load contributors
+ %
+ % (C) Copyright 2019 CPP_SPM developers
versionNumber = getVersion();
- % TODO: use the .zenodo.json to load contributors
contributors = { ...
'Mohamed Rezk', ...
'Remi Gau', ...
diff --git a/src/utils/printProcessingRun.m b/src/utils/printProcessingRun.m
index 29769001..7ac315cb 100644
--- a/src/utils/printProcessingRun.m
+++ b/src/utils/printProcessingRun.m
@@ -1,6 +1,6 @@
-% (C) Copyright 2019 CPP BIDS SPM-pipeline developers
-
function printProcessingRun(groupName, iSub, subID, iSes, iRun)
+ %
+ % (C) Copyright 2019 CPP_SPM developers
fprintf(1, ...
[ ...
diff --git a/src/utils/printProcessingSubject.m b/src/utils/printProcessingSubject.m
index a0668d42..d7131e87 100644
--- a/src/utils/printProcessingSubject.m
+++ b/src/utils/printProcessingSubject.m
@@ -1,6 +1,6 @@
-% (C) Copyright 2019 CPP BIDS SPM-pipeline developers
-
function printProcessingSubject(iSub, subLabel)
+ %
+ % (C) Copyright 2019 CPP_SPM developers
fprintf(1, [ ...
' PROCESSING SUBJECT No.: %i ' ...
diff --git a/src/utils/printWorklowName.m b/src/utils/printWorklowName.m
index 9b4155fd..395c08b8 100644
--- a/src/utils/printWorklowName.m
+++ b/src/utils/printWorklowName.m
@@ -1,6 +1,6 @@
-% (C) Copyright 2019 CPP BIDS SPM-pipeline developers
-
function printWorklowName(workflowName)
+ %
+ % (C) Copyright 2019 CPP_SPM developers
fprintf(1, '\n\n\nWORKFLOW: %s\n\n', upper(workflowName));
diff --git a/src/utils/removeSpmPrefix.m b/src/utils/removeSpmPrefix.m
index 0ea6e3c4..cb5a2ba2 100644
--- a/src/utils/removeSpmPrefix.m
+++ b/src/utils/removeSpmPrefix.m
@@ -1,6 +1,6 @@
-% (C) Copyright 2019 CPP BIDS SPM-pipeline developers
-
function image = removeSpmPrefix(image, prefix)
+ %
+ % (C) Copyright 2019 CPP_SPM developers
basename = spm_file(image, 'basename');
tmp = spm_file(image, 'basename', basename(length(prefix) + 1:end));
diff --git a/src/utils/rmTrialTypeStr.m b/src/utils/rmTrialTypeStr.m
index 82116dd6..cc5063c5 100644
--- a/src/utils/rmTrialTypeStr.m
+++ b/src/utils/rmTrialTypeStr.m
@@ -1,5 +1,6 @@
-% (C) Copyright 2019 CPP BIDS SPM-pipeline developers
function conName = rmTrialTypeStr(conName)
+ %
+ % (C) Copyright 2019 CPP_SPM developers
conName = strrep(conName, 'trial_type.', '');
diff --git a/src/utils/saveMatlabBatch.m b/src/utils/saveMatlabBatch.m
index 7d6c7ff0..82212ff4 100644
--- a/src/utils/saveMatlabBatch.m
+++ b/src/utils/saveMatlabBatch.m
@@ -1,5 +1,3 @@
-% (C) Copyright 2019 CPP BIDS SPM-pipeline developers
-
function saveMatlabBatch(matlabbatch, batchType, opt, subID)
%
% Also save some basic environnment info.
@@ -18,6 +16,7 @@ function saveMatlabBatch(matlabbatch, batchType, opt, subID)
% :type subID: string
%
%
+ % (C) Copyright 2019 CPP_SPM developers
if nargin < 4 || isempty(subID)
subID = 'group';
diff --git a/src/utils/saveOptions.m b/src/utils/saveOptions.m
index 0334f275..df3964c0 100644
--- a/src/utils/saveOptions.m
+++ b/src/utils/saveOptions.m
@@ -1,5 +1,3 @@
-% (C) Copyright 2020 CPP BIDS SPM-pipeline developers
-
function saveOptions(opt)
%
% Short description of what the function does goes here.
@@ -11,6 +9,7 @@ function saveOptions(opt)
% :param opt: Options chosen for the analysis. See ``checkOptions()``.
% :type opt: structure
%
+ % (C) Copyright 2020 CPP_SPM developers
optionDir = fullfile(pwd, 'cfg');
[~, ~, ~] = mkdir(optionDir);
diff --git a/src/utils/setFields.m b/src/utils/setFields.m
index 31cefc41..a82a0d87 100644
--- a/src/utils/setFields.m
+++ b/src/utils/setFields.m
@@ -1,5 +1,3 @@
-% (C) Copyright 2020 CPP BIDS SPM-pipeline developers
-
function structure = setFields(structure, fieldsToSet, overwrite)
%
% Recursively loop through the fields of a target ``structure`` and sets the values
@@ -22,6 +20,7 @@
% :returns: - :structure: (structure)
%
%
+ % (C) Copyright 2020 CPP_SPM developers
if isempty(fieldsToSet)
return
diff --git a/src/utils/setGraphicWindow.m b/src/utils/setGraphicWindow.m
index 2d75a2c6..943cc27d 100644
--- a/src/utils/setGraphicWindow.m
+++ b/src/utils/setGraphicWindow.m
@@ -1,5 +1,3 @@
-% (C) Copyright 2019 CPP BIDS SPM-pipeline developers
-
function [interactiveWindow, graphWindow, cmdLine] = setGraphicWindow()
%
% Short description of what the function does goes here.
@@ -19,6 +17,7 @@
% :returns: - :argout1: (type) (dimension)
% - :argout2: (type) (dimension)
%
+ % (C) Copyright 2019 CPP_SPM developers
interactiveWindow = [];
graphWindow = [];
diff --git a/src/utils/validationInputFile.m b/src/utils/validationInputFile.m
index 10cf7aec..23b7dbdd 100644
--- a/src/utils/validationInputFile.m
+++ b/src/utils/validationInputFile.m
@@ -1,5 +1,3 @@
-% (C) Copyright 2019 CPP BIDS SPM-pipeline developers
-
function files = validationInputFile(dir, fileNamePattern, prefix)
%
% Looks for file name pattern in a given directory and returns all the files
@@ -41,6 +39,7 @@
% % tissueProbaMaps = validationInputFile(anatDataDir, anatImage, 'c[12]');
%
%
+ % (C) Copyright 2019 CPP_SPM developers
% try to guess directory in case a fullpath filename was given
if isempty(dir)
diff --git a/src/utils/writeDatasetDescription.m b/src/utils/writeDatasetDescription.m
index c7641e28..7699c682 100644
--- a/src/utils/writeDatasetDescription.m
+++ b/src/utils/writeDatasetDescription.m
@@ -1,6 +1,6 @@
-% (C) Copyright 2020 CPP BIDS SPM-pipeline developers
-
function writeDatasetDescription(opt)
+ %
+ % (C) Copyright 2020 CPP_SPM developers
oldDatasetDescription = spm_jsonread(fullfile(opt.derivativesDir, 'dataset_description.json'));
@@ -8,7 +8,7 @@ function writeDatasetDescription(opt)
if isfield(oldDatasetDescription, 'DatasetDOI')
newDatasetDescription.SourceDatasets{1}.DOI = ...
- oldDatasetDescription.DatasetDOI;
+ oldDatasetDescription.DatasetDOI;
end
spm_jsonwrite( ...
diff --git a/src/workflows/bidsCreateROI.m b/src/workflows/bidsCreateROI.m
index 28263901..07127220 100644
--- a/src/workflows/bidsCreateROI.m
+++ b/src/workflows/bidsCreateROI.m
@@ -9,7 +9,7 @@ function bidsCreateROI(opt)
[BIDS, opt] = setUpWorkflow(opt, 'create ROI');
opt.dir.roi = [opt.derivativesDir '-roi'];
- spm_mkdir(fullfile(opt.roiDir, 'group'));
+ spm_mkdir(fullfile(opt.dir.roi, 'group'));
opt.jobsDir = fullfile(opt.dir.roi, 'JOBS', opt.taskName);
@@ -31,7 +31,7 @@ function bidsCreateROI(opt)
if any(strcmp(opt.roi.space, 'individual'))
roiList = spm_select('FPlist', ...
- fullfile(opt.roiDir, 'group'), ...
+ fullfile(opt.dir.roi, 'group'), ...
'^space-.*_mask.nii$');
for iSub = 1:numel(opt.subjects)
@@ -60,7 +60,7 @@ function bidsCreateROI(opt)
spm_mkdir(opt.dir.roi, ['sub-' subLabel], 'roi');
roiList = spm_select('FPlist', ...
- fullfile(opt.roiDir, 'group'), ...
+ fullfile(opt.dir.roi, 'group'), ...
'^wspace.*_mask.nii.*$');
for iROI = 1:size(roiList, 1)
From f1cc4263c0867a32d084c5acb4dbaa8f994329c2 Mon Sep 17 00:00:00 2001
From: Remi Gau
Date: Tue, 13 Apr 2021 11:28:31 +0200
Subject: [PATCH 17/18] remove markdown linting
---
.github/workflows/check_markdown.yml | 32 ----------------------------
.remarkrc | 11 ----------
npm-requirements.txt | 6 ------
3 files changed, 49 deletions(-)
delete mode 100644 .github/workflows/check_markdown.yml
delete mode 100644 .remarkrc
delete mode 100644 npm-requirements.txt
diff --git a/.github/workflows/check_markdown.yml b/.github/workflows/check_markdown.yml
deleted file mode 100644
index 1b997e3d..00000000
--- a/.github/workflows/check_markdown.yml
+++ /dev/null
@@ -1,32 +0,0 @@
-name: Check Markdown
-
-on:
- push:
- branches:
- - master
- pull_request:
- branches: '*'
-
-jobs:
- build:
-
- runs-on: ubuntu-latest
-
- steps:
-
- - uses: actions/checkout@v2
- with:
- submodules: true
- fetch-depth: 1
-
- - uses: actions/setup-node@v2
- with:
- node-version: '10'
-
- - name: Install dependencies and check markdown
- run: |
- npm install `cat npm-requirements.txt`
- npx remark *.md --frail
- npx remark ./docs/ --frail
- npx remark ./demos/ --frail
- npx remark ./tests/ --frail
diff --git a/.remarkrc b/.remarkrc
deleted file mode 100644
index 201ce70e..00000000
--- a/.remarkrc
+++ /dev/null
@@ -1,11 +0,0 @@
-{
- "plugins": [
- "preset-lint-consistent",
- "preset-lint-markdown-style-guide",
- "preset-lint-recommended",
- ["lint-no-duplicate-headings", false],
- ["lint-list-item-indent", "tab-size"],
- ["lint-maximum-line-length", true],
- ["lint-maximum-heading-length", false]
- ]
-}
diff --git a/npm-requirements.txt b/npm-requirements.txt
deleted file mode 100644
index 061f9ade..00000000
--- a/npm-requirements.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-remark-cli@5.0.0
-remark-lint@6.0.2
-remark-preset-lint-recommended@3.0.2
-remark-preset-lint-markdown-style-guide@2.1.2
-remark-preset-lint-consistent
-
From 5030c45346ba5fb978aa48aff03bb64ae60e9580 Mon Sep 17 00:00:00 2001
From: Remi Gau
Date: Tue, 13 Apr 2021 11:35:28 +0200
Subject: [PATCH 18/18] fix doc
---
.gitignore | 1 +
docs/README.md | 4 +--
docs/source/batches.rst | 14 ++++++--
docs/source/contributing.rst | 32 -------------------
docs/source/demos.rst | 11 +++++++
docs/source/function_description.rst | 15 +++++++--
docs/source/index.rst | 7 ++--
docs/source/mancoreg.rst | 2 +-
docs/source/workflows.rst | 7 ++++
.../setBatchLesionAbnormalitiesDetection.m | 4 +--
src/defaults/checkOptions.m | 15 ++++++---
src/getInfo.m | 2 +-
src/reports/reportBIDS.m | 1 +
src/subject_level/convertOnsetTsvToMat.m | 2 +-
src/subject_level/createAndReturnOnsetFile.m | 4 +--
src/utils/cleanCrash.m | 2 +-
src/workflows/bidsSmoothing.m | 3 +-
src/workflows/saveAndRunWorkflow.m | 1 +
18 files changed, 71 insertions(+), 56 deletions(-)
create mode 100644 docs/source/demos.rst
diff --git a/.gitignore b/.gitignore
index d520b176..f0a8a647 100644
--- a/.gitignore
+++ b/.gitignore
@@ -29,6 +29,7 @@ docs/build/*
# ignore virtual env
cpp_spm/*
+env/*
# visual studio code stuff
.vscode
diff --git a/docs/README.md b/docs/README.md
index 4f1ca4e7..add9f199 100644
--- a/docs/README.md
+++ b/docs/README.md
@@ -3,8 +3,8 @@
## Set up virtual environment
```bash
-virtualenv -p python3 cpp_spm
-source cpp_spm/bin/activate
+virtualenv -p /usr/bin/python3 env
+source env/bin/activate
pip install -r requirements.txt
```
diff --git a/docs/source/batches.rst b/docs/source/batches.rst
index 9da85ccb..86076033 100644
--- a/docs/source/batches.rst
+++ b/docs/source/batches.rst
@@ -7,25 +7,35 @@ List of functions to set SPM batches.
.. automodule:: src.batches
+.. autofunction:: setBatch3Dto4D
.. autofunction:: setBatchComputeVDM
+.. autofunction:: setBatchContrasts
.. autofunction:: setBatchCoregistrationFmap
.. autofunction:: setBatchCoregistrationFuncToAnat
.. autofunction:: setBatchCoregistration
.. autofunction:: setBatchCreateVDMs
+.. autofunction:: setBatchEstimateModel
.. autofunction:: setBatchFactorialDesign
+.. autofunction:: setBatchGroupLevelContrasts
.. autofunction:: setBatchImageCalculation
+.. autofunction:: setBatchLesionAbnormalitiesDetection
+.. autofunction:: setBatchLesionOverlapMap
+.. autofunction:: setBatchLesionSegmentation
.. autofunction:: setBatchMeanAnatAndMask
.. autofunction:: setBatchNormalizationSpatialPrepro
.. autofunction:: setBatchNormalize
+.. autofunction:: setBatchPrintFigure
.. autofunction:: setBatchRealign
.. autofunction:: setBatchReslice
+.. autofunction:: setBatchResults
.. autofunction:: setBatchSaveCoregistrationMatrix
.. autofunction:: setBatchSegmentation
.. autofunction:: setBatchSelectAnat
.. autofunction:: setBatchSkullStripping
.. autofunction:: setBatchSmoothConImages
+.. autofunction:: setBatchSmoothingFunc
.. autofunction:: setBatchSmoothing
.. autofunction:: setBatchSTC
.. autofunction:: setBatchSubjectLevelContrasts
-.. autofunction:: setBatchSubjectLevelGLMSpec
-
\ No newline at end of file
+.. autofunction:: setBatchSubjectLevelGLMSpec
+.. autofunction:: setBatchSubjectLevelResults
\ No newline at end of file
diff --git a/docs/source/contributing.rst b/docs/source/contributing.rst
index d9855ed0..de47e77f 100644
--- a/docs/source/contributing.rst
+++ b/docs/source/contributing.rst
@@ -47,38 +47,6 @@ Template proposal
.. autofunction:: templateFunction
-----
-
-Numpy template
---------------
-
-See more information `here
-`_
-
-::
-
- function [argout] = templateFunction(argin1, argin2, argin3)
- %
- % Short description of what the function does goes here.
- %
- % y = templateFunction(argin1, argin2, argin3)
- %
- % Parameters:
- % argin1: The first input value
- %
- % argin2: The second input value
- %
- % argin3: The third input value
- %
- % Returns:
- % The output value
-
- % The code goes below
-
- end
-
-.. autofunction:: templateFunctionNumpy
-
----
Google template
diff --git a/docs/source/demos.rst b/docs/source/demos.rst
new file mode 100644
index 00000000..31b2d9e4
--- /dev/null
+++ b/docs/source/demos.rst
@@ -0,0 +1,11 @@
+Demos
+=====
+
+::
+
+ demos/
+ βββ face_repetition
+ βββ lesion_detection
+ βββ MoAE
+ βββ openneuro
+ βββ vismotion
\ No newline at end of file
diff --git a/docs/source/function_description.rst b/docs/source/function_description.rst
index 10745525..efa37956 100644
--- a/docs/source/function_description.rst
+++ b/docs/source/function_description.rst
@@ -16,7 +16,6 @@ List of functions in the ``src`` folder.
.. autofunction:: getPrefix
.. autofunction:: getRealignParamFile
.. autofunction:: getSliceOrder
-.. autofunction:: getSpecificSubjects
.. autofunction:: setDerivativesDir
.. autofunction:: unzipImgAndReturnsFullpathName
@@ -25,7 +24,6 @@ Subject level model
.. automodule:: src.subject_level
-.. autofunction:: concatBetaImgTmaps
.. autofunction:: convertOnsetTsvToMat
.. autofunction:: createAndReturnOnsetFile
.. autofunction:: deleteResidualImages
@@ -62,15 +60,26 @@ Utility functions
.. automodule:: src.utils
.. autofunction:: checkDependencies
+.. autofunction:: cleanCrash
.. autofunction:: createDataDictionary
+.. autofunction:: createDerivativeDir
+.. autofunction:: createGlmDirName
.. autofunction:: getEnvInfo
+.. autofunction:: getSubjectList
.. autofunction:: getVersion
.. autofunction:: isOctave
.. autofunction:: loadAndCheckOptions
+.. autofunction:: manageWorkersPool
+.. autofunction:: printBatchName
.. autofunction:: printCredits
.. autofunction:: printProcessingRun
.. autofunction:: printProcessingSubject
+.. autofunction:: printWorklowName
+.. autofunction:: removeSpmPrefix
+.. autofunction:: rmTrialTypeStr
.. autofunction:: saveMatlabBatch
.. autofunction:: saveOptions
-.. autofunction:: setDefaultFields
+.. autofunction:: setFields
+.. autofunction:: setGraphicWindow
.. autofunction:: validationInputFile
+.. autofunction:: writeDatasetDescription
\ No newline at end of file
diff --git a/docs/source/index.rst b/docs/source/index.rst
index aafb80c3..5c2de617 100644
--- a/docs/source/index.rst
+++ b/docs/source/index.rst
@@ -11,10 +11,11 @@ Welcome to CPP SPM BIDS pipeline documentation!
:caption: Content
set_up
- workflows
- QA
defaults
+ demos
+ workflows
batches
+ QA
function_description
method_section_boilerplate
mancoreg
@@ -22,7 +23,7 @@ Welcome to CPP SPM BIDS pipeline documentation!
contributing
This pipeline contains a set of functions to run fMRI analysis on a
-[BIDS data set](https://bids.neuroimaging.io/) using SPM12.
+`BIDS data set `_ using SPM12.
This can perform:
diff --git a/docs/source/mancoreg.rst b/docs/source/mancoreg.rst
index 5dacf6f9..1460a2a6 100644
--- a/docs/source/mancoreg.rst
+++ b/docs/source/mancoreg.rst
@@ -5,7 +5,7 @@ Manual coregistration tools
----
-.. automodule:: src.mancoreg
+.. automodule:: lib.mancoreg
.. autofunction:: mancoreg
.. autofunction:: mancoregCallbacks
diff --git a/docs/source/workflows.rst b/docs/source/workflows.rst
index 06ffadd8..29cfe6d0 100644
--- a/docs/source/workflows.rst
+++ b/docs/source/workflows.rst
@@ -103,6 +103,13 @@ Compute results
===============
.. autofunction:: bidsResults
+.. autofunction:: bidsConcatBetaTmaps
+
+Region of interest analysis
+===========================
+
+.. autofunction:: bidsRoiBasedGLM
+.. autofunction:: bidsCreateROI
Other
=====
diff --git a/src/batches/setBatchLesionAbnormalitiesDetection.m b/src/batches/setBatchLesionAbnormalitiesDetection.m
index d0365e86..8ea61493 100755
--- a/src/batches/setBatchLesionAbnormalitiesDetection.m
+++ b/src/batches/setBatchLesionAbnormalitiesDetection.m
@@ -1,10 +1,10 @@
-function matlabbatch = setBatchLesionAbnormalities(matlabbatch, BIDS, opt, subLabel)
+function matlabbatch = setBatchLesionAbnormalitiesDetection(matlabbatch, BIDS, opt, subLabel)
%
% Creates a batch to detect lesion abnormalities
%
% USAGE::
%
- % matlabbatch = setBatchLesionAbnormalities(matlabbatch, BIDS, opt, subLabel)
+ % matlabbatch = setBatchLesionAbnormalitiesDetection(matlabbatch, BIDS, opt, subLabel)
%
% :param matlabbatch: list of SPM batches
% :type matlabbatch: structure
diff --git a/src/defaults/checkOptions.m b/src/defaults/checkOptions.m
index 98e099de..878184df 100644
--- a/src/defaults/checkOptions.m
+++ b/src/defaults/checkOptions.m
@@ -17,10 +17,12 @@
% - :opt: the option structure with missing values filled in by the defaults.
%
% REQUIRED FIELDS:
+ %
% - ``opt.taskName``
% - ``opt.dataDir``
%
% IMPORTANT OPTIONS (with their defaults):
+ %
% - ``opt.groups = {''}`` - group of subjects to analyze
% - ``opt.subjects = {[]}`` - suject to run in each group
% space where we conduct the analysis
@@ -35,6 +37,7 @@
% model to speficy and the contrasts to compute.
%
% OTHER OPTIONS (with their defaults):
+ %
% - ``opt.zeropad = 2`` - number of zeros used for padding subject numbers, in case
% subjects should be fetched by their number ``1`` and not their label ``O1'``.
% - ``opt.query`` - a structure used to specify other options to only run analysis on
@@ -49,16 +52,18 @@
% at normalization.
% - ``opt.STC_referenceSlice = []`` - reference slice for the slice timing correction.
% If left emtpy the mid-volume acquisition time point will be selected at run time.
- % - ``opt.sliceOrder = []`` - To be used if SPM can't extract slice info. NOT RECOMMENDED:
+ % - ``opt.sliceOrder = []`` - To be used if SPM can't extract slice info. NOT RECOMMENDED,
% if you know the order in which slices were acquired, you should be able to recompute
% slice timing and add it to the json files in your BIDS data set.
- % - ``opt.glmQA.do = true;`` - If set to ``true```the residual images of a
+ % - ``opt.glm.roibased.do``
+ % - ``opt.glm.QA.do = true`` - If set to ``true`` the residual images of a
% GLM at the subject levels will be used to estimate if there is any remaining structure
% in the GLM residuals (the power spectra are not flat) that could indicate
% the subject level results are likely confounded (see
- % ``plot_power_spectra_of_GLM_residuals``) and 'Accurate autocorrelation modeling
- % substantially improves fMRI reliability'
- % _https://www.nature.com/articles/s41467-019-09230-w.pdf
+ % ``plot_power_spectra_of_GLM_residuals`` and `Accurate autocorrelation modeling
+ % substantially improves fMRI reliability
+ % `_ for more info.
+ %
%
%
% (C) Copyright 2019 CPP_SPM developers
diff --git a/src/getInfo.m b/src/getInfo.m
index 3765875c..c2ca3aed 100644
--- a/src/getInfo.m
+++ b/src/getInfo.m
@@ -7,7 +7,7 @@
%
% varargout = getInfo(BIDS, subLabel, opt, info, varargin)
%
- % If info = ``sessions`, this returns name of the sessions and their number::
+ % If info = ``sessions``, this returns name of the sessions and their number::
%
% [sessions, nbSessions] = getInfo(BIDS, subID, opt, 'sessions')
%
diff --git a/src/reports/reportBIDS.m b/src/reports/reportBIDS.m
index 97d04f9c..e0943d19 100644
--- a/src/reports/reportBIDS.m
+++ b/src/reports/reportBIDS.m
@@ -14,6 +14,7 @@ function reportBIDS(opt)
%
% - save output in the derivatires folder
% derivativeDir = fullfile(rawDir, '..', 'derivatives', 'cpp_spm');
+ %
% (C) Copyright 2020 CPP_SPM developers
bids.report(opt.dataDir);
diff --git a/src/subject_level/convertOnsetTsvToMat.m b/src/subject_level/convertOnsetTsvToMat.m
index d737e8a8..3076428e 100644
--- a/src/subject_level/convertOnsetTsvToMat.m
+++ b/src/subject_level/convertOnsetTsvToMat.m
@@ -14,7 +14,7 @@
% :param tsvFile:
% :type tsvFile: string
%
- % :returns: - :fullpathOnsetFileName: (string) name of the output `.mat` file.
+ % :returns: :fullpathOnsetFileName: (string) name of the output ``.mat`` file.
%
% (C) Copyright 2019 CPP_SPM developers
diff --git a/src/subject_level/createAndReturnOnsetFile.m b/src/subject_level/createAndReturnOnsetFile.m
index 5fd280f2..92a22ad6 100644
--- a/src/subject_level/createAndReturnOnsetFile.m
+++ b/src/subject_level/createAndReturnOnsetFile.m
@@ -18,8 +18,8 @@
% GLM. Necessary for the GLM directory.
% :type funcFWHM: float
%
- % :returns: - :onsetFileName: (string) fullpath name of the file created.
- % Removes any prefix.
+ % :returns: :onsetFileName: (string) fullpath name of the file created.
+ %
%
% (C) Copyright 2019 CPP_SPM developers
diff --git a/src/utils/cleanCrash.m b/src/utils/cleanCrash.m
index d0b594b3..ebc44640 100644
--- a/src/utils/cleanCrash.m
+++ b/src/utils/cleanCrash.m
@@ -1,7 +1,7 @@
function cleanCrash()
%
% Removes any files left over from a previous unfinished run of the pipeline,
- % like any *.png imgages
+ % like any ``*.png`` imgages
%
% USAGE::
%
diff --git a/src/workflows/bidsSmoothing.m b/src/workflows/bidsSmoothing.m
index 6ca15aeb..ceaa5710 100644
--- a/src/workflows/bidsSmoothing.m
+++ b/src/workflows/bidsSmoothing.m
@@ -5,7 +5,7 @@ function bidsSmoothing(funcFWHM, opt)
%
% USAGE::
%
- % bidsSmoothing(funcFWHM, [opt])
+ % bidsSmoothing(funcFWHM, [opt])
%
% :param funcFWHM: How much smoothing was applied to the functional
% data in the preprocessing (Gaussian kernel size).
@@ -13,6 +13,7 @@ function bidsSmoothing(funcFWHM, opt)
% :param opt: structure or json filename containing the options. See
% ``checkOptions()`` and ``loadAndCheckOptions()``.
% :type opt: structure
+ %
% (C) Copyright 2020 CPP_SPM developers
[BIDS, opt] = setUpWorkflow(opt, 'smoothing functional data');
diff --git a/src/workflows/saveAndRunWorkflow.m b/src/workflows/saveAndRunWorkflow.m
index 646894de..e652ca6e 100644
--- a/src/workflows/saveAndRunWorkflow.m
+++ b/src/workflows/saveAndRunWorkflow.m
@@ -15,6 +15,7 @@ function saveAndRunWorkflow(matlabbatch, batchName, opt, subLabel)
% :type opt: structure
% :param subID: subject ID
% :type subID: string
+ %
% (C) Copyright 2019 CPP_SPM developers
if nargin < 4