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

Generate CIFTI and TSV versions of coverage, timeseries, and correlation files #785

Merged
merged 43 commits into from Feb 24, 2023

Conversation

tsalo
Copy link
Member

@tsalo tsalo commented Feb 2, 2023

Closes #555 and closes #777. Supercedes #559 and #783.

Changes proposed in this pull request

  • When using the --cifti flag, generate and write out tsv versions of the coverage, timeseries, and correlation files for each atlas.
    • The tsv versions will have the node labels from the atlases' associated node labels files, rather than the node labels that are present within the CIFTI atlases. However, the CIFTI versions of these files will still have the original node names.
  • Remove unused CiftiPrepareForParcellation and CiftiCorrelation interfaces.

Documentation that should be reviewed

@tsalo tsalo changed the title Write out everything Generate CIFTI and TSV versions of coverage, timeseries, and correlation files Feb 2, 2023
@tsalo tsalo added the enhancement New feature or request label Feb 2, 2023
@codecov
Copy link

codecov bot commented Feb 5, 2023

Codecov Report

Base: 71.24% // Head: 71.42% // Increases project coverage by +0.18% 🎉

Coverage data is based on head (c9244d0) compared to base (d6a8eab).
Patch coverage: 92.33% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #785      +/-   ##
==========================================
+ Coverage   71.24%   71.42%   +0.18%     
==========================================
  Files          73       74       +1     
  Lines        6544     6562      +18     
==========================================
+ Hits         4662     4687      +25     
+ Misses       1882     1875       -7     
Impacted Files Coverage Δ
xcp_d/interfaces/prepostcleaning.py 94.40% <ø> (-1.39%) ⬇️
xcp_d/interfaces/workbench.py 91.17% <ø> (-0.66%) ⬇️
xcp_d/workflows/cifti.py 95.72% <ø> (ø)
xcp_d/interfaces/connectivity.py 91.54% <88.23%> (-8.46%) ⬇️
xcp_d/tests/test_workflows_connectivity.py 96.72% <95.58%> (+1.21%) ⬆️
xcp_d/tests/test_prepostcleaning.py 100.00% <100.00%> (ø)
xcp_d/tests/test_utils_atlas.py 100.00% <100.00%> (ø)
xcp_d/utils/atlas.py 94.73% <100.00%> (+84.73%) ⬆️
xcp_d/workflows/connectivity.py 100.00% <100.00%> (ø)
xcp_d/workflows/outputs.py 100.00% <100.00%> (ø)
... and 1 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@tsalo
Copy link
Member Author

tsalo commented Feb 5, 2023

@mattcieslak I think this is finally ready to review.

@tsalo tsalo self-assigned this Feb 6, 2023
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.

a massive undertaking, looks good to me. Just minor comments/questions

xcp_d/tests/test_workflows_connectivity.py Outdated Show resolved Hide resolved
xcp_d/tests/test_workflows_connectivity.py Outdated Show resolved Hide resolved
xcp_d/tests/test_workflows_connectivity.py Outdated Show resolved Hide resolved
xcp_d/workflows/outputs.py Show resolved Hide resolved
xcp_d/workflows/connectivity.py Outdated Show resolved Hide resolved
xcp_d/interfaces/connectivity.py Show resolved Hide resolved
)
n_voxels_in_masked_parcels = sum_masker_masked.fit_transform(atlas_img_bin)
n_voxels_in_parcels = sum_masker_unmasked.fit_transform(atlas_img_bin)
parcel_coverage = np.squeeze(n_voxels_in_masked_parcels / n_voxels_in_parcels)
coverage_thresholded = parcel_coverage < coverage_threshold

n_nodes = coverage_thresholded.size
n_nodes = len(node_labels)
n_found_nodes = coverage_thresholded.size
Copy link
Contributor

Choose a reason for hiding this comment

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

I've never seen .size used this way before.

xcp_d/interfaces/connectivity.py Show resolved Hide resolved
xcp_d/interfaces/connectivity.py Show resolved Hide resolved
xcp_d/interfaces/connectivity.py Show resolved Hide resolved
@tsalo tsalo added this to the manuscript milestone Feb 13, 2023
@tsalo
Copy link
Member Author

tsalo commented Feb 24, 2023

Going to merge. The file changes will be a drop in the bucket of the git history.

@tsalo tsalo merged commit ebed56a into PennLINC:main Feb 24, 2023
@tsalo tsalo deleted the write-out-everything branch February 24, 2023 18:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
2 participants