Heudiconv on multiple subjects

heudiconv

#1

Hello,
Im using heudiconv and it works when I input one subject. Although, when I include a list of subjects it does not work. It outputs INFO: Need to process 0 study sessions.
I use:
singularity run …
/…/nipy_heudiconv…img
-d …
-s cat ‘participants_in.txt’ -f …
-c dcm2niix -b -o …

When I instead use -s subjectName it runs it correctly.
Any idea on why this does not work?


#2

@Granit_Kastrati

Heudiconv does not support input files with subject IDs, but this should be fairly easy to do in bash.
Consider a file subjects.txt that contains the following

subject1
subject2
subject3

You could pass the contents from that file into your heudiconv subjects by specifying

singularity run ...
....
-s $(cat subjects.txt | tr '\n' ' ')
...

and it should translate to

...
-s subject1 subject2 subject3
...