Dear Chiara,
Let me get back to your second question about the case in which you already have the data in the NIfTI format. In this case there are two ways that you can go about it, depending on whether the files are organized in a BIDS compliant manner or not.
Importing of BIDS compliant NIfTI dataset
In the case of BIDS compliant NIfTI dataset, you can use the import_bids
command. A detailed description of the onboarding of BIDS compiant datasets is available on the wiki: https://bitbucket.org/oriadev/qunex/wiki/UsageDocs/OnboardingBIDSData.md. You can also refer to inline help by running qunex import_bids
.
Staging existing NIfTI files
If the dataset is not BIDS compliant, you can stage the files yourself, as you mentioned you tried to do. Let’s say that you have data for three sessions, each session has a T1w and a T2w structural image, a pair of AP/PA acquired spin echo field map images that should be used both for structural and bold distorsion correction and two resting state bold images. In this case you would follow the steps below. I am writing the steps as a bash script, but you can do similar using a GUI, an FTP client or any other way.
First, you would create a study folder by running:
MYSTUDY="<path to the relevant folder>/my_study"
container create_study $MYSTUDY
Next, you would set up folders for sessions 1-3 that also include the nii
subfolder and the subject.txt
and subject_hcp.txt
file.
for session in 01 02 03
do
mkdir -p $MYSTUDY/sessions/s$session/nii
echo "id: s$session
subject: s$session
raw_data: $MYSTUDY/sessions/s$session/nii
hcp: $MYSTUDY/sessions/s$session/hcp
10: T1w image
20: T2w image
30: AP Spin echo FM image
40: PA Spin echo FM image
50: BOLD resting state image
60: BOLD resting state image
70: BOLD resting state image" > $MYSTUDY/sessions/s$session/session.txt
echo "id: s$session
subject: s$session
raw_data: $MYSTUDY/sessions/s$session/nii
hcp: $MYSTUDY/sessions/s$session/hcp
hcpready: true
10: T1w : T1w image : se(1)
20: T2w : T2w image : se(1)
30: SE-FM-AP : AP Spin echo FM image : se(1)
40: SE-FM-PA : PA Spin echo FM image : se(1)
50: bold1:rest : BOLD resting state image : se(1)
60: bold2:rest : BOLD resting state image : se(1)
70: bold3:rest : BOLD resting state image : se(1)" > $MYSTUDY/sessions/s$session/session_hcp.txt
done
You should now have the following folder structure (currently irrelevant subfolders are excluded):
my_study/
├── analysis
├── info
├── processing
└── sessions
├── archive
├── inbox
├── QC
├── s01
│ ├── nii
│ ├── session.txt
│ └── session_hcp.txt
├── s02
│ ├── nii
│ ├── session.txt
│ └── session_hcp.txt
├── s03
│ ├── nii
│ ├── session.txt
│ └── session_hcp.txt
└── specs
└── batch_example.txt
You should notice that we already prepared both the session.txt
and session_hcp.txt
files. You could also skip the session_hcp.txt
file and rather prepare a related hcp_mapping.txt
file. This should be:
T1w image => T1w
T2w image => T2w
AP Spin echo FM image => SE-FM-AP
PA Spin echo FM image => SE-FM-PA
BOLD resting state image => bold:rest
The next thing to do now is to copy the NIfTI images into the relevant $MYSTUDY/sessions/s$session/nii
folders. The images should have the following file names:
10.nii.gz # T1w image
20.nii.gz # T2w image
30.nii.gz # AP Spin echo FM image
40.nii.gz # PA Spin echo FM image
50.nii.gz # BOLD resting state image
60.nii.gz # BOLD resting state image
70.nii.gz # BOLD resting state image"
You should be ready to continue from here with the setup_hcp
RunTurnkey step (or rather create_session_info
step is you skipped generation of session_hcp.txt
files above). Do note that you still need to prepare your correct batch parameter file!
Do let me know if you get stuck at any point.
With kind regards,
Grega