[HCP-Users] About interpreting EVs and .dtseries.nii files

2018-02-22 Thread Sang-Yun Oh
Dear HCP-Users,

I am pretty new to task fMRI data and I would like to check how to use the
files in the EVs folder to extract information from the .dtseries.nii file
for the MOTOR dataset. As an example, I chose subject 100307 with the LR
phase and I was able to build this table from the files in the EVs folder:

*type start time (s)*
countdown 0
cue_rightHand 8.05
rightHand 11.009
cue-leftFoot 23.164
leftFoot  38.291

So suppose I would like to extract from a .dtseries.nii file (having 284
rows x 91282 grayordinates) the part of the time series corresponding to
the Right-Hand task listed above. Then:

Should I pick all the rows covering the time interval [11.009;23.164] ?

If so, should I pick rows 15 through 33 from the .dtseries.nii file which
cover the time interval starting from 10.8 (=0.72*15) until 23.76(=0.72*33)
?

Moreover, does the same interpretation hold for obtaining the .dtseries.nii
rows corresponding to the cues and the fixation blocks?

Thank you for your help!

___
HCP-Users mailing list
HCP-Users@humanconnectome.org
http://lists.humanconnectome.org/mailman/listinfo/hcp-users


[HCP-Users] 3 faculty positions at UCSB, Brain Initiative

2017-10-10 Thread Sang-Yun Oh
Dear HCP-users,

Following positions maybe of interest to users on this list

Best,
Sang

==
Sang-Yun Oh
Assistant Professor
Statistics and Applied Probability
University of California, Santa Barbara
http://www.pstat.ucsb.edu/faculty/syoh/


We're hiring!
> *3 junior faculty in various areas of neuroscience *(*Science *ad here
> <https://jobs.sciencecareers.org/job/462185/three-faculty-positions-in-neuroscience-/>;
> individual UC Recruit ads below)
> If there is someone you'd like to see at UCSB, please bring these to their
> attention.
>
> Note: The first position can be in any of the 9 MLPS departments so if you
> know someone who likes brains but would be most appropriate as a faculty
> member in Physics, Chem, Stats, Math, etc now is your opportunity.
>
> *Assistant Prof - Neuroscience *(apply here
> <https://recruit.ap.ucsb.edu/apply/JPF01093>)
> Any dept in Mathematical Life & Physical Sciences
> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
> - -
> *Assistant Prof - Neural Basis of Motivated Behavior *(apply here
> <https://recruit.ap.ucsb.edu/apply/JPF01092>)
> Dept of Psychological & Brain Science
> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
> - -
> *Assistant Prof - Vision Science/Visual Neuroscience *(apply here
> <https://recruit.ap.ucsb.edu/apply/JPF01038>)
> Dept of Psychological & Brain Science
>
> Thanks for your help bringing more great people into our brain community.
>
> bnQ
>
> --
> --
> BN Queenan, PhD
> Associate Director, UCSB Brain Initiative
> Research Director, UCSB Nanolab
> Neuroscience Research Institute; Dept of Mechanical Engineering
> University of California Santa Barbara
>
>

___
HCP-Users mailing list
HCP-Users@humanconnectome.org
http://lists.humanconnectome.org/mailman/listinfo/hcp-users


Re: [HCP-Users] Functional connectivity gradient map

2017-08-19 Thread Sang-Yun Oh
Thank you!

On Fri, Aug 18, 2017 at 2:42 PM Glasser, Matthew <glass...@wustl.edu> wrote:

> wb_command -cifti-gradient and wb_command -cifti-correlation-gradient.
> There are also -metric-gradient for GIFTI files and -volume-gradient for
> NIFTI files.
>
> Peace,
>
> Matt.
>
> From: <hcp-users-boun...@humanconnectome.org> on behalf of Sang-Yun Oh <
> s...@pstat.ucsb.edu>
> Date: Friday, August 18, 2017 at 4:36 PM
> To: "hcp-users@humanconnectome.org" <hcp-users@humanconnectome.org>
> Subject: [HCP-Users] Functional connectivity gradient map
>
> Dear HCP users,
>
> In this paper,
> https://www.nature.com/nature/journal/v536/n7615/fig_tab/nature18933_F2.html,
> I imagine Figure 2g is a row in the dense connectome.
>
> How were Figure 2, c and d generated? Is there code available to compute
> the FC gradients? I searched the github, but nothing caught my eye
>
> Thank you in advance for any advice on how I can compute the FC gradient
> map
>
> Best,
> Sang
>
> ___
> HCP-Users mailing list
> HCP-Users@humanconnectome.org
> http://lists.humanconnectome.org/mailman/listinfo/hcp-users
>

___
HCP-Users mailing list
HCP-Users@humanconnectome.org
http://lists.humanconnectome.org/mailman/listinfo/hcp-users


[HCP-Users] Functional connectivity gradient map

2017-08-18 Thread Sang-Yun Oh
Dear HCP users,

In this paper,
https://www.nature.com/nature/journal/v536/n7615/fig_tab/nature18933_F2.html,
I imagine Figure 2g is a row in the dense connectome.

How were Figure 2, c and d generated? Is there code available to compute
the FC gradients? I searched the github, but nothing caught my eye

Thank you in advance for any advice on how I can compute the FC gradient map

Best,
Sang

___
HCP-Users mailing list
HCP-Users@humanconnectome.org
http://lists.humanconnectome.org/mailman/listinfo/hcp-users


Re: [HCP-Users] Infinite values in Group average data

2017-05-15 Thread Sang-Yun Oh
This makes more sense! Sorry I missed your mention of fisher-z transform

So I would apply tanh to each element to revert back to regular correlation
coefficients

Thank you for your help!

Best,
Sang

On Mon, May 15, 2017 at 5:57 PM Timothy Coalson <tsc...@mst.edu> wrote:

> After the fisher-z transform, you can have values greater than 1, see the
> graph on the right:
>
> https://en.wikipedia.org/wiki/Fisher_transformation
>
> This is why the "correct" answer for the diagonal is infinity for the
> "zcorr" file.
>
> Tim
>
>
> On Mon, May 15, 2017 at 7:51 PM, Sang-Yun Oh <san...@gmail.com> wrote:
>
>> I am also finding that some off-diagonal elements in this matrix are also
>> greater than 1 indicating this matrix is not a correlation matrix.
>>
>> In [5]: img
>> Out[5]:
>> memmap([[  8.66434002e+00,   1.96847185e-01,   1.66294336e-01, ...,
>>   1.01449557e-01,   7.45474100e-02,   1.15624115e-01],
>>[  1.96847185e-01,  inf,   3.36383432e-01, ...,
>>  -5.70017472e-03,  -5.49946353e-02,   3.72834280e-02],
>>[  1.66294336e-01,   3.36383432e-01,  inf, ...,
>>  -4.45242636e-02,  -6.07097335e-02,  -1.51601573e-02],
>>...,
>>[  1.01449557e-01,  -5.70017472e-03,  -4.45242636e-02, ...,
>>  inf,   1.91883039e+00,   9.20160294e-01],
>>[  7.45474100e-02,  -5.49946353e-02,  -6.07097335e-02, ...,
>>  * 1.91883111e+00*,   8.31776619e+00,   8.82132888e-01],
>>[  1.15624115e-01,   3.72833721e-02,  -1.51601573e-02, ...,
>>       9.20160294e-01,   8.82132888e-01,   8.66434002e+00]],
>> dtype=float32)
>>
>> Any insight would be appreciated
>>
>> Thanks,
>> Sang
>>
>> On Mon, May 15, 2017 at 1:13 PM Sang-Yun Oh <san...@gmail.com> wrote:
>>
>>> Thank you for the response.
>>>
>>> I am, too, confused by some being non-zero finite values, and others
>>> being infinities.
>>>
>>> Before computing a correlation matrix, if standardized by subtracting
>>> the mean and scaling by variance, all diagonal elements should be exactly 1.
>>>
>>> What I am concerned about is how the whole matrix was computed, since a
>>> fundamental characteristic of correlation matrix is not satisfied
>>>
>>> Best,
>>> Sang
>>>
>>> On Mon, May 15, 2017 at 11:33 AM Timothy Coalson <tsc...@mst.edu> wrote:
>>>
>>>> Per the name "zcorr", the correlation values have been z-transformed
>>>> (fisher's small z transform).  I am somewhat confused as to why some
>>>> elements in the diagonal are not infinite.  The "true" value of applying
>>>> this transform would be infinite on the entire diagonal, as arctanh(1) is
>>>> infinite.  I am guessing this result was generated in matlab, as wb_command
>>>> actually prevents infinities when using the z transform, putting a cap on
>>>> the correlation (when not using z-transform, it shows correlations of 1 as
>>>> expected).
>>>>
>>>> Whatever analysis you do with correlation matrices like this should
>>>> ignore the diagonal anyway, since it is correlation to itself.
>>>>
>>>> Tim
>>>>
>>>>
>>>> On Mon, May 15, 2017 at 3:57 AM, Sang-Yun Oh <san...@gmail.com> wrote:
>>>>
>>>>> I downloaded group average functional correlation
>>>>> file: HCP_S900_820_rfMRI_MSMAll_groupPCA_d4500ROW_zcorr.dconn.nii
>>>>>
>>>>> Some diagonal elements of the square matrix (91282x91282) are infinite
>>>>> (Please see below).
>>>>>
>>>>> I want to use this matrix in ananalysis; however, I am not sure how to
>>>>> understand or deal with infinite diagonal values.
>>>>>
>>>>> I appreciate any insight
>>>>>
>>>>> Thanks,
>>>>> Sang
>>>>>
>>>>> ==
>>>>>
>>>>> In [1]: import nibabel
>>>>>
>>>>> In [2]: asdf =
>>>>> nibabel.load('HCP_S900_820_rfMRI_MSMAll_groupPCA_d4500ROW_zcorr.dconn.nii')
>>>>>
>>>>> In [3]: img = asdf.get_data()
>>>>>
>>>>> In [4]: img.shape
>>>>> Out[4]: (1, 1, 1, 1, 91282, 91282)
>>>>>
>>>>> In [5]: S = img[0,0,0,0,:,:]
>>>>>
>>>>> In [6]: S
>>

Re: [HCP-Users] Infinite values in Group average data

2017-05-15 Thread Sang-Yun Oh
I am also finding that some off-diagonal elements in this matrix are also
greater than 1 indicating this matrix is not a correlation matrix.

In [5]: img
Out[5]:
memmap([[  8.66434002e+00,   1.96847185e-01,   1.66294336e-01, ...,
  1.01449557e-01,   7.45474100e-02,   1.15624115e-01],
   [  1.96847185e-01,  inf,   3.36383432e-01, ...,
 -5.70017472e-03,  -5.49946353e-02,   3.72834280e-02],
   [  1.66294336e-01,   3.36383432e-01,  inf, ...,
 -4.45242636e-02,  -6.07097335e-02,  -1.51601573e-02],
   ...,
   [  1.01449557e-01,  -5.70017472e-03,  -4.45242636e-02, ...,
 inf,   1.91883039e+00,   9.20160294e-01],
   [  7.45474100e-02,  -5.49946353e-02,  -6.07097335e-02, ...,
 * 1.91883111e+00*,   8.31776619e+00,   8.82132888e-01],
   [  1.15624115e-01,   3.72833721e-02,  -1.51601573e-02, ...,
  9.20160294e-01,   8.82132888e-01,   8.66434002e+00]],
dtype=float32)

Any insight would be appreciated

Thanks,
Sang

On Mon, May 15, 2017 at 1:13 PM Sang-Yun Oh <san...@gmail.com> wrote:

> Thank you for the response.
>
> I am, too, confused by some being non-zero finite values, and others being
> infinities.
>
> Before computing a correlation matrix, if standardized by subtracting the
> mean and scaling by variance, all diagonal elements should be exactly 1.
>
> What I am concerned about is how the whole matrix was computed, since a
> fundamental characteristic of correlation matrix is not satisfied
>
> Best,
> Sang
>
> On Mon, May 15, 2017 at 11:33 AM Timothy Coalson <tsc...@mst.edu> wrote:
>
>> Per the name "zcorr", the correlation values have been z-transformed
>> (fisher's small z transform).  I am somewhat confused as to why some
>> elements in the diagonal are not infinite.  The "true" value of applying
>> this transform would be infinite on the entire diagonal, as arctanh(1) is
>> infinite.  I am guessing this result was generated in matlab, as wb_command
>> actually prevents infinities when using the z transform, putting a cap on
>> the correlation (when not using z-transform, it shows correlations of 1 as
>> expected).
>>
>> Whatever analysis you do with correlation matrices like this should
>> ignore the diagonal anyway, since it is correlation to itself.
>>
>> Tim
>>
>>
>> On Mon, May 15, 2017 at 3:57 AM, Sang-Yun Oh <san...@gmail.com> wrote:
>>
>>> I downloaded group average functional correlation
>>> file: HCP_S900_820_rfMRI_MSMAll_groupPCA_d4500ROW_zcorr.dconn.nii
>>>
>>> Some diagonal elements of the square matrix (91282x91282) are infinite
>>> (Please see below).
>>>
>>> I want to use this matrix in ananalysis; however, I am not sure how to
>>> understand or deal with infinite diagonal values.
>>>
>>> I appreciate any insight
>>>
>>> Thanks,
>>> Sang
>>>
>>> ==
>>>
>>> In [1]: import nibabel
>>>
>>> In [2]: asdf =
>>> nibabel.load('HCP_S900_820_rfMRI_MSMAll_groupPCA_d4500ROW_zcorr.dconn.nii')
>>>
>>> In [3]: img = asdf.get_data()
>>>
>>> In [4]: img.shape
>>> Out[4]: (1, 1, 1, 1, 91282, 91282)
>>>
>>> In [5]: S = img[0,0,0,0,:,:]
>>>
>>> In [6]: S
>>> Out[6]:
>>> memmap([[  8.66434002e+00,   1.96847185e-01,   1.66294336e-01, ...,
>>>   1.01449557e-01,   7.45474100e-02,   1.15624115e-01],
>>>[  1.96847185e-01,  inf,   3.36383432e-01, ...,
>>>  -5.70017472e-03,  -5.49946353e-02,   3.72834280e-02],
>>>[  1.66294336e-01,   3.36383432e-01,  inf, ...,
>>>  -4.45242636e-02,  -6.07097335e-02,  -1.51601573e-02],
>>>...,
>>>[  1.01449557e-01,  -5.70017472e-03,  -4.45242636e-02, ...,
>>>  inf,   1.91883039e+00,   9.20160294e-01],
>>>[  7.45474100e-02,  -5.49946353e-02,  -6.07097335e-02, ...,
>>>   1.91883111e+00,   8.31776619e+00,   8.82132888e-01],
>>>[  1.15624115e-01,   3.72833721e-02,  -1.51601573e-02, ...,
>>>   9.20160294e-01,   8.82132888e-01,   8.66434002e+00]],
>>> dtype=float32)
>>>
>>> In [7]: S.diagonal()
>>> Out[7]:
>>> memmap([ 8.66434002, inf, inf, ..., inf,
>>> 8.31776619,  8.66434002], dtype=float32)
>>>
>>>
>>> ___
>>> HCP-Users mailing list
>>> HCP-Users@humanconnectome.org
>>> http://lists.humanconnectome.org/mailman/listinfo/hcp-users
>>>
>>
>>

___
HCP-Users mailing list
HCP-Users@humanconnectome.org
http://lists.humanconnectome.org/mailman/listinfo/hcp-users


Re: [HCP-Users] Infinite values in Group average data

2017-05-15 Thread Sang-Yun Oh
Thank you for the response.

I am, too, confused by some being non-zero finite values, and others being
infinities.

Before computing a correlation matrix, if standardized by subtracting the
mean and scaling by variance, all diagonal elements should be exactly 1.

What I am concerned about is how the whole matrix was computed, since a
fundamental characteristic of correlation matrix is not satisfied

Best,
Sang

On Mon, May 15, 2017 at 11:33 AM Timothy Coalson <tsc...@mst.edu> wrote:

> Per the name "zcorr", the correlation values have been z-transformed
> (fisher's small z transform).  I am somewhat confused as to why some
> elements in the diagonal are not infinite.  The "true" value of applying
> this transform would be infinite on the entire diagonal, as arctanh(1) is
> infinite.  I am guessing this result was generated in matlab, as wb_command
> actually prevents infinities when using the z transform, putting a cap on
> the correlation (when not using z-transform, it shows correlations of 1 as
> expected).
>
> Whatever analysis you do with correlation matrices like this should ignore
> the diagonal anyway, since it is correlation to itself.
>
> Tim
>
>
> On Mon, May 15, 2017 at 3:57 AM, Sang-Yun Oh <san...@gmail.com> wrote:
>
>> I downloaded group average functional correlation
>> file: HCP_S900_820_rfMRI_MSMAll_groupPCA_d4500ROW_zcorr.dconn.nii
>>
>> Some diagonal elements of the square matrix (91282x91282) are infinite
>> (Please see below).
>>
>> I want to use this matrix in ananalysis; however, I am not sure how to
>> understand or deal with infinite diagonal values.
>>
>> I appreciate any insight
>>
>> Thanks,
>> Sang
>>
>> ==
>>
>> In [1]: import nibabel
>>
>> In [2]: asdf =
>> nibabel.load('HCP_S900_820_rfMRI_MSMAll_groupPCA_d4500ROW_zcorr.dconn.nii')
>>
>> In [3]: img = asdf.get_data()
>>
>> In [4]: img.shape
>> Out[4]: (1, 1, 1, 1, 91282, 91282)
>>
>> In [5]: S = img[0,0,0,0,:,:]
>>
>> In [6]: S
>> Out[6]:
>> memmap([[  8.66434002e+00,   1.96847185e-01,   1.66294336e-01, ...,
>>   1.01449557e-01,   7.45474100e-02,   1.15624115e-01],
>>[  1.96847185e-01,  inf,   3.36383432e-01, ...,
>>  -5.70017472e-03,  -5.49946353e-02,   3.72834280e-02],
>>[  1.66294336e-01,   3.36383432e-01,  inf, ...,
>>  -4.45242636e-02,  -6.07097335e-02,  -1.51601573e-02],
>>...,
>>[  1.01449557e-01,  -5.70017472e-03,  -4.45242636e-02, ...,
>>  inf,   1.91883039e+00,   9.20160294e-01],
>>[  7.45474100e-02,  -5.49946353e-02,  -6.07097335e-02, ...,
>>   1.91883111e+00,   8.31776619e+00,   8.82132888e-01],
>>[  1.15624115e-01,   3.72833721e-02,  -1.51601573e-02, ...,
>>   9.20160294e-01,   8.82132888e-01,   8.66434002e+00]],
>> dtype=float32)
>>
>> In [7]: S.diagonal()
>> Out[7]:
>> memmap([ 8.66434002, inf, inf, ..., inf,
>> 8.31776619,  8.66434002], dtype=float32)
>>
>>
>> ___
>> HCP-Users mailing list
>> HCP-Users@humanconnectome.org
>> http://lists.humanconnectome.org/mailman/listinfo/hcp-users
>>
>
>

___
HCP-Users mailing list
HCP-Users@humanconnectome.org
http://lists.humanconnectome.org/mailman/listinfo/hcp-users


[HCP-Users] Infinite values in Group average data

2017-05-15 Thread Sang-Yun Oh
I downloaded group average functional correlation
file: HCP_S900_820_rfMRI_MSMAll_groupPCA_d4500ROW_zcorr.dconn.nii

Some diagonal elements of the square matrix (91282x91282) are infinite
(Please see below).

I want to use this matrix in ananalysis; however, I am not sure how to
understand or deal with infinite diagonal values.

I appreciate any insight

Thanks,
Sang

==

In [1]: import nibabel

In [2]: asdf =
nibabel.load('HCP_S900_820_rfMRI_MSMAll_groupPCA_d4500ROW_zcorr.dconn.nii')

In [3]: img = asdf.get_data()

In [4]: img.shape
Out[4]: (1, 1, 1, 1, 91282, 91282)

In [5]: S = img[0,0,0,0,:,:]

In [6]: S
Out[6]:
memmap([[  8.66434002e+00,   1.96847185e-01,   1.66294336e-01, ...,
  1.01449557e-01,   7.45474100e-02,   1.15624115e-01],
   [  1.96847185e-01,  inf,   3.36383432e-01, ...,
 -5.70017472e-03,  -5.49946353e-02,   3.72834280e-02],
   [  1.66294336e-01,   3.36383432e-01,  inf, ...,
 -4.45242636e-02,  -6.07097335e-02,  -1.51601573e-02],
   ...,
   [  1.01449557e-01,  -5.70017472e-03,  -4.45242636e-02, ...,
 inf,   1.91883039e+00,   9.20160294e-01],
   [  7.45474100e-02,  -5.49946353e-02,  -6.07097335e-02, ...,
  1.91883111e+00,   8.31776619e+00,   8.82132888e-01],
   [  1.15624115e-01,   3.72833721e-02,  -1.51601573e-02, ...,
  9.20160294e-01,   8.82132888e-01,   8.66434002e+00]],
dtype=float32)

In [7]: S.diagonal()
Out[7]:
memmap([ 8.66434002, inf, inf, ..., inf,
8.31776619,  8.66434002], dtype=float32)

___
HCP-Users mailing list
HCP-Users@humanconnectome.org
http://lists.humanconnectome.org/mailman/listinfo/hcp-users


[HCP-Users] Replicating "Resting-state fMRI in the Human Connectome Project"

2017-05-12 Thread Sang-Yun Oh
Dear HCP users,

I am new to this area and I would like to do a replication exercise to
learn more about HCP dataset and neuroscience tools.

What would be the simplest way to get my hands on matrix G (Figure 2) in
this paper? https://doi.org/10.1016/j.neuroimage.2013.05.039 I would
imagine G is after regressing out any motion and white matter signals (is
this true?)

I tried to read the supplemental material; however, it was very complex and
way over my head.

Is there a script available for computing G from HCP released data that a
newbie like me can use?

I would appreciate any guidance

Best,
Sang

___
HCP-Users mailing list
HCP-Users@humanconnectome.org
http://lists.humanconnectome.org/mailman/listinfo/hcp-users