Hello, I am preprocesing my task-fMRI data of two time points but I have some thoughts:
I have decided to preprocess my task-fMRI data with fMRIPrep, but I am not sure about which outputs I should add to the folder. Should I include the document with the events of the task in the folder (i.e., sub-101_ses-1_task-nback_events)? I mean, does fMRIPrep use that document, or is it needed for the next steps? These are the different images that I have for each time and participant in the functional folder now:
In case I need to add it or not, which document do I need for the n-back task? Additionally, do you have any recommendations for creating that document? Currently, I have documents from each participant and time, but I couldn’t find any examples for know what I need:
The events.tsv file should go in the func folder with the other images you provided, but it is not used by fMRIPrep. It can, however, be parsed by Fitlins and Nilearn to run GLMs after preprocessing.
Hello Steven, thank you so much for your response. It was really useful.
Following, you can see the BIDS-valid event file that I created with the second document that I showed you, but I still have a thought. As you can see, I have some blank spaces in the duration on my document because of the rest time when the participant is reading the instructions (We have n-back 1 and n-back 2). Should I remove it? Can it cause some errors in my analysis?
We are going to use FSL for the first-level analyses and group analyses.
Despite you mentioning that the events.tsv file is not used by fMRIPrep, I realized that in my output (after running fMRIPrep), I don’t have the regressors document (as shown in this example: fMRIPrep Tutorial #5: Running the 1st-level Analysis — Andy's Brain Book 1.0 documentation - sub-08_task-flanker_run-1_desc-confounds_regressors.tsv). Instead, I have a file named sub-101_ses-1_task-nback_desc-confounds_timeseries with different columns.
Shall I add something more to my script for run fmriprep?
#!/bin/bash
#User inputs:
bids_root_dir=/home/jovyan/neurodesktop-storage/Agueda/BIDS/derivatives/fmripreptask_tsv
output_directory=${bids_root_dir}/derivatives
#work_dir=/home/jovyan/neurodesktop-storage/Agueda/work
nthreads=4
mem=20 #gb
participant_labels=("sub-101" "sub-103") # List of participant labels
#participant_labels='sub-103' # List of participant labels
#Begin:
#Convert virtual memory from gb to mb
mem=`echo "${mem//[!0-9]/}"` #remove gb at end
mem_mb=`echo $(((mem*1000)-5000))` #reduce some memory for buffer space during pre-processing
#export TEMPLATEFLOW_HOME=$HOME/.cache/templateflow
#export FS_LICENSE=${bids_root_dir}/license.txt
#Run fmriprep
for subj in "${participant_labels[@]}"; do
fmriprep ${bids_root_dir} ${bids_root_dir}/derivatives \
participant \
--participant-label $subj \
--skip-bids-validation \
--md-only-boilerplate \
--fs-license-file ${bids_root_dir}/license.txt \
--output-spaces MNI152NLin2009cAsym:res-2 \
--nthreads $nthreads \
--stop-on-first-crash \
--mem_mb $mem_mb \
#-w ${work_dir}
done
echo "Thank God! you went without errors in fMRIPrep!"
On the other hand, I have a doubt about why it is not necessary to include the corrects and errors in my events document for the different trials. At what point are they added?