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

Write out QSIRecon pipeline-wise reports #7

Merged
merged 23 commits into from
Aug 14, 2024
Merged

Write out QSIRecon pipeline-wise reports #7

merged 23 commits into from
Aug 14, 2024

Conversation

tsalo
Copy link
Member

@tsalo tsalo commented Aug 9, 2024

Closes none. Partially reimplements PennLINC/qsiprep#761.

Probably doesn't work yet.

Changes proposed in this pull request

  • Add nireports as a dependency and use it.
  • Add QSIRecon report configs.
  • Add data loader module based on fMRIPrep.

@tsalo tsalo added the bug Something isn't working label Aug 9, 2024
@tsalo tsalo requested a review from mattcieslak August 14, 2024 18:34
@tsalo
Copy link
Member Author

tsalo commented Aug 14, 2024

@mattcieslak this is ready to review. None of the HTML reports have anything useful except for the boilerplate, but we can deal with that in a future PR.

@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 75.00000% with 10 lines in your changes missing coverage. Please review.

Project coverage is 33.28%. Comparing base (667c5de) to head (0a783dc).

Files Patch % Lines
qsirecon/workflows/base.py 0.00% 3 Missing ⚠️
qsirecon/workflows/recon/build_workflow.py 0.00% 3 Missing ⚠️
qsirecon/cli/workflow.py 80.00% 1 Missing and 1 partial ⚠️
qsirecon/workflows/recon/anatomical.py 0.00% 1 Missing ⚠️
qsirecon/workflows/recon/mrtrix.py 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main       #7      +/-   ##
==========================================
+ Coverage   32.18%   33.28%   +1.09%     
==========================================
  Files          56       56              
  Lines        6937     6780     -157     
  Branches      917      888      -29     
==========================================
+ Hits         2233     2257      +24     
+ Misses       4610     4432     -178     
+ Partials       94       91       -3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@mattcieslak mattcieslak left a comment

Choose a reason for hiding this comment

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

None of the comments should hold up merging this IMO

Copy link
Contributor

Choose a reason for hiding this comment

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

I was planning on deleting this entirely.

Comment on lines +191 to +200
qsirecon_suffixes = []
for node_spec in workflow_spec["nodes"]:
qsirecon_suffix = node_spec.get("qsirecon_suffix", None)
qsirecon_suffixes += [qsirecon_suffix] if qsirecon_suffix else []

qsirecon_suffixes = sorted(list(set(qsirecon_suffixes)))
config.loggers.cli.info(f"QSIRecon pipeline suffixes: {qsirecon_suffixes}")
failed_reports = []
for qsirecon_suffix in qsirecon_suffixes:
suffix_dir = str(config.execution.output_dir / f"qsirecon-{qsirecon_suffix}")
Copy link
Contributor

Choose a reason for hiding this comment

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

this is a smart approach

Copy link
Contributor

Choose a reason for hiding this comment

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

This might not ever be used in a recon workflow

Copy link
Member Author

Choose a reason for hiding this comment

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

We just need something when there are enough sessions that we want to split the reports by session.

qsirecon/dwiqc.json
qsirecon/sub-PNC
qsirecon/sub-PNC
qsirecon/sub-PNC.html
sub-PNC
Copy link
Contributor

Choose a reason for hiding this comment

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

Do you know why these keep getting created?

Copy link
Member Author

Choose a reason for hiding this comment

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

That's where the config TOML file and any crash files will be written

@tsalo tsalo merged commit 0995156 into main Aug 14, 2024
17 checks passed
@tsalo tsalo deleted the fix-reports branch August 14, 2024 19:49
mattcieslak pushed a commit that referenced this pull request Aug 16, 2024
* Add report config files.

* Remove viz submodule.

* Work on nireports.

* Add viz utils back in.

* More work.

* Fix import.

* Remove reportlets_dir.

* Try to fix things.

* Add qsirecon_suffix info.

* Update core.py

* Update run.py

* Update expected outputs.

* Update run.py

* Update.

* Update test_cli.py

* Update run.py

* Update expected outputs.

* Update workflow.py

* Update.

* Fix.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants