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

[FIX] Fixes broken component figures in report when there are more than 99 components #824

Merged
merged 2 commits into from
Nov 5, 2021

Conversation

manfredg
Copy link
Contributor

@manfredg manfredg commented Nov 3, 2021

Closes # .

Changes proposed in this pull request:

This is a very minor bug fix that makes the 0-padding in the report Javascript code more robust. Specifically, the component figures didn't display correctly for any components > 99 since they were padded to 0100, 0101 etc instead of just 100.

This is a better way to get proper 0-padding that also works with >99 components.
@codecov
Copy link

codecov bot commented Nov 3, 2021

Codecov Report

Merging #824 (df98dd1) into main (28a0c46) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #824   +/-   ##
=======================================
  Coverage   93.27%   93.27%           
=======================================
  Files          27       27           
  Lines        2217     2217           
=======================================
  Hits         2068     2068           
  Misses        149      149           
Impacted Files Coverage Δ
tedana/reporting/dynamic_figures.py 100.00% <ø> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 28a0c46...df98dd1. Read the comment docs.

Copy link
Collaborator

@eurunuela eurunuela left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thank you @manfredg !

I have a question though. How long is your acquisition? >100 sounds like too many components. I wonder if the PCA step was not good.

@manfredg
Copy link
Contributor Author

manfredg commented Nov 4, 2021

LGTM! Thank you @manfredg !

I have a question though. How long is your acquisition? >100 sounds like too many components. I wonder if the PCA step was not good.

That's something I wanted to bring up in a separate issue. My first run on the dataset I am currently processing gave me 0 accepted components and only a handful rejected components. From my previous experience with Prantik's original ME-ICA code I would expect at least 20 accepted components for a dataset to pass QC. Also, since this is a resting state dataset which will be fed into a correlation based connectivity analysis, I need more than just a handful of DoFs in order to get a meaningful correlation matrix. It seems the current code is tuned towards minimizing the number of components, which is nice for the visualisation in the report, but is getting rid of too much information for my purposes.
I managed to increase the number of components (beyond 100 total) by requiring 90-95% variance explained using the --tedpca argument.

@eurunuela
Copy link
Collaborator

LGTM! Thank you @manfredg !
I have a question though. How long is your acquisition? >100 sounds like too many components. I wonder if the PCA step was not good.

That's something I wanted to bring up in a separate issue. My first run on the dataset I am currently processing gave me 0 accepted components and only a handful rejected components. From my previous experience with Prantik's original ME-ICA code I would expect at least 20 accepted components for a dataset to pass QC. Also, since this is a resting state dataset which will be fed into a correlation based connectivity analysis, I need more than just a handful of DoFs in order to get a meaningful correlation matrix. It seems the current code is tuned towards minimizing the number of components, which is nice for the visualisation in the report, but is getting rid of too much information for my purposes. I managed to increase the number of components (beyond 100 total) by requiring 90-95% variance explained using the --tedpca argument.

What --tedpca option did you use initially? I assume you used mdl, which is the most "aggressive" (and default) option. You could try to use aic instead and see if you get more components. However, the fact that you got 0 accepted components could be related to the decision tree that gets run after ICA.

FYI: you could also use Rica to manually classify your components.

Copy link
Member

@emdupre emdupre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This LGTM -- thank you, @manfredg !

@eurunuela
Copy link
Collaborator

Thanks @emdupre . I'll merge.

We can keep the discussion in an issue if you think it's necessary @manfredg .

@eurunuela eurunuela merged commit 0d10700 into ME-ICA:main Nov 5, 2021
@tsalo
Copy link
Member

tsalo commented Nov 8, 2021

@allcontributors add @manfredg for code

@allcontributors
Copy link
Contributor

@tsalo

I've put up a pull request to add @manfredg! 🎉

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

Successfully merging this pull request may close these issues.

4 participants