-
Notifications
You must be signed in to change notification settings - Fork 295
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
ENH: separate anatomical and functional reports per session for densely sampled dataset #3191
Conversation
… anatomical report and the functional reports per session. fix: let generate_reports() define the default config file
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #3191 +/- ##
==========================================
+ Coverage 71.90% 72.60% +0.69%
==========================================
Files 55 56 +1
Lines 4161 4241 +80
==========================================
+ Hits 2992 3079 +87
+ Misses 1169 1162 -7 ☔ View full report in Codecov by Sentry. |
…-nireports' into enh/sep_anat_func_report
2d35de6
to
e802a75
Compare
…port as a cli option
…p into enh/sep_anat_func_report
fix: turn the subject into a list if it is inputted as a string
… the name of the html reports enh: add test to verify that the reports get separated above max-ses-agr and that otherwise we retain the old behavior enh: add test to verify that the implementation above is not disrupted by adding a crash file in the subject folder
0de8074
to
4e87c48
Compare
…session, the full boilerplate (describing both anatomical and functional preprocessing) is appended only in the anatomical report. enh: report errors in the visual report. Similarly to the boilerplate, in case of report separation, all errors are reported only in the anatomical report. fix: delete misplaced test files
…n the report. enh: add test to check that the boilerplate has been incorporated in the reports. fix: condense all the tests in one implementation
4182c9e
to
3249c18
Compare
I don't know what to do about the "Check fmriprep" test, because if I run PS the lines it complains about are not in the file I have changed for this PR |
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.
Very quick lookthrough
But certainly not under the reportlets dir...
…On Tue, Jan 30, 2024 at 3:10 PM celprov ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In fmriprep/data/reports-spec-anat.yml
<#3191 (comment)>:
> + - bids: {datatype: figures, space: .*, suffix: T1w, regex_search: True}
+ caption: Spatial normalization of the T1w image to the <code>{space}</code> template.
+ description: Results of nonlinear alignment of the T1w reference one or more template
+ space(s). Hover on the panels with the mouse pointer to transition between both
+ spaces.
+ static: false
+ subtitle: Spatial normalization of the anatomical T1w reference
+ - bids: {datatype: figures, desc: reconall, suffix: T1w}
+ caption: Surfaces (white and pial) reconstructed with FreeSurfer (<code>recon-all</code>)
+ overlaid on the participant's T1w template.
+ subtitle: Surface reconstruction
+- name: About
+ reportlets:
+ - bids: {datatype: figures, desc: about, suffix: T1w}
+ - custom: boilerplate
+ path: '{reportlets_dir}/logs'
Yes, the CITATION.html is written inside logs. I had the debug that line
to make it work, so I'm sure about this.
—
Reply to this email directly, view it on GitHub
<#3191 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAESDRRGJFB7JCALAMQNZ5LYRD5OHAVCNFSM6AAAAABA6ZGRK6VHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMYTQNJRGM4DMNRRGY>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Co-authored-by: Oscar Esteban <code@oscaresteban.es>
1c56024
to
edd3d8e
Compare
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.
Looks like nireports uses out_dir
, not output_dir
:
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.
Outputs look good to me.
I pushed a few additional changes.
- I emptied out the SVG files to avoid cluttering the repository. We don't care about these contents, so we don't need git to track these. We'll need to squash to prevent the commits that do contain these from staying in the repository long-term.
- In general, we want to avoid using
__file__
, as that puts constraints on installers. In some cases, an installer may want to keep the package zipped, and__file__
is not zip-safe. Thefmriprep.data.load
object lets us havePath
-like objects when we need to read things and actualPath
s when we need files that definitely exist on the filesystem. See https://www.nipreps.org/niworkflows/master/api/niworkflows.data.html for the API. - I used a
tmp_path
fixture to allow us to avoid writing into the package directory and delete files at the end.
LMK what you think, but I think this should be good to merge if the tests pass.
a5e5ed5
to
d0b7289
Compare
d0b7289
to
e89765d
Compare
Going to go ahead and get this in, re-update the style PR, and we can address any concerns with my last-second hacks in a separate PR. Thanks for all your effort on this! |
Thank you @effigies for your help finalizing it! I'm happy this one is out of the door :) |
…ly sampled dataset (nipreps#3191) enh: beyond a certain number of session for a single subject (4), we separate the anatomical report from the functional and we separate the functional reports per session. For fewer sessions than 4, we keep the original behavior of aggregating all sessions and the anatomical in one report. enh: find the suitable bootstrapfile within generate_reports rather than before enh: add session_list argument to generate_reports Builds on top of nipreps#3177 Closes nipreps#3080 --------- Co-authored-by: Oscar Esteban <code@oscaresteban.es> Co-authored-by: Chris Markiewicz <markiewicz@stanford.edu>
24.0.0 (June 17, 2024) New feature release in the 24.0.x series. This release is an incremental improvement on 23.2.x, with some fixes for bugs discovered in the updated workflow. New features include separation of HTML reports by session for subjects with many BOLD runs, a new ``--fs-no-resume`` option to improve interoperability with less typical FreeSurfer directories, such as those generated by longitudinal FreeSurfer or FastSurfer, and adoption of DatasetLinks and BIDS-URIs, to follow the recommendations of recent versions of BIDS. With thanks to Dimitri Papadopoulos, Basile Pinsard, Celine Provins, Taylor Salo and Wang Hao-Ting for their contributions! * FIX: Add "double" type to allowed DisplacementFieldTransform (#3287) * FIX: Require recent templateflow, select correct aparc dseg.tsv (#3256) * FIX: Ensure proper templates are retrieved with sloppy (#3251) * FIX: Delete summary from functional report when separated by sessions (#3223) * FIX: Support lists in bids filter file containing ``null`` or ``*`` (#3215) * FIX: Re-enable anat fasttrack for dataset without t1w (#3202) * ENH: Use BIDSURI in init_ds_boldmask_wf (#3297) * ENH: Add templateflow to DatasetLinks (#3267) * ENH: Track proximal sources of functional GIFTIs (#3263) * ENH: Support named derivative paths (#3264) * ENH: Track Sources for standard-space outputs (#3262) * ENH: Add --fs-no-resume option to reuse existing FreeSurfer outputs without resuming (#3142) * ENH: Use BIDS URIs to track Sources in sidecars (#3255) * ENH: Ignore unselected subjects in BIDSLayoutIndexer (#3236) * ENH: Add metadata for motion parameters (#3245) * ENH: Separate anatomical and functional reports per session for densely sampled dataset (#3191) * ENH: Leverage T2w if available for BOLD -> anat coregistration (#3208) * RF: Fix ITK warp conversion to nitransforms format (#3300) * RF: Load report assembler from nireports (#3177) * DOC: Clarify ``--dvars-spike-threshold`` uses standardized DVARS (#3205) * TST: Update test to reflect new report generation behavior (#3210) * STY: Manual conversions to f-strings (#3241) * STY: Apply ruff/pyupgrade rule UP031 (#3280) * STY: Lint and style check full repository (#3221) * STY: Adopt ruff for linting and formatting (#3206) * MNT: Pin libitk 5.3 and note dependencies (#3298) * MNT: Upgrade ruff pre-commit, add fixing checks (#3283) * MNT: Complete transition from flake8/black to ruff (#3279) * MNT: Apply Repo-Review suggestions (#3194) * MNT: Verbatim copy of Apache license 2.0 (#3259) * MNT: Bump cryptography from 41.0.7 to 42.0.4 (#3234) * MNT: Drop copyright year, unused dunder fields (#3247) * MNT: Update environment pins (#3226) * MNT: Bump codecov/codecov-action from 3 to 4 (#3219) * DOCKER: Restore mincinfo binary (#3249) * CI: Move to new circle machine tags (#3248) * CI: Avoid ruff warning (#3244) * CI: Pass ruff tests (#3243)
enh: beyond a certain number of session for a single subject (4), we separate the anatomical report from the functional and we separate the functional reports per session. For fewer sessions than 4, we keep the original behavior of aggregating all sessions and the anatomical in one report.
enh: find the suitable bootstrapfile within generate_reports rather than before
enh: add session_list argument to generate_reports
Builds on top of #3177
Closes #3080