cpp-lln-lab / CPP_BIDS

a set of matlab / octave function to create BIDS comptible folder structure and filenames
https://cpp-bids.readthedocs.io/en/dev/index.html
MIT License
1 stars 9 forks source link

`convertSourceToRaw` enhancement #196

Open Remi-Gau opened 2 years ago

Remi-Gau commented 2 years ago
CerenB commented 2 years ago

It is merged, but the issue seems to be open... And I tried the version in dev branch, with filtering option on https://github.com/cpp-lln-lab/CPP_BIDS/blob/dev/src/convertSourceToRaw.m

filter = struct('sub', ['sub-',opt.subjects{1}]);
cfg.dir.output = '/Users/battal/Cerens_files/fMRI/Processed/MoebiusProject/';
convertSourceToRaw(cfg, 'filter', filter)

It successfully copies the source subject specific folder into raw, but it is crashing in removing date entities, please see below.


Error in bids.Schema/load (line 75)
        bids.internal.error_handling(function_name, 'missingDirectory', msg, false, true);

Error in bids.Schema (line 34)
      obj = load(obj, use_schema);

Error in bids.layout (line 110)
  schema = bids.Schema(use_schema);

Error in removeDateEntity (line 25)
    BIDS = bids.layout(pathToDataSet,  'use_schema', false);

Error in convertSourceToRaw (line 74)
    removeDateEntity(rawDir, 'filter', filter);

I can use of course master branch version, no problem. I wanted to ask if my input variables are OK or this function on the dev branch is WIP?

CerenB commented 2 years ago

ahh! it is the same branching issue, I am not deleting the message in case someone else would find themselves here (or future me!).

The solution is only using CPP-BIDS repo with bids-matlab submodule. Then all is good.

Related to this function, is the behavior below expected:

So there's a duplication, the pipeline_name folder, should be deleted by the user. Right?