Hi Greg,
Thank you again for the script below. I am trying to implement it to obtain the 
acquisition times for some of the scans, but am running into problems with the 
following command:

grep -e 'scans.*rfMRI\"'

It seems to hang in my terminal-- am I typing the command correctly?
Thank you!
Sam


-----Original Message-----
From: Greg Burgess [mailto:[email protected]] 
Sent: Friday, November 14, 2014 4:03 PM
To: Cunningham, Samantha (NIH/NIAAA) [F]
Cc: [email protected]
Subject: Re: [HCP-Users] Time of Acquisition-- Human Connectome

Hi Sam,

It should be possible to get these without a web browser using the XNAT REST 
API.  I’m not expert at using it, but here’s what I found that worked for me.

###In linux, run the following commands:
host="https://db.humanconnectome.org”;
project="HCP_500”;
# for each subject that you want, set the subjectID and create the session 
identifier subjectID="100307”; session=“${subjectID}_3T”; curl -u 
username:password -X GET 
${host}/data/archive/projects/${project}/subjects/${subjectID}/experiments/${session}
 | grep -e 'scans.*rfMRI\"'


This should give you a set of “id” fields for the rfMRI scans for that 
participant. 
obj.categories["scans"].push({id:"206",label:"206 rfMRI"});
obj.categories["scans"].push({id:"208",label:"208 rfMRI"});
obj.categories["scans"].push({id:"406",label:"406 rfMRI"});
obj.categories["scans"].push({id:"408",label:"408 rfMRI"});


Script something to grab the id fields from that output. For each of the id 
fields, run the following commands:
id="206”; ## this is one of the four id’s returned by the command above curl -u 
username:password -X GET 
${host}/data/archive/projects/${project}/subjects/${subjectID}/experiments/${session}/scans/${id}
 | grep startTime

This should return a field that contains the starting time of the scan:
<TR><TD>startTime</TD><TD>20:04:46</TD></TR>

Hopefully, using these commands as a basis, you can figure out how to write a 
script that will loop over all of your subjects and scans to give you all of 
the start times that you need.

--Greg

____________________________________________________________________
Greg Burgess, Ph.D.
Staff Scientist, Human Connectome Project Washington University School of 
Medicine Department of Anatomy and Neurobiology
Phone: 314-362-7864
Email: [email protected]

> On Nov 13, 2014, at 10:34 AM, Jennifer Elam <[email protected]> wrote:
> 
> Hi Samantha,
> Sorry for the delay in getting back to you. The time of day of 
> collection for each MR session/scan for each HCP subject is available in 
> ConnectomeDB.
> Here's how to find it:
> 
> -From the splash page or 500 Subjects project page in ConnectomeDB  
> click on Explore/Browse Subjects to go to the Subject Dashboard.
> -If you wish, you can use the data filters to select for subjects, 
> e.g. with
> 4 sessions of complete rfMRI data. 
> -Click on one of the subject ID listed in the columns--this is a link 
> to a page for that subject.
> -Click on the MR Session link on the subject details page.
> -Click on the "+" button beside the scan(s) for which you want time info.
> -Time should be listed as the first row of details for the scan.
> 
> We do not include dates of collection for privacy reasons, instead Day 
> 1 and Day 2 are used to distinguish the days of acquisition. Hope this 
> is helpful and good luck with your analyses.
> 
> Best,
> Jenn
> 
> Jennifer Elam, Ph.D.
> Outreach Coordinator, Human Connectome Project Washington University 
> School of Medicine Department of Anatomy and Neurobiology, Box 8108
> 660 South Euclid Avenue
> St. Louis, MO 63110
> 314-362-9387
> [email protected]
> www.humanconnectome.org
> 
> 
> -----Original Message-----
> From: Cunningham, Samantha (NIH/NIAAA) [F] 
> [mailto:[email protected]]
> Sent: Wednesday, November 05, 2014 7:04 AM
> To: David Van Essen; Jennifer Elam
> Subject: RE: Time of Acquisition-- Human Connectome
> 
> Hi Jenn and David-- thank you for your help! I am working on a 
> circadian rhythm study and was hoping to compare resting-state data 
> between different times of the day.
> 
> Best,
> Sam
> 
> ________________________________
> From: David Van Essen [[email protected]]
> Sent: Tuesday, November 04, 2014 10:00 PM
> To: Jennifer Elam
> Cc: Cunningham, Samantha (NIH/NIAAA) [F]
> Subject: Re: Time of Acquisition-- Human Connectome
> 
> Jenn,
> 
> Good point.  Please extend your response to hcp-users as others may be 
> interested.
> 
> David
> 
> On Nov 4, 2014, at 5:43 PM, Jennifer Elam 
> <[email protected]<mailto:[email protected]>> wrote:
> 
> Hi Samantha,
> Page 44 of the current Reference
> Manual<http://humanconnectome.org/documentation/S500/HCP_S500_Release_
> Refere nce_Manual.pdf> shows a typical participant schedule. However, 
> in order to make the scheduling work for our subjects (some of whom 
> work full time and did the scanning at night/on a weekend, for 
> example), we do the scanning at many different times of day so you 
> can't assume that all the rfMRI scanning was done from 1-2pm, for 
> example, for all subjects.  As David mentioned, usually rfMRI session 
> 1 (REST 1) is done on Day 1 and REST2 is done on Day 2. I am checking 
> with our database expert about whether one can reliably look at the 
> time information for each scan in ConnectomeDB if you want to roughly 
> match scan times in your analysis. I'll get back to you when I hear 
> more.
> 
> Best,
> Jenn
> 
> Jennifer Elam, Ph.D.
> Outreach Coordinator, Human Connectome Project Washington University 
> School of Medicine Department of Anatomy and Neurobiology, Box 8108
> 660 South Euclid Avenue
> St. Louis, MO 63110
> 314-362-9387<tel:314-362-9387>
> [email protected]<mailto:[email protected]>
> www.humanconnectome.org<http://www.humanconnectome.org/>
> 
> From: David Van Essen [mailto:[email protected]]
> Sent: Tuesday, November 04, 2014 5:09 PM
> To: Cunningham, Samantha (NIH/NIAAA) [F]
> Cc: David Van Essen; Jennifer Elam
> ([email protected]<mailto:[email protected]>)
> Subject: Re: Time of Acquisition-- Human Connectome
> 
> Hello Samantha,
> 
> In general, one pair of rfMRI scans (LR and RL phase encoding) were 
> acquired on day 1, another pair on day 2.  Time of day varied 
> according to the schedule.
> 
> I am copying Jenn Elam, who may have more detail to provide.  Also, I 
> believe the Reference Manual on the HCP website gives added information.
> 
> Finally, please join hcp-users and post there if you have additional 
> questions that may be of general interest.
> 
> David
> 
> 
> On Nov 4, 2014, at 10:40 AM, Cunningham, Samantha (NIH/NIAAA) [F] 
> <[email protected]<mailto:[email protected]>> wrote:
> 
> 
> Hi David,
> I am currently working with your Human Connectome datasets for a 
> resting-state fMRI/DTI project and was hoping for your help. I noticed 
> that the rs-fMRI scans took place over two separate sessions-did these 
> sessions take place on the same day (and if so, at what times)? Or on 
> a different day at the same time?
> 
> I am currently using the unprocessed Structural, Diffusion, and 
> Resting State fMRI 1 datasets  from the "WU-Minn HCP Data - 500 
> Subjects" (40 Unrelated Subjects) group. Everything was downloaded 
> fromhttps://db.humanconnectome.org/.
> 
> Thank you for your help!
> Samantha
> --------------------------------------------------
> Samantha Cunningham, Ph.D.
> Postdoctoral Fellow
> National Institutes of Health|NIAAA|LNI 
> [email protected]<mailto:[email protected]>
> 
> 
> Samantha Cunningham, Ph.D.
> Postdoctoral Fellow
> National Institutes of Health|NIAAA|LNI 
> [email protected]<mailto:[email protected]>
> 
> 
> _______________________________________________
> HCP-Users mailing list
> [email protected]
> http://lists.humanconnectome.org/mailman/listinfo/hcp-users


_______________________________________________
HCP-Users mailing list
[email protected]
http://lists.humanconnectome.org/mailman/listinfo/hcp-users

Reply via email to