Hi Jingwei, You’ll want to use a mechanism similar to that discussed in this thread:
http://www.mail-archive.com/hcp-users@humanconnectome.org/msg04448.html You can use the XNAT REST protocol to iterate over sessions and resources. The files you’re wanting are structural preprocessing file outputs, so you can use something like the following to grep for specific files in the structural preprocessing pipeline output. You’ll probably want to add some redirection to redirect output to files. Regards, Mike #!/bin/bash read -s -p "ENTER PASSWORD: " PW;JSESSIONID=`curl -s -k -u [your_user_name]:$PW https://db.humanconnectome.org/data/JSESSIONID`;export JSESSIONID;echo $JSESSIONID for CSVROW in $(curl -s -k --cookie JSESSIONID=$JSESSIONID https://db.humanconnectome.org/data/experiments?xsiType=xnat:mrSessionData\&project=HCP_1200\&columns=ID,label,URI\&format=csv | grep "experiments"); do LABEL=$(echo $CSVROW | cut -d, -f3) EXP=$(echo $CSVROW | cut -d, -f4) echo "EXPERIMENT=$LABEL" for ROW in $(curl -s -k --cookie JSESSIONID=$JSESSIONID https://db.humanconnectome.org${EXP}/resources/Structural_preproc/files?format=csv | egrep "\/aseg.stats|\/lh.aparc.stats|\/rh.aparc.stats"); do NAME=$(echo $ROW | cut -d, -f1) URI=$(echo $ROW | cut -d, -f3) curl -s -k --cookie JSESSIONID=$JSESSIONID https://db.humanconnectome.org${URI} done done From: hcp-users-boun...@humanconnectome.org [mailto:hcp-users-boun...@humanconnectome.org] On Behalf Of Jingwei Li Sent: Monday, May 8, 2017 10:29 PM To: hcp-users@humanconnectome.org Subject: [HCP-Users] Download aparc+aseg.nii.gz, aseg.stats, lh/rh.aparc.stats of S1200 new subjects Dear HCP experts, I understand that the CREST resource mentioned in your wiki page does not contain the files of S1200 new subjects. So I would like to know how to download the aparc+aseg in MNI space, aseg.stats, lh.aparc.stats, and rh.aparc.stats of the S1200 new subjects. I don't want to download the whole structural data package since these are the only files I need. Thank you! Regards, Jingwei _______________________________________________ HCP-Users mailing list HCP-Users@humanconnectome.org<mailto:HCP-Users@humanconnectome.org> http://lists.humanconnectome.org/mailman/listinfo/hcp-users ________________________________ The materials in this message are private and may contain Protected Healthcare Information or other information of a sensitive nature. If you are not the intended recipient, be advised that any unauthorized use, disclosure, copying or the taking of any action in reliance on the contents of this information is strictly prohibited. If you have received this email in error, please immediately notify the sender via telephone or return mail. _______________________________________________ HCP-Users mailing list HCP-Users@humanconnectome.org http://lists.humanconnectome.org/mailman/listinfo/hcp-users