-
Notifications
You must be signed in to change notification settings - Fork 26
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 CIFTI time series and correlations as TSV files #559
Conversation
The TSV files will need to be modified a bit to be BIDS compliant. Especially the conmat file. |
@kahinimehta WDYT about the conmat structure? Currently, I've got the index column of node names and the rest of the column names are node names as well. Based on BEP017, it seems like that's not preferred.
|
Conmat structure looks good... I'd honestly be okay leaving the header and index in and having the atlas info kinda in a similar structure as it is now, but if we wanted to go by the BEPS, this is probably the BEP we are looking at for nodelabels.tsv and nodelabels.json https://docs.google.com/document/d/1RxW4cARr3-EiBEcXjLpSIVidvnUSHE7yJCUY91i5TfM/edit#heading=h.4k1noo90gelw . We could have the node labels and index under the nodelabels.tsv and then in the json, the source atlases and description of the .tsv if needed. What do you think? |
I like that idea. The atlas BEP seems to have more detailed, and useful, recommendations for atlases than I thought. Unfortunately, I needed to get the NIFTI-based timeseries and conmats into the same structure to get everything working. NIFTIs, of course, don't have the associated node names within the files, so I need to refactor things a bit to carry along that info throughout the process, which really requires standardized atlases. Basically, finishing up this PR will need to wait until we have the atlases standardized. |
Codecov ReportBase: 68.83% // Head: 69.74% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## main #559 +/- ##
==========================================
+ Coverage 68.83% 69.74% +0.91%
==========================================
Files 71 73 +2
Lines 6430 6552 +122
==========================================
+ Hits 4426 4570 +144
+ Misses 2004 1982 -22
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. |
I will write out both TSVs and ptseries/pconn files, which means I'll need to redo a lot of the code here. |
Closing in favor of #785. |
Closes #555.
To do:
[ ] Determine what, if any, metadata we want to store in sidecar files.I'll probably deal with this in the provenance PR.[ ] Remove header and index from conmat files, and move them to aEverything's easier with a header and index, so I'll leave it for now._nodelabels
file. Probably at the top level of the derivatives.Changes proposed in this pull request
xcp_d.utils.utils.extract_ptseries
, that uses nibabel and pandas to extract the parcellated time series.xcp_d.utils.fcon.compute_functional_connectivity
, that uses pandas to perform the pair-wise Pearson correlations on the time series TSV file. This is used by both CIFTI and NIFTI workflows now.Documentation that should be reviewed