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

Add summary reportlets to HTML report #61

Merged
merged 21 commits into from
Aug 20, 2024
Merged

Add summary reportlets to HTML report #61

merged 21 commits into from
Aug 20, 2024

Conversation

tsalo
Copy link
Member

@tsalo tsalo commented Aug 19, 2024

Related to #13. Still missing run-wise anatomical and DWI summaries.

Changes proposed in this pull request

  • Add "About" reportlet with command.
  • Add "Summary" reportlet with summary of collected data.
  • Write out top-level reportlets to individual reconstruction pipelines' output directories.
  • Pin nireports to new release that supports PNGs.

@tsalo tsalo added the bug Something isn't working label Aug 19, 2024
@codecov-commenter
Copy link

codecov-commenter commented Aug 19, 2024

Codecov Report

Attention: Patch coverage is 48.52941% with 35 lines in your changes missing coverage. Please review.

Project coverage is 33.75%. Comparing base (e780ae1) to head (bcd8bcd).

Files Patch % Lines
qsirecon/workflows/base.py 12.50% 28 Missing ⚠️
qsirecon/interfaces/utils.py 66.66% 4 Missing ⚠️
qsirecon/interfaces/reports.py 75.00% 2 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #61      +/-   ##
==========================================
+ Coverage   33.52%   33.75%   +0.22%     
==========================================
  Files          56       56              
  Lines        6824     6852      +28     
  Branches      891      892       +1     
==========================================
+ Hits         2288     2313      +25     
  Misses       4438     4438              
- Partials       98      101       +3     

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

@tsalo
Copy link
Member Author

tsalo commented Aug 19, 2024

The summary reportlets are being written to the output_dir rather than individual QSIRecon pipeline directories. I could either move the reportlet generation to the individual pipelines' workflows or copy any reportlets to the pipeline directories. I'm leaning toward the latter.

@tsalo tsalo marked this pull request as ready for review August 19, 2024 19:39
@tsalo tsalo requested a review from mattcieslak August 19, 2024 20:38
@tsalo
Copy link
Member Author

tsalo commented Aug 19, 2024

@mattcieslak do you think QSIRecon should write out the recon spec? It seems useful.

@mattcieslak
Copy link
Contributor

@mattcieslak do you think QSIRecon should write out the recon spec? It seems useful.

Definitely. It's at least as important as the config.toml file

@tsalo
Copy link
Member Author

tsalo commented Aug 19, 2024

I add that in then

@tsalo
Copy link
Member Author

tsalo commented Aug 19, 2024

Okay it's added and it looks good.

qsirecon/config.py Show resolved Hide resolved
# create a processing pipeline for the dwis in each session
dwi_recon_wfs = {}
dwi_individual_anatomical_wfs = {}
recon_full_inputs = {}
dwi_ingress_nodes = {}
anat_ingress_nodes = {}
print(dwi_recon_inputs)
for dwi_input in dwi_recon_inputs:
dwi_files = [dwi_input["bids_dwi_file"] for dwi_input in dwi_recon_inputs]
for i_run, dwi_input in enumerate(dwi_recon_inputs):
Copy link
Contributor

Choose a reason for hiding this comment

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

How do the runs work here?

Copy link
Member Author

Choose a reason for hiding this comment

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

I have no real idea how dwi_recon_inputs organizes the input data, since I assumed that QSIRecon concatenated all of the DWI runs, but since it does collect potentially multiple files, I needed a step to merge them into a single list for the summary reportlet.

Copy link
Contributor

Choose a reason for hiding this comment

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

ohh, in the case of dmri all the concatenation has happened in qsiprep. For qsirecon I think users will want to generate separate results for every dwi file that is in the inputs. If a researcher leaves the files split they most likely want to run recon workflows on them separately to test methoes (eg @ameliecr's project will do this)

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 makes sense

workflow.connect([(reduce_t1_preproc, summary, [("outlist", "t1w")])])

suffix_dirs = []
for qsirecon_suffix in config.workflow.qsirecon_suffixes:
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 great solution

@tsalo tsalo merged commit 46d86da into main Aug 20, 2024
17 checks passed
@tsalo tsalo deleted the add-abouts branch August 20, 2024 13:43
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