Data directory and sourceStructure.json settings

21 views
Skip to first unread message

Asako

unread,
Feb 8, 2022, 1:28:29 AM2/8/22
to ExploreASL
Hello,

I have several questions about data directory and sourceStructure.json settings.

My data directory is like;

/Data
--/000001
----/Session1
------/Run1
--------/3D_T1W_TFE_sag_mprage
--------/3D_FLAIR_tra
--------/M0
--------/SOURCE_3D_pCASL_6mm
------/Run2
--------/3D_T1W_TFE_sag_mprage
--------/3D_FLAIR_tra
--------/M0
--------/SOURCE_3D_pCASL_6mm
----/Session2
------/Run1
--/000002
----/Session1
------/Run1
----/Session2
------/Run1
------/Run2
----/Session3
------/Run1
------/Run2

and sourceStructure.json is like;

{"folderHierarchy":["^(\\d{6}).*","^Session([123])$", "^(3D_T1W_TFE_sag_mprage|3D_FLAIR_tra|M0|SOURCE_3D_pCASL_6mm)$"],
"tokenOrdering":[1 0 2 3],
"tokenSessionAliases":["^1$","ASL_1","^2$", "ASL_2","^3$", "ASL_3"],
"tokenVisitAliases":["session_1","1","session_2","2"],
"tokenScanAliases":["^3D_T1W_TFE_sag_mprage$","T1w","^3D_FLAIR_tra$","FLAIR","^M0$","M0","^SOURCE_3D_pCASL_6mm$","ASL4D"],
"bMatchDirectories":true}

**********************

/000001/Session1/Run1
refers to
/subjectID/MeasureDate/Measurement

The subjects participated measurements in different date.
Each measurment includes at least one set of scannig.
In case of data missing/quality, some of the subjects participated same measurement at same day. That's why the session contains Run 1 and 2.

This data directroy is not valid to execute ExploreASL.
Additionally, amount of sessions differs between subjects.

If anyone have any idea how we set the data directory and sourceStructure.json, share the idea.
It will be a big help to us.

Thank you in advance,
Asako

Jan Petr

unread,
Mar 2, 2022, 10:40:55 AM3/2/22
to ExploreASL
Dear Asako,

here are some comments below:
1. Please see our updated documentation that explains the input and BIDS structure here and the import here. Mostly note that what is called "Session" and "Run" in BIDS, is called "Visit" and "Session" in ExploreASL on some places. The BIDS notation is new and we haven't fully converted our software to it. This is only a notation problem, functionally, this is equal.

2. In folderHierarchy, you are missing the directory level of run. Correctly, please use:
"folderHierarchy":["^(\\d{6}).*","^Session([123])$", "^Run([123])$","^(3D_T1W_TFE_sag_mprage|3D_FLAIR_tra|M0|SOURCE_3D_pCASL_6mm)$"],

3. Token ordering lists the order of tokens in directory structure (tokens are the names in folderHierarchy that are within brackets). In the vector, you give the token order for [subject visit session sequence], so in you case, after my update of folderHierarchy:
"tokenOrdering":[1 2 3 4],

4. From folderHierarchy, only the number of session is in brackets, so only the number is extracted as visit token. Therefore you need to use:
"tokenVisitAliases":["1","_1","2","_2"],

these three edits should put you back on track. Also - make sure to use the stable ExploreASL version 1.9.0 - older version might not work correctly with variable number of sessions.

best,
Jan
Reply all
Reply to author
Forward
0 new messages