Closed themeo closed 1 year ago
Can you replicate this using the latest (dev) version? Because raw
is not in the template bidsmap, but only put there after you gave raw
as an input to the bidsmapper... The idea is that the template bidsmap is generic, but the study bidsmap (i.e. after running the bidsmapper) is study specific, hence it is assumed that the source folder is fixed for the study (and should not suddenly change between running the bidsmapper and the bidscoiner). This is the default (the template bidsmap):
subject: <<filepath:/sub-(.*?)/>> # This filesystem property extracts the subject label from the source directory. NB: Any property or attribute can be used as subject-label, e.g. <PatientID>
session: <<filepath:/sub-.*?/ses-(.*?)/>> # This filesystem property extracts the subject label from the source directory. NB: Any property or attribute can be used as session-label, e.g. <StudyID>
If you re-run the bidsmapper from scratch (e.g. by using the -f
option), and you give it something else than raw
, that something else should appear in the study bidsmap. The reason for adding something like raw
to the regular expression is to make the expression more robust for use cases without or with a very short prefix. The latest version, however, now has a --no-update
option to skip that and leave the expression as is (see issue #166).
Thanks for the fast reply!
And yes, I did change the directory, I just assumed bidscoin would preserve in .yaml the mapping of filenames/types but not be too attached to directories, or that this could get overridden by specifying the source directory in bidscoiner
.
But I can see your reason for doing that this way. In the future, I will simply use the --no-update
option, thanks again.
Bidscoin implicitly expects that the source files will be contained in the
/raw
folder. THis is encoded in the default version of thebidsmapper
yaml file e.g.This leads to an error when the source directories are placed in another folder. This setting is not overridden by specifying a different (ie not
/raw
) folder inbidscoiner
arguments. This feature is also not prominently mentioned in the docs, so it took me a moment to figure out what is going on.To me, a more natural behaviour would be to accept whatever directory is provided by the user without any additional assumptions.