Re: [HCP-Users] Regress confounds out of CIFTIs

2019-02-01 Thread Steve Smith
Hi - yes IIRC it's only the demeaning that is important - the scaling of the 
regressors makes no difference to the output from the deconfounding.

Normalising SD is a "sane" step in such processing in general, and sometimes is 
of value (depending on what outputs one is interested in wrt the internal 
multiple regression) - but if you just want the residuals (like here) it 
doesn't change things.

Cheers.




> On 1 Feb 2019, at 05:14, Ely, Benjamin  wrote:
> 
> Hi Matt,
> 
> I’ve been using a matlab command similar to the one you gave to 
> regress/remove timeseries values from our data, based on code from the ICAFIX 
> script fix_3_clean.m. Glad to hear that’s what you suggest! Quick question 
> though: before regressing out ICA component timeseries values, the ICAFIX 
> script runs them through the command "functionnormalise()", which both 
> demeans the data and sets the standard deviation equal to 1. It sounds from 
> your email like only the demeaning part of that is necessary, so what is the 
> purpose of normalizing the SD?
> 
> Thank you!
> -Ely
> ___
> HCP-Users mailing list
> HCP-Users@humanconnectome.org
> http://lists.humanconnectome.org/mailman/listinfo/hcp-users


---
Stephen M. Smith, Professor of Biomedical Engineering
Head of Analysis,  WIN (FMRIB) Oxford

FMRIB, JR Hospital, Headington, Oxford  OX3 9DU, UK
+44 (0) 1865 610470
st...@fmrib.ox.ac.ukhttp://www.fmrib.ox.ac.uk/~steve 

---

Stop the cultural destruction of Tibet 









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


Re: [HCP-Users] Regress confounds out of CIFTIs

2019-01-31 Thread Ely, Benjamin
Hi Matt,

I’ve been using a matlab command similar to the one you gave to regress/remove 
timeseries values from our data, based on code from the ICAFIX script 
fix_3_clean.m. Glad to hear that’s what you suggest! Quick question though: 
before regressing out ICA component timeseries values, the ICAFIX script runs 
them through the command "functionnormalise()", which both demeans the data and 
sets the standard deviation equal to 1. It sounds from your email like only the 
demeaning part of that is necessary, so what is the purpose of normalizing the 
SD?

Thank you!
-Ely

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


Re: [HCP-Users] Regress confounds out of CIFTIs

2019-01-24 Thread Leonardo Tozzi
Dear Matt,

Looks like I really need to improve my linear algebra.
Thank you very much!

Leonardo Tozzi, MD, PhD
Williams PanLab | Postdoctoral Fellow
Stanford University | 401 Quarry Rd
lto...@stanford.edu<mailto:lto...@stanford.edu> | (650) 5615738


From: "Glasser, Matthew" 
Date: Thursday, January 24, 2019 at 3:05 PM
To: Leonardo Tozzi , "hcp-users@humanconnectome.org" 

Subject: Re: [HCP-Users] Regress confounds out of CIFTIs

We do this in matlab.  It is not necessary to loop, just use proper matrix 
math.  For example:

newdtseries = dtseries - (demean(regressor) * (pinv(demean(regressor)) * 
dtseries'))’;

Where demean(regressor) removes the mean of each regressor.

Matt.

From: 
mailto:hcp-users-boun...@humanconnectome.org>>
 on behalf of Leonardo Tozzi mailto:lto...@stanford.edu>>
Date: Thursday, January 24, 2019 at 2:04 PM
To: "hcp-users@humanconnectome.org<mailto:hcp-users@humanconnectome.org>" 
mailto:hcp-users@humanconnectome.org>>
Subject: [HCP-Users] Regress confounds out of CIFTIs

Dear Experts,

I have a text file of confound regressors that I would like to regress out of a 
resting state .dtseries.nii file and save the residuals of this procedure as a 
new .dtseries.nii file.
I was wondering if there is a computationally efficient way of doing this, 
possibly using the wb_command. Right now, the only thing I can think about is 
using matlab but it is obviously impractical to loop over the 90k greyordinates.
I have looked into the fsl_glm command, but it doesn’t take in CIFTIs, so I 
would have to then work on the NIFTI and transform it to CIFTI again, for 
example by rerunning the surface preprocessing step.
Would you have any suggestions?
Thank you,


Leonardo Tozzi, MD, PhD
Williams PanLab | Postdoctoral Fellow
Stanford University | 401 Quarry Rd
lto...@stanford.edu<mailto:lto...@stanford.edu> | (650) 5615738


___
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


Re: [HCP-Users] Regress confounds out of CIFTIs

2019-01-24 Thread Glasser, Matthew
We do this in matlab.  It is not necessary to loop, just use proper matrix 
math.  For example:

newdtseries = dtseries - (demean(regressor) * (pinv(demean(regressor)) * 
dtseries'))’;

Where demean(regressor) removes the mean of each regressor.

Matt.

From: 
mailto:hcp-users-boun...@humanconnectome.org>>
 on behalf of Leonardo Tozzi mailto:lto...@stanford.edu>>
Date: Thursday, January 24, 2019 at 2:04 PM
To: "hcp-users@humanconnectome.org" 
mailto:hcp-users@humanconnectome.org>>
Subject: [HCP-Users] Regress confounds out of CIFTIs

Dear Experts,

I have a text file of confound regressors that I would like to regress out of a 
resting state .dtseries.nii file and save the residuals of this procedure as a 
new .dtseries.nii file.
I was wondering if there is a computationally efficient way of doing this, 
possibly using the wb_command. Right now, the only thing I can think about is 
using matlab but it is obviously impractical to loop over the 90k greyordinates.
I have looked into the fsl_glm command, but it doesn’t take in CIFTIs, so I 
would have to then work on the NIFTI and transform it to CIFTI again, for 
example by rerunning the surface preprocessing step.
Would you have any suggestions?
Thank you,


Leonardo Tozzi, MD, PhD
Williams PanLab | Postdoctoral Fellow
Stanford University | 401 Quarry Rd
lto...@stanford.edu | (650) 5615738


___
HCP-Users mailing list
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