Heudiconv compatibility with multiecho fmri dataset

Hi @mgxd,

I am fairly new to the BIDS conversion using the heudiconv and eventhough i have been able to implement it with my anatomical dataset, i am having trouble converting my fmri resting state dataset. As my raw file, i have series of multiecho dicom files with the following naming
epi_3_mm_rest_run_1_00***.dcm
epi_3_mm_rest_run_1_00***_v002.dcm
epi_3_mm_rest_run_1_00***_v003.dcm
and 3 different README.txt files
README-Series.txt
README-Series_v002.txt
README-Series_v003.txt
eventhough you expect that each one of these README files have different echo number, they only variable they differ is their Instance (formerly image )number which is 1, 41, and 81. I am not sure if this raw data dicom layout is what heudiconv is expecting? should i separate these files to have 3 different subfolder each having one echo version? should i manually change the echo number in the README files? as of right now when i run the code i only generate one sub-01_ses-002_task-rest_run-001_bold.nii and sub-01_ses-002_task-rest_run-001_bold.json. how can i modify my code to generates 3 nifti & json file for all my echoes? along with a task-rest_bold.json & task-rest_event.tsv file under nifiti directory?

Thanks
Shervin

heudiconv sorts and aggregates all series into a dicominfo.tsv file, which you can find in
<output-directory>/.heudiconv/<subject>/info. Could you share that for one subject?

Sure, here is the list of files i get under this path directory.

and here is the dicominfo.tsv file i get for my ses_002 (functional runs). i guess my bigger confusion is that i dont know if these dicom file with different echoes should be stored in separate subfolders or all in the same folder when feeding them to heudiconv? unfortunately tsv file format is not supported for attachment, so i had to take a screenshot of the dicominfo file, but technically its only one line of info

However you choose to store the files shouldn’t matter - as long as they are found by heudiconv (either by using the -d or --files flags), they will be automatically grouped.

Currently, multiecho support happens under the hood. In your case, you’ll just need to extract the series shown in your dicominfo within your heuristic, and ensure the output key ends in _bold (BIDS for functional). If multiple echoes are found, they will automatically be added, i.e.

sub-1_task-rest_echo-1_bold.nii.gz