To begin, navigate to the downloaded KKI directory and use the following command to list each directory without trailing slashes:
ls -d */ | cut -f1 -d'/' > subjList.txt
You can then redirect this output to a text file, which can then be later edited at your leisure; in the above example, I used a redirect command to place all of the directories in a file called subjList.txt.
A for loop can then be used to do the analysis for each subject. (You can use any shell you want, but in this example I will use the t-shell.) Simply use the output of the text file as a variable, then use the for loop to execute the analysis for each subject, e.g.:
setenv subject `cat subjList.txt`
foreach subj ($subject)
cp RSproc.sh $subj/session_1
cd $subj/session_1
tcsh RSproc.sh $subj
cd ../..
end
The RSproc.sh script, generated from the uber_subject.py interface used in the last tutorial, can be found here. Note that I use a motion cutoff threshold of 0.3mm, which is slightly different from the standard 0.2mm cutoff; feel free to alter this if you like.
This should take care of all of your analyses while you go do something else, such as reading a book or shopping for tupperware and nosehair trimmers.* Of course, you will want to examine the output of your commands for any errors, but this menial task can usually be designated to one of your undergraduate RAs slated for resting-state data summoning immolation.
*Or maybe that's just me.
Hi Andy,
ReplyDeletethe link to RSproc.sh script is broken, would you happen to have another link or example ?
thanks so much.
Anonymous you can download
Deletehttps://drive.google.com/file/d/1QPmTIoxMdHELClpTXQcv8bxBJcQO_Dw6/view?usp=sharing from here change it's RSproc.sh name to proc.s061 and try. It seems good.
Hi Andy,
ReplyDeleteI have this problem too. I saved script from uber_subject.py and tried with that something happened but not the true one. Can u give us RSproc.sh and tell me about it's logic.
Best regards.
Thank you so much, Abdullah, really appreciate your help.
ReplyDeletebest regards