Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Characterize FC inflation with post-rapidtide figure? #14

Closed
tsalo opened this issue Sep 4, 2024 · 10 comments · Fixed by #15
Closed

Characterize FC inflation with post-rapidtide figure? #14

tsalo opened this issue Sep 4, 2024 · 10 comments · Fixed by #15
Labels
enhancement New feature or request

Comments

@tsalo
Copy link
Collaborator

tsalo commented Sep 4, 2024

What would you like to see added in fMRIPost-Rapidtide?

@bbfrederick WDYT about including a step after the rapidtide part that measures and plots FC inflation from the preprocessed, confound-denoised, and rapidtide-denoised data?

Do you have any interest in helping implement the feature?

Yes

Additional information / screenshots

No response

@tsalo tsalo added the enhancement New feature or request label Sep 4, 2024
@bbfrederick
Copy link
Collaborator

I like that idea! It may be a little hard to get good SNR on an individual run - judging the amplitude of a single noise signal over time is a bit tricky, but it's worth a go. I think the best way to do that would be:

  1. Derive the sLFO regressor using rapidtide
  2. Calculate a filtered RMS envelope function (square the signal, lowpass filter, take the square root).
  3. Do a linear fit to the filtered RMS function and compare the amplitude at the beginning and end of the run.

I'll cobble something together and put it into rapidtide.

@tsalo
Copy link
Collaborator Author

tsalo commented Sep 5, 2024

I thought FC inflation was characterized as the mean z-value across pair-wise correlations in an atlas for a 60-TR sliding window? Is the RMS envelope an alternative you came up with after the Korponay paper?

@bbfrederick
Copy link
Collaborator

Ah, yes. The sliding window method would be better, and would probably be more stable (and informative) on individual subjects. We had observed that FC inflation tracks with the sLFO amplitude, so in my head I think of them interchangeably. Cole put his sliding window code on GitHub somewhere - I think it just calls some AFNI tools, so it should be easy to add.

@tsalo
Copy link
Collaborator Author

tsalo commented Sep 5, 2024

I took a look at that last night and I think I can reproduce it in Python pretty easily (Nilearn does a lot of the heavy lifting).

If there are other measures worth tracking/plotting, I'm happy to add them.

With the BIDS App, we can also implement the rare analysis level "group" to aggregate measures and generate plots using the whole dataset, like MRIQC's group-level HTML report has, so if there are things that don't tend to show up at the subject level, then perhaps the group-level report will be helpful.

@ckorponay
Copy link

Hey Taylor, Blaise looped me in. I think adding this feature is an excellent idea. A few recommendations:

  1. The 60TR sliding window works well for long scans like in HCP, but for more typical scan lengths 60TR windows doesn't give you very many data points. In the paper we were able to track FC inflation in shorter scans just fine using 30TR windows, so I'd suggest using 30TR windows.

  2. Would suggest adding a metric(s) to quantify FC inflation alongside the graph. We used A) percent increase in FC in the last window relative to the first window, B) 'Avg FC in 2nd Half of Scan' minus 'Avg FC in 1st Half of Scan', and C) correlation of FC with time.

  3. The 30TR window size grabs enough data to make the trends fairly clear at the subject-level, but I'd also definitely second the suggestion to add the group-level graphs/metrics as well. (Maybe stats comparing the before and after useful as well)

Let me know if I can be of any further help!

Cole

@tsalo
Copy link
Collaborator Author

tsalo commented Sep 5, 2024

I like all those ideas! Thanks!

@bbfrederick
Copy link
Collaborator

One thing - it might be better to define the connectivity windows in terms of time rather than TRs, so that datasets would be comparable. For the 30TR datasets, what was the TR? We should do that number of seconds.

@tsalo
Copy link
Collaborator Author

tsalo commented Sep 5, 2024

I believe the paper used HCP-YA, so that would be a 0.72 second TR. 30 TRs is ~21.6 seconds.

@ckorponay
Copy link

Is this all live/operational now?

@tsalo
Copy link
Collaborator Author

tsalo commented Sep 19, 2024

The QC measures are in the workflow, but the workflow itself isn't fully working yet. I think I still need a modified version of RetroGLM on rapidtide's end to get everything working in #17.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants