File filtering

Problem: want to analyze selected tasks (but more than 1, which is supported by the flag -t) and/or filter repeated fieldmaps (not supported).

Solution: Provide a filter file as below and add it to execution cmd with --bids-filter-file $file

{
"bold": {
"datatype": "func",
"session": "01",
"suffix": "bold",
"task": ["alicja1", "alicja2"]
},
"fmap": {
"datatype": "fmap",
"run": null
}
}

KIDS

Error: bad masking and segmentation Solution: Use dedicated templated from TEMPLATEFLOW

--skull-strip-template MNIPediatricAsym:cohort-2 \\
--output-spaces MNIPediatricAsym:cohort-2:res-1

FIELDMAPS

Error msg: Complex fieldmap logic… not supported

Solution: Map all fmap with run-02 to default name. You will need to filter those with run-XX too (see file filtering)

for s in sub*; do
  for dir in AP PA; do
    for ext in json nii.gz; do
      cd "$s/ses-01/fmap" || continue
      src="${s}_ses-01_acq-std_dir-${dir}_run-02_epi.${ext}"
      dst="${s}_ses-01_acq-std_dir-${dir}_epi.${ext}"
      [ -e "$src" ] && ln -sf "$src" "$dst"
      cd - > /dev/null
    done
  done
done