-
Notifications
You must be signed in to change notification settings - Fork 58
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
Add support for IBMA estimators with t-statistic images in Reports #896
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,7 @@ | |
from nimare.correct import FWECorrector | ||
from nimare.diagnostics import FocusCounter, Jackknife | ||
from nimare.meta.cbma import ALESubtraction | ||
from nimare.meta.ibma import Stouffers | ||
from nimare.meta.ibma import FixedEffectsHedges, Stouffers | ||
from nimare.reports.base import run_reports | ||
from nimare.workflows import CBMAWorkflow, IBMAWorkflow, PairwiseCBMAWorkflow | ||
|
||
|
@@ -75,17 +75,36 @@ def test_reports_ibma_smoke(tmp_path_factory, testdata_ibma, aggressive_mask): | |
"""Smoke test for IBMA reports.""" | ||
tmpdir = tmp_path_factory.mktemp("test_reports_ibma_smoke") | ||
|
||
# Generate a report with z maps as inputs | ||
stouffers_dir = op.join(tmpdir, "stouffers") | ||
workflow = IBMAWorkflow( | ||
estimator=Stouffers(aggressive_mask=aggressive_mask), | ||
corrector="fdr", | ||
diagnostics="jackknife", | ||
voxel_thresh=3.2, | ||
output_dir=tmpdir, | ||
output_dir=stouffers_dir, | ||
) | ||
results = workflow.fit(testdata_ibma) | ||
|
||
run_reports(results, tmpdir) | ||
run_reports(results, stouffers_dir) | ||
|
||
filename = "report.html" | ||
outpath = op.join(tmpdir, filename) | ||
outpath = op.join(stouffers_dir, filename) | ||
assert op.isfile(outpath) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. suggestion (testing): Consider adding edge case tests for invalid or missing t-statistic images While the current tests cover the basic functionality, it would be beneficial to add tests for edge cases such as invalid t-statistic images or missing images. This will ensure the robustness of the new feature.
|
||
|
||
# Generate a report with t maps as inputs | ||
hedges_dir = op.join(tmpdir, "hedges") | ||
workflow = IBMAWorkflow( | ||
estimator=FixedEffectsHedges(aggressive_mask=aggressive_mask), | ||
corrector="fdr", | ||
diagnostics="jackknife", | ||
voxel_thresh=3.2, | ||
output_dir=hedges_dir, | ||
) | ||
results = workflow.fit(testdata_ibma) | ||
|
||
run_reports(results, hedges_dir) | ||
|
||
filename = "report.html" | ||
outpath = op.join(hedges_dir, filename) | ||
assert op.isfile(outpath) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suggestion: Add a comment explaining the different approaches for aggressive and non-aggressive masking
The reasoning behind using different methods for correlation calculation based on the masking approach is not immediately clear. A brief comment would improve code understanding.