Closed noahfl closed 3 years ago
Adding iterative field map correction to this issue. Field map correction has been implemented in branch camCAN_fmap
but is currently hard-coded for creating the resting-state field map only. Needs to be re-coded to iterate through different field maps to match each fMRI iteration. Relevant code bits to be changed are here:
bb_pipeline_func.py
: https://github.com/McIntosh-Lab-RRI/tvb-ukbb/blob/996d6118eb62ac50aea00af506ae0006eba93de9/bb_functional_pipeline/bb_pipeline_func.py#L72tvb_prepare_gradEchoFieldMap
: https://github.com/McIntosh-Lab-RRI/tvb-ukbb/blob/996d6118eb62ac50aea00af506ae0006eba93de9/bb_functional_pipeline/tvb_prepare_gradEchoFieldMap#L20bb_prepare_rfMRI
: https://github.com/McIntosh-Lab-RRI/tvb-ukbb/blob/996d6118eb62ac50aea00af506ae0006eba93de9/bb_functional_pipeline/bb_prepare_rfMRI#L51
As it stands, the pipeline can only accept one
rfMRI
file and onetfMRI
file. This issue and corresponding project entry will chronicle the steps taken to rewrite the functional pipeline so that it accepts an arbitrary number ofrfMRI
/tfMRI
files. Below is a task list that should encompass all required to pull this off. Bolded tasks are main tasks while unbolded ones are sub-tasks underneath the main task. Git markdown doesn't let you make sub-task-lists so this is the next best way.[x] Modify
bb_pipeline_tools/bb_file_manager.py
to process arbitrary number ofrfMRI
/tfMRI
files[x] modify how
rfMRI
/tfMRI
key/value pairs are stored in/written tofileConfig
/file_descriptor.json
so they can accept arbitrary number of numbered filenames[x] modify function
move_file_add_to_config
to support writing arbitrary number of numbered filenames tofileConfig
[x] modify function
manage_fMRI
to rename and move arbitrary number ofrfMRI
/tfMRI
files and their respectSBREF
files, if extant (and generate if not)[x] Modify
bb_functional_pipeline/bb_pipeline_func.py
to loop over eachrfMRI
/tfMRI
key infileConfig
and complete the pipeline for all extant files[x] change how
fileConfig
is read by functional pipeline since keys will be of format e.g."rfMRI_1"
,"tfMRI_3"
, etc.[x] create loop that iterates over each matching key and executes the pipeline
[x] Modify all intermediate processes to accept an additional single numeric argument at the end of their existing arguments and de-hardcode to accept the numeric argument as part of
rfMRI
/tfMRI
filename[x]
bb_prepare_rfMRI
,feat
,bb_fix
,bb_FC
,bb_clean_fix_logs
[x] modify existing arguments to accommodate new numeric argument where applicable (e.g.
feat
's first argument inbb_functional_pipeline/bb_pipeline_func.py
finds a corresponding.fsf
file; modify so it looks for e.g.rfMRI_1.fsf
instead ofrfMRI.fsf
)