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

Split regressor estimation and denoising steps #17

Draft
wants to merge 33 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
a3c44a4
Work on memory issues.
tsalo Sep 5, 2024
e00778c
Don't run GLM within rapidtide call.
tsalo Sep 6, 2024
52b702d
Update rapidtide.py
tsalo Sep 6, 2024
1bde248
Try tracking outputs.
tsalo Sep 6, 2024
b97bff1
Run rapidtide on boldref-space data.
tsalo Sep 6, 2024
9003dbc
Write out delay map and regressor.
tsalo Sep 6, 2024
7e62346
Fix filenames.
tsalo Sep 6, 2024
358bd2f
Fix stuff.
tsalo Sep 6, 2024
9b55cf3
Work on denoising step.
tsalo Sep 7, 2024
15da054
Merge branch 'main' into memory-issues
tsalo Sep 7, 2024
c16841d
Update.
tsalo Sep 7, 2024
adf5c40
Update.
tsalo Sep 7, 2024
806bc5d
Keep working.
tsalo Sep 7, 2024
b0475c4
Fix import.
tsalo Sep 18, 2024
ab3b7fa
Update rapidtide.py
tsalo Sep 18, 2024
4df6124
Work on rapidtide interfaces.
tsalo Sep 26, 2024
c7315d3
Update rapidtide.py
tsalo Sep 26, 2024
8bfd10e
A bit more work.
tsalo Sep 28, 2024
320718d
Fix some stuff up.
tsalo Oct 9, 2024
5e9c610
Merge branch 'main' into memory-issues
tsalo Oct 9, 2024
db47088
Minor fix.
tsalo Oct 9, 2024
a7068a5
Update rapidtide version.
tsalo Oct 9, 2024
4abb7e2
Fix?
tsalo Oct 9, 2024
d4db0b5
update
tsalo Oct 9, 2024
743affb
[DATALAD] Added subdataset
tsalo Oct 9, 2024
7832f03
[DATALAD] Added subdataset
tsalo Oct 9, 2024
6fb425b
[DATALAD] Added subdataset
tsalo Oct 9, 2024
5c027da
Update.
tsalo Oct 9, 2024
387ea91
Remove old submodules.
tsalo Oct 9, 2024
b5cf819
Update.
tsalo Oct 9, 2024
430a676
Update.
tsalo Oct 9, 2024
eec3bc8
Update test_base.py
tsalo Oct 9, 2024
22be228
Update test_base.py
tsalo Oct 9, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ dependencies = [
"nitransforms == 23.0.1",
"niworkflows @ git+https://github.com/nipreps/niworkflows.git@master",
"pybids >= 0.15.6",
"rapidtide == 2.9.5.2",
"rapidtide == 2.9.8",
"sdcflows @ git+https://github.com/nipreps/sdcflows.git@master",
"smriprep @ git+https://github.com/nipreps/smriprep.git@master",
"typer",
Expand Down
2 changes: 2 additions & 0 deletions src/fmripost_rapidtide/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -613,6 +613,8 @@ class workflow(_Config):
"""Generate HCP Grayordinates, accepts either ``'91k'`` (default) or ``'170k'``."""
dummy_scans = None
"""Set a number of initial scans to be considered nonsteady states."""
average_over_runs = True
"""Whether to average lag maps over runs or not."""


class loggers:
Expand Down
37 changes: 14 additions & 23 deletions src/fmripost_rapidtide/data/io_spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,48 +16,49 @@
}
},
"derivatives": {
"bold_mni152nlin6asym": {
"bold_boldref": {
"datatype": "func",
"echo": null,
"part": [
"mag",
null
],
"res": "2",
"space": "MNI152NLin6Asym",
"res": null,
"space": null,
"desc": "preproc",
"suffix": "bold",
"extension": [
".nii.gz",
".nii"
]
},
"bold_mask_mni152nlin6asym": {
"bold_mask_boldref": {
"datatype": "func",
"echo": null,
"part": [
"mag",
null
],
"res": "2",
"space": "MNI152NLin6Asym",
"res": null,
"space": null,
"desc": "brain",
"suffix": "mask",
"extension": [
".nii.gz",
".nii"
]
},
"bold_mask_native": {
"boldref": {
"datatype": "func",
"echo": null,
"part": [
"mag",
null
],
"res": null,
"space": null,
"desc": "brain",
"suffix": "mask",
"desc": "coreg",
"suffix": "boldref",
"extension": [
".nii.gz",
".nii"
Expand All @@ -79,19 +80,6 @@
".tsv"
]
},
"dseg_mni152nlin6asym": {
"datatype": "anat",
"task": null,
"run": null,
"res": "2",
"space": "MNI152NLin6Asym",
"desc": null,
"suffix": "dseg",
"extension": [
".nii.gz",
".nii"
]
},
"anat_dseg": {
"datatype": "anat",
"task": null,
Expand All @@ -113,6 +101,7 @@
"from": "orig",
"to": "boldref",
"mode": "image",
"desc": ["hmc", null],
"suffix": "xfm",
"extension": ".txt"
},
Expand All @@ -121,6 +110,7 @@
"from": "boldref",
"to": ["anat", "T1w", "T2w"],
"mode": "image",
"desc": ["coreg", null],
"suffix": "xfm",
"extension": ".txt"
},
Expand Down Expand Up @@ -169,9 +159,10 @@
"name": "threshold",
"pattern": "(?:^|_)thresh-([a-zA-Z0-9]+)"
}
],
],
"patterns": [
"sub-{subject}[/ses-{session}]/{datatype<func>|func}/sub-{subject}[_ses-{session}]_task-{task}[_acq-{acquisition}][_ce-{ceagent}][_rec-{reconstruction}][_echo-{echo}][_part-{part}][_space-{space}][_res-{res}][_desc-{desc}]_{suffix<bold|boldref|dseg|mask>}.{extension<nii|nii.gz|json>|nii.gz}",
"sub-{subject}[/ses-{session}]/{datatype<func>|func}/sub-{subject}[_ses-{session}]_task-{task}[_acq-{acquisition}][_ce-{ceagent}][_dir-{direction}][_rec-{reconstruction}][_run-{run}][_echo-{echo}][_space-{space}][_cohort-{cohort}][_seg-{segmentation}][_res-{res}][_stat-{statistic}][_desc-{desc}]_{suffix<boldmap>}{extension<.nii|.nii.gz|.json>|.nii.gz}",
"sub-{subject}[/ses-{session}]/{datatype<func>|func}/sub-{subject}[_ses-{session}]_task-{task}[_acq-{acquisition}][_ce-{ceagent}][_rec-{reconstruction}][_echo-{echo}][_part-{part}][_space-{space}][_res-{res}][_stat-{statistic}][_desc-{desc}]_{suffix<components|mixing>}.{extension<nii|nii.gz|json>|nii.gz}",
"sub-{subject}[/ses-{session}]/{datatype<func>|func}/sub-{subject}[_ses-{session}]_task-{task}[_acq-{acquisition}][_ce-{ceagent}][_rec-{reconstruction}][_echo-{echo}][_part-{part}][_space-{space}][_res-{res}][_stat-{statistic}][_desc-{desc}]_{suffix<components|mixing>}.{extension<tsv|json>|tsv}",
"sub-{subject}[/ses-{session}]/{datatype<func>|func}/sub-{subject}[_ses-{session}]_task-{task}[_acq-{acquisition}][_ce-{ceagent}][_rec-{reconstruction}][_part-{part}][_desc-{desc}]_{suffix<metrics>}.{extension<tsv|json>|tsv}",
Expand Down
118 changes: 118 additions & 0 deletions src/fmripost_rapidtide/data/rapidtide_spec.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
autocorr:
filename: desc-autocorr_timeseries.nii.gz
autocorr_json:
filename: desc-autocorr_timeseries.json
cleansimdistdata:
filename: desc-cleansimdistdata_info.tsv.gz
cleansimdistdata_json:
filename: desc-cleansimdistdata_info.json
confoundfiltercleaned:
filename: desc-confoundfilterCleaned_bold.nii.gz
confoundfiltercleaned_json:
filename: desc-confoundfilterCleaned_bold.json
confoundfilterr2hist:
filename: desc-confoundfilterR2_hist.tsv.gz
confoundfilterr2hist_json:
filename: desc-confoundfilterR2_hist.json
confoundfilterr2map:
filename: desc-confoundfilterR2_map.nii.gz
confoundfilterr2map_json:
filename: desc-confoundfilterR2_map.json
corrfitmask:
filename: desc-corrfitmask_bold.nii.gz
corrfitmask_json:
filename: desc-corrfitmask_bold.json
expandedconfounds:
filename: desc-expandedconfounds_timeseries.tsv.gz
expandedconfounds_json:
filename: desc-expandedconfounds_timeseries.json
formattedruntimings:
filename: desc-formattedruntimings_info.tsv
globallaghist:
filename: desc-globallag_hist.tsv.gz
globallaghist_json:
filename: desc-globallag_hist.json
globalmeanmask:
filename: desc-globalmean_mask.nii.gz
globalmeanmask_json:
filename: desc-globalmean_mask.json
initialmovingregressor:
filename: desc-initialmovingregressor_timeseries.tsv.gz
initialmovingregressor_json:
filename: desc-initialmovingregressor_timeseries.json
lagtcgenerator:
filename: desc-lagtcgenerator_timeseries.tsv.gz
lagtcgenerator_json:
filename: desc-lagtcgenerator_timeseries.json
maxcorrhist:
filename: desc-maxcorr_hist.tsv.gz
maxcorrhist_json:
filename: desc-maxcorr_hist.json
maxcorrmap:
filename: desc-maxcorr_map.nii.gz
maxcorrmap_json:
filename: desc-maxcorr_map.json
maxcorrsqmap:
filename: desc-maxcorrsq_map.nii.gz
maxcorrsqmap_json:
filename: desc-maxcorrsq_map.json
maxtimehist:
filename: desc-maxtime_hist.tsv.gz
maxtimehist_json:
filename: desc-maxtime_hist.json
maxtimemap:
filename: desc-maxtime_map.nii.gz
maxtimemap_json:
filename: desc-maxtime_map.json
maxwidthhist:
filename: desc-maxwidth_hist.tsv.gz
maxwidthhist_json:
filename: desc-maxwidth_hist.json
maxwidthmap:
filename: desc-maxwidth_map.nii.gz
maxwidthmap_json:
filename: desc-maxwidth_map.json
meanmap:
filename: desc-mean_map.nii.gz
meanmap_json:
filename: desc-mean_map.json
movingregressor:
filename: desc-movingregressor_timeseries.tsv.gz
movingregressor_json:
filename: desc-movingregressor_timeseries.json
mtthist:
filename: desc-MTT_hist.tsv.gz
mtthist_json:
filename: desc-MTT_hist.json
mttmap:
filename: desc-MTT_map.nii.gz
mttmap_json:
filename: desc-MTT_map.json
nullsimfunchist:
filename: desc-nullsimfunc_hist.tsv.gz
nullsimfunchist_json:
filename: desc-nullsimfunc_hist.json
oversampledmovingregressor:
filename: desc-oversampledmovingregressor_timeseries.tsv.gz
oversampledmovingregressor_json:
filename: desc-oversampledmovingregressor_timeseries.json
preprocessedconfounds:
filename: desc-preprocessedconfounds_timeseries.tsv.gz
preprocessedconfounds_json:
filename: desc-preprocessedconfounds_timeseries.json
processedmask:
filename: desc-processed_mask.nii.gz
processedmask_json:
filename: desc-processed_mask.json
refinemask:
filename: desc-refine_mask.nii.gz
refinemask_json:
filename: desc-refine_mask.json
refinedmovingregressor:
filename: desc-refinedmovingregressor_timeseries.tsv.gz
refinedmovingregressor_json:
filename: desc-refinedmovingregressor_timeseries.json
timepercentilemap:
filename: desc-timepercentile_map.nii.gz
timepercentilemap_json:
filename: desc-timepercentile_map.json
Loading
Loading