Hi, we are currently trying to combine the ICA component timeseries with other common nuisance signals in the same model, and apply it to the optimally combined data. As a first step, I wanted to make sure I was doing the regression correctly. I can not seem to match the dn_ts_OC.nii file after regressing out the accepted ICA components from the optimally combined BOLD. Can you point me to the code where you do this? I can’t find it.
In the current code, I think denoise_ts is the function you’re looking for. It’s here: https://github.com/ME-ICA/tedana/blob/f42ba63829e1aa060b2be9bf2f9d72903c4714a6/tedana/io.py#L339
I’m happy to talk more here or via DM about your plans in this area.
Another option would be using AFNI’s 3dDeconvolve with your classified components and regressors for instance, like @smoia did in https://www.sciencedirect.com/science/article/pii/S1053811921001919
I’m not sure Stefano shared the code though.
Thanks Dan!! We are planning to run fMRIPrep, store the working directory, run Tedana, and then pass the ICA components as “custom regressors” to XCP-D (XCP-D : A Robust Postprocessing Pipeline of fMRI data — xcp_d version documentation), which takes in fMRIPrep data. Here, you can combine custom regressors with our standard models (like CompCor), or alone.
Your regression implemented a bit different but otherwise should be rather similar. Although, our results are very different, both inside XCP-D, and when I do it “by hand” in a notebook. Am I right that I should just treat each ICA time series as a regressors, like I would with CompCor components? And all you do is demean the data before regression?
You should be able to treat the time series like regressors. I don’t think you should have to demean. I have one thought on what might be different. By default, tedana does not orthogonalize the regressors that are beging regressed out of the data. Within tedana, there’s an option to orthogonalize the regressors to remove from the accepted regressors from the ICA. Other programs, like AFNI also have the option to orthogonlize nuisance regressors from task or other regressors. Depending on what you do or don’t orthogonalize, perhaps that’s what’s causing the difference?
Hmm, even when I just use linear regression with nothing else, the results are very different, with voxels that are just totally uncorrelated. I am trying to match the dn_ts_OC.nii.gz file. Is that the correct one?
That should be the right one. What version are you using? The regression step shouldn’t have changed in a while but we have changed some names of outputted files within the past year.
A guess is that you’re not identifying the same components to remove. Only the ones classified as rejected should be removed.
One other guess is that, if you did orthogonalize the outputs in tedana, then there’s one mixing matrix where the rejected components are orthogonalized and one where they aren’t.
Can you share a sample dateset and code somewhere?
Hi Dan, I sent you an email with links to the dataset and code, but never heard back. Maybe I have the wrong email?
I saw you pinged me only now, sorry - I don’t think it’s useful anymore, but all my code is available on GitHub (so yes, I shared the part @eurunuela is referring to). Let me know if I can be of any help!