Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/run_system_tests_octave.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,5 +82,5 @@ jobs:

- name: Run ${{ matrix.script }}
run: |
cd /home/runner/work/CPP_SPM/CPP_SPM/.github/workflows
cd /home/runner/work/bidspm/bidspm/.github/workflows
octave $OCTFLAGS --eval "run system_tests_${{ matrix.script }};"
2 changes: 1 addition & 1 deletion demos/MoAE/moae_01_bids_app.m
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@

bids_dir = fullfile(fileparts(mfilename('fullpath')), 'inputs', 'raw');
output_dir = fullfile(bids_dir, '..', '..', 'outputs', 'derivatives');
preproc_dir = fullfile(output_dir, 'cpp_spm-preproc');
preproc_dir = fullfile(output_dir, 'bidspm-preproc');

model_file = fullfile(pwd, 'models', 'model-MoAE_smdl.json');

Expand Down
4 changes: 2 additions & 2 deletions demos/MoAE/moae_02_create_roi_extract_data.m
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
subLabel = '01';

opt.dir.derivatives = fullfile(fileparts(mfilename('fullpath')), 'outputs', 'derivatives');
opt.dir.roi = fullfile(opt.dir.derivatives, 'cpp_spm-roi');
opt.dir.stats = fullfile(opt.dir.derivatives, 'outputs', 'cpp_spm-stats');
opt.dir.roi = fullfile(opt.dir.derivatives, 'bidspm-roi');
opt.dir.stats = fullfile(opt.dir.derivatives, 'outputs', 'bidspm-stats');

opt.model.file = fullfile(fileparts(mfilename('fullpath')), ...
'models', 'model-MoAE_smdl.json');
Expand Down
6 changes: 3 additions & 3 deletions demos/MoAE/moae_03_slice_display.m
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@

opt.dir.raw = fullfile(this_dir, 'inputs', 'raw');
opt.dir.derivatives = fullfile(this_dir, 'outputs', 'derivatives');
opt.dir.preproc = fullfile(opt.dir.derivatives, 'cpp_spm-preproc');
opt.dir.preproc = fullfile(opt.dir.derivatives, 'bidspm-preproc');

opt.dir.roi = fullfile(opt.dir.derivatives, 'cpp_spm-roi');
opt.dir.stats = fullfile(opt.dir.derivatives, 'cpp_spm-stats');
opt.dir.roi = fullfile(opt.dir.derivatives, 'bidspm-roi');
opt.dir.stats = fullfile(opt.dir.derivatives, 'bidspm-stats');

opt.model.file = fullfile(this_dir, 'models', 'model-MoAE_smdl.json');

Expand Down
2 changes: 1 addition & 1 deletion demos/MoAE/moae_denoise_with_glm.m
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

bids_dir = fullfile(fileparts(mfilename('fullpath')), 'inputs', 'raw');
output_dir = fullfile(bids_dir, '..', '..', 'outputs', 'derivatives');
preproc_dir = fullfile(output_dir, 'cpp_spm-preproc');
preproc_dir = fullfile(output_dir, 'bidspm-preproc');

model_file = fullfile(pwd, 'models', 'model-denoiseOnly_smdl.json');

Expand Down
4 changes: 2 additions & 2 deletions demos/MoAE/moae_fmriprep.m
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@

% we need to specify where the smoothed data will go
opt.pipeline.type = 'preproc';
opt.dir.preproc = fullfile(opt.dir.derivatives, 'cpp_spm-preproc');
opt.dir.preproc = fullfile(opt.dir.derivatives, 'bidspm-preproc');

opt.space = {'MNI152NLin6Asym'};

Expand Down Expand Up @@ -82,7 +82,7 @@

bids_dir = fullfile(WD, 'inputs', 'raw');
output_dir = fullfile(WD, 'outputs', 'derivatives');
preproc_dir = fullfile(output_dir, 'cpp_spm-preproc');
preproc_dir = fullfile(output_dir, 'bidspm-preproc');

model_file = fullfile(pwd, 'models', 'model-MoAEfmriprep_smdl.json');

Expand Down
2 changes: 1 addition & 1 deletion demos/MoAE/test_moae.m
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
'options', optionsFile);

%% stats
preproc_dir = fullfile(output_dir, 'cpp_spm-preproc');
preproc_dir = fullfile(output_dir, 'bidspm-preproc');

bidspm(bids_dir, output_dir, 'subject', ...
'participant_label', {'01'}, ...
Expand Down
2 changes: 1 addition & 1 deletion demos/face_repetition/face_rep_02_stats.m
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@

bids_dir = fullfile(this_dir, 'outputs', 'raw');
output_dir = fullfile(this_dir, 'outputs', 'derivatives');
preproc_dir = fullfile(output_dir, 'cpp_spm-preproc');
preproc_dir = fullfile(output_dir, 'bidspm-preproc');

model_file = fullfile(this_dir, 'models', 'model-faceRepetition_smdl.json');

Expand Down
2 changes: 1 addition & 1 deletion demos/face_repetition/face_rep_02_stats_parametric.m
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

bids_dir = fullfile(this_dir, 'outputs', 'raw');
output_dir = fullfile(this_dir, 'outputs', 'derivatives');
preproc_dir = fullfile(output_dir, 'cpp_spm-preproc');
preproc_dir = fullfile(output_dir, 'bidspm-preproc');

model_file = fullfile(this_dir, 'models', 'model-faceRepetitionParametric_smdl.json');

Expand Down
6 changes: 3 additions & 3 deletions demos/face_repetition/face_rep_03_roi_analysis.m
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
%% Create roi

opt.dir.derivatives = fullfile(this_dir, 'outputs', 'derivatives');
opt.dir.preproc = fullfile(opt.dir.derivatives, 'cpp_spm-preproc');
opt.dir.roi = fullfile(opt.dir.derivatives, 'cpp_spm-roi');
opt.dir.preproc = fullfile(opt.dir.derivatives, 'bidspm-preproc');
opt.dir.roi = fullfile(opt.dir.derivatives, 'bidspm-roi');

opt.roi.atlas = 'wang';
opt.roi.name = {'V1v', 'V1d'};
Expand All @@ -32,7 +32,7 @@

bids_dir = fullfile(this_dir, 'outputs', 'raw');
output_dir = fullfile(this_dir, 'outputs', 'derivatives');
preproc_dir = fullfile(opt.dir.derivatives, 'cpp_spm-preproc');
preproc_dir = fullfile(opt.dir.derivatives, 'bidspm-preproc');

opt.bidsFilterFile.roi.space = 'individual';

Expand Down
4 changes: 2 additions & 2 deletions demos/face_repetition/test_face_rep.m
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

for iResolution = 2:3

opt.pipeline.name = ['cpp_spm-res' num2str(iResolution)];
opt.pipeline.name = ['bidspm-res' num2str(iResolution)];
opt.funcVoxelDims = repmat(iResolution, 1, 3);

%% preproc
Expand Down Expand Up @@ -60,7 +60,7 @@
% stats options
opt = bids.util.jsondecode(optionsFile);
% TODO put in a json file
opt.pipeline.name = ['cpp_spm-res' num2str(iResolution)];
opt.pipeline.name = ['bidspm-res' num2str(iResolution)];

% specify underlay image
BIDS = bids.layout([preproc_dir '-preproc'], 'use_schema', false);
Expand Down
2 changes: 1 addition & 1 deletion demos/lesion_detection/lesion_get_option.m
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
%%
opt2.subjects = {'ctrl01'};
opt2.dir.derivatives = '/home/remi/gin/Christine/olfaction_blind/derivatives/lesion/derivatives/';
opt2.dir.preproc = fullfile(opt2.dir.derivatives, 'cpp_spm-preproc');
opt2.dir.preproc = fullfile(opt2.dir.derivatives, 'bidspm-preproc');
opt2.query.run = '';
opt2.query.acq = '';
opt2.toolbox.ALI.unified_segmentation.step1fwhm = 6;
Expand Down
2 changes: 1 addition & 1 deletion demos/openneuro/ds000001_run.m
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
'space', {'IXI549Space'});

%% Stats
preproc_dir = fullfile(root_dir, 'outputs', 'ds000001', 'derivatives', 'cpp_spm-preproc');
preproc_dir = fullfile(root_dir, 'outputs', 'ds000001', 'derivatives', 'bidspm-preproc');

model_file = fullfile(root_dir, 'models', 'model-defaultBalloonanalogrisktask_smdl.json');

Expand Down
2 changes: 1 addition & 1 deletion demos/openneuro/ds000114_run.m
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

%% Statistics

preproc_dir = fullfile(root_dir, 'outputs', 'ds000114', 'derivatives', 'cpp_spm-preproc');
preproc_dir = fullfile(root_dir, 'outputs', 'ds000114', 'derivatives', 'bidspm-preproc');
model_file = fullfile(root_dir, 'models', 'model-ds000114_desc-linebisection_smdl.json');

opt.results.nodeName = 'subject_level';
Expand Down
2 changes: 1 addition & 1 deletion demos/openneuro/ds001168_run.m
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
root_dir = fileparts(mfilename('fullpath'));
bids_dir = fullfile(root_dir, 'inputs', 'ds001168');
output_dir = fullfile(root_dir, 'outputs', 'ds001168', 'derivatives');
preproc_dir = fullfile(output_dir, 'cpp_spm-preproc');
preproc_dir = fullfile(output_dir, 'bidspm-preproc');
model_file = fullfile(root_dir, 'models', 'model-ds001168_smdl.json');

opt.glm.keepResiduals = true;
Expand Down
4 changes: 2 additions & 2 deletions demos/openneuro/ds002799_run.m
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@

% we need to specify where the smoothed data will go
opt.pipeline.type = 'preproc';
opt.dir.preproc = fullfile(opt.dir.derivatives, 'cpp_spm-preproc');
opt.dir.preproc = fullfile(opt.dir.derivatives, 'bidspm-preproc');

opt = checkOptions(opt);

Expand Down Expand Up @@ -69,7 +69,7 @@
% this use the "constant" Transformer
% to add a column with all the same value in each row

bm.Nodes{run_lvl_idx}.Transformations.Transformer = 'cpp_spm';
bm.Nodes{run_lvl_idx}.Transformations.Transformer = 'bidspm';
bm.Nodes{run_lvl_idx}.Transformations.Instructions = {struct('Name', 'Constant', ...
'Value', 'es', ...
'Output', 'trial_type')};
Expand Down
2 changes: 1 addition & 1 deletion demos/tSNR/tsnr_03_compute.m
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

[BIDS, opt] = getData(opt, opt.dir.preproc);

opt.dir.roi = fullfile(opt.dir.preproc, '..', 'cpp_spm-roi');
opt.dir.roi = fullfile(opt.dir.preproc, '..', 'bidspm-roi');
opt = rmfield(opt, 'taskName');
[BIDSroi, opt] = getData(opt, opt.dir.roi);

Expand Down
2 changes: 1 addition & 1 deletion demos/vismotion/step_2_stats.m
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
root_dir = fullfile(this_dir, '..', '..', '..', '..');
bids_dir = fullfile(root_dir, 'inputs', 'raw');
output_dir = fullfile(root_dir, 'outputs', 'derivatives');
preproc_dir = fullfile(root_dir, 'outputs', 'derivatives', 'cpp_spm-preproc');
preproc_dir = fullfile(root_dir, 'outputs', 'derivatives', 'bidspm-preproc');

% TODO via BIDS api
% bidsRFX('meananatandmask', opt);
Expand Down
4 changes: 2 additions & 2 deletions docs/source/default_options.m
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@
opt.bidsFilterFile.t2w.modality = 'anat' ;
opt.bidsFilterFile.t2w.suffix = 'T2w' ;
opt.contrastList = {};
opt.dir.derivatives = '/home/remi/gin/Christine/olfaction_blind/derivatives/bidspm/code/lib/CPP_SPM/docs/derivatives' ;
opt.dir.derivatives = '/home/remi/gin/Christine/olfaction_blind/derivatives/bidspm/code/lib/bidspm/docs/derivatives' ;
opt.dir.input = '' ;
opt.dir.jobs = '/home/remi/gin/Christine/olfaction_blind/derivatives/bidspm/code/lib/CPP_SPM/docs/jobs' ;
opt.dir.jobs = '/home/remi/gin/Christine/olfaction_blind/derivatives/bidspm/code/lib/bidspm/docs/jobs' ;
opt.dir.output = '' ;
opt.dir.preproc = '' ;
opt.dir.raw = '' ;
Expand Down
2 changes: 1 addition & 1 deletion scripts/group_rm_anova.m
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
1:numel(side_labels));

%%
opt.dir.output = fullfile(opt.dir.stats, 'derivatives', 'cpp_spm-groupStats');
opt.dir.output = fullfile(opt.dir.stats, 'derivatives', 'bidspm-groupStats');
opt.dir.jobs = fullfile(opt.dir.output, 'jobs', strjoin(opt.taskName, ''));

% collect con images
Expand Down
2 changes: 1 addition & 1 deletion src/IO/getData.m
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
% See also: checkOptions
%
% :param bidsDir: the directory where the data is ; default is :
% ``fullfile(opt.dataDir, '..', 'derivatives', 'cpp_spm')``
% ``fullfile(opt.dataDir, '..', 'derivatives', 'bidspm')``
% :type bidsDir: char
%
% :returns:
Expand Down
6 changes: 3 additions & 3 deletions src/defaults/checkOptions.m
Original file line number Diff line number Diff line change
Expand Up @@ -167,8 +167,8 @@

checkFields(opt);

if any(strcmp(opt.pipeline.name, {'cpp_spm-stats', 'cpp_spm-preproc'}))
opt.pipeline.name = 'cpp_spm';
if any(strcmp(opt.pipeline.name, {'bidspm-stats', 'bidspm-preproc'}))
opt.pipeline.name = 'bidspm';
end

% coerce query modality into a cell
Expand Down Expand Up @@ -278,7 +278,7 @@
'roi', struct('modality', 'roi', 'suffix', 'mask'));

fieldsToSet.pipeline.type = '';
fieldsToSet.pipeline.name = 'cpp_spm';
fieldsToSet.pipeline.name = 'bidspm';

fieldsToSet.useBidsSchema = false;

Expand Down
2 changes: 1 addition & 1 deletion src/defaults/set_spm_2_bids_defaults.m
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
function opt = set_spm_2_bids_defaults(opt)
%
% set default map for renaming for cpp_spm
% set default map for renaming for bidspm
%
% USAGE::
%
Expand Down
4 changes: 2 additions & 2 deletions src/group_level/getRFXdir.m
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
%
% Typical output:
%
% - ``opt.dir.derivatives/cpp_spm-stats/derivatives/cpp_spm-groupStats/cpp_spm-stats``
% - ``opt.dir.derivatives/bidspm-stats/derivatives/bidspm-groupStats/bidspm-stats``
%
% .. code-block:: matlab
%
Expand Down Expand Up @@ -77,7 +77,7 @@

rfxDir = fullfile(opt.dir.stats, ...
'derivatives', ...
'cpp_spm-groupStats', ...
'bidspm-groupStats', ...
glmDirName);

spm_mkdir(rfxDir);
Expand Down
2 changes: 1 addition & 1 deletion src/infra/returnRootDir.m
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

% (C) Copyright 2022 bidspm developers

Mfile = 'cpp_spm.m';
Mfile = 'bidspm.m';
rootDir = cellstr(which(Mfile, '-ALL'));

% convert to absolute paths and keep unique ones
Expand Down
2 changes: 1 addition & 1 deletion src/messages/errorHandling.m
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ function errorHandling(varargin)

% (C) Copyright 2018 bidspm developers

defaultFunctionName = 'cpp_spm';
defaultFunctionName = 'bidspm';
defaultId = 'unspecified';
defaultMsg = 'unspecified';
defaultTolerant = true;
Expand Down
2 changes: 1 addition & 1 deletion src/workflows/bidsCopyInputFolder.m
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ function bidsCopyInputFolder(varargin)
end

% leave events files behind
if ismember(pipeline_name, {'preproc', 'cpp_spm-preproc'})
if ismember(pipeline_name, {'preproc', 'bidspm-preproc'})
if ~isfield(filter, 'suffix')
filter.suffix = {'^(?!(events)$).*$'};
end
Expand Down
4 changes: 2 additions & 2 deletions src/workflows/roi/bidsCreateROI.m
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ function bidsCreateROI(opt)
% opt.roi.atlas = 'wang';
% opt.roi.name = {'V1v', 'V1d'};
% opt.roi.space = {'IXI549Space', 'individual'};
% opt.dir.stats = fullfile(opt.dir.raw, '..', 'derivatives', 'cpp_spm-stats');
% opt.dir.stats = fullfile(opt.dir.raw, '..', 'derivatives', 'bidspm-stats');
%
% bidsCreateROI(opt);
%
Expand All @@ -28,7 +28,7 @@ function bidsCreateROI(opt)
end

if ~isfield(opt.dir, 'roi')
opt.dir.roi = spm_file(fullfile(opt.dir.derivatives, 'cpp_spm-roi'), 'cpath');
opt.dir.roi = spm_file(fullfile(opt.dir.derivatives, 'bidspm-roi'), 'cpath');
end
spm_mkdir(fullfile(opt.dir.roi, 'group'));

Expand Down
2 changes: 1 addition & 1 deletion src/workflows/roi/bidsRoiBasedGLM.m
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
description = 'ROI based GLMs';

if ~isfield(opt.dir, 'roi')
opt.dir.roi = spm_file(fullfile(opt.dir.derivatives, 'cpp_spm-roi'), 'cpath');
opt.dir.roi = spm_file(fullfile(opt.dir.derivatives, 'bidspm-roi'), 'cpath');
end

[BIDS, opt] = setUpWorkflow(opt, description);
Expand Down
2 changes: 1 addition & 1 deletion src/workflows/stats/bidsModelSelection.m
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@
opt.orderBatches.MACS_BMS_group_auto = 2;
end

opt.dir.output = fullfile(opt.dir.stats, 'derivatives', 'cpp_spm-modelSelection');
opt.dir.output = fullfile(opt.dir.stats, 'derivatives', 'bidspm-modelSelection');
opt.dir.jobs = fullfile(opt.dir.output, 'jobs');

spm_mkdir(fullfile(opt.dir.output, 'group'));
Expand Down
4 changes: 2 additions & 2 deletions src/workflows/stats/bidsRFX.m
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
% - merge rfx and ffx into a single "stats" workflow

if ismember(lower(action), {'meananatandmask', 'rfx', 'contrasts'})
opt.dir.output = fullfile(opt.dir.stats, 'derivatives', 'cpp_spm-groupStats');
opt.dir.output = fullfile(opt.dir.stats, 'derivatives', 'bidspm-groupStats');
opt.dir.jobs = fullfile(opt.dir.output, 'jobs', strjoin(opt.taskName, ''));
end

Expand Down Expand Up @@ -153,7 +153,7 @@
end

if ismember(lower(action), {'meananatandmask', 'rfx'})
opt.pipeline.name = 'cpp_spm';
opt.pipeline.name = 'bidspm';
opt.pipeline.type = 'groupStats';
initBids(opt, 'description', description, 'force', false);
end
Expand Down
2 changes: 1 addition & 1 deletion src/workflows/stats/bidsResults.m
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@

batchName = 'compute_group_level_results';

tmp = fullfile(opt.dir.stats, 'derivatives', 'cpp_spm-groupStats');
tmp = fullfile(opt.dir.stats, 'derivatives', 'bidspm-groupStats');
opt.dir.jobs = fullfile(tmp, 'jobs', strjoin(opt.taskName, ''));
status = saveAndRunWorkflow(matlabbatch, batchName, opt);

Expand Down
Loading