Summary of what happened:
I am trying to re-run pyAFQ from the bundle recognition step on after initially running with AFQ-waypoints method, now switching to Recobundles method for comparison. I would like to use the outputs of the earlier steps (tensor fitting, tractography, etc) and avoid re-running the full pipeline. I initiated the original run with a config file using default parameters, and I am trying to use API to update the segmentation parameters for the rerun and remove the afq-waypoints method with clobber (I have already saved a copy of those).
This method is failing with an error that the ‘seg_algo’ argument is not recognized.
Command used (and if a helper script was used, a link to the helper script or the command generated):
from AFQ.api.group import GroupAFQ
# Initialize AFQ object
afq = GroupAFQ(
bids_path="/bids",
output_dir="/derivatives/afq",
segmentation_params={
'seg_algo': 'reco',
'refine_reco': True,
'rb_recognize_params': {
'model_clust_thr': 1.25,
'pruning_thr': 12,
'reduction_thr': 25,
}
}
)
# Remove old segmentation outputs only
afq.clobber(dependent_on="recog")
# Recompute segmentation and subsequent steps
afq.export_all()
Version:
Running via Singularity/Apptainer, pulled as follows:
apptainer pull docker://ghcr.io/nrdg/pyafq:latest
Environment (Docker, Singularity / Apptainer, custom installation):
Apptainer job file:
apptainer exec --containall \
-B $HOME/elgan_dti/code:/code,$HOME/elgan_dti/data:/bids,$HOME/elgan_dti/data/derivatives:/derivatives,$HOME/elgan_dti/work:/work,$HOME:/home/meaghan.perdue-umw \
pyafq_latest.sif python /code/afq_run_recobundles.py
where afq_run_recobundles.py contains the command code pasted above.
Data formatted according to a validatable standard? Please provide the output of the validator:
Yes, bids format is valide, pyAFQ runs correctly with waypoints method.
Relevant log outputs (up to 20 lines):
File "/usr/local/lib/python3.11/site-packages/pimms/util.py", line 1132, in _choose_last
return vs[-1][k]
~~~~~~^^^
File "/usr/local/lib/python3.11/site-packages/pimms/calculation.py", line 470, in __getitem__
self._run_node(self.plan.efferents[k])
File "/usr/local/lib/python3.11/site-packages/pimms/calculation.py", line 534, in _run_node
if not found: res = node(self)
^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/pimms/calculation.py", line 91, in __call__
result = self.function(*args)
^^^^^^^^^^^^^^^^^^^^
File "<string>", line 2, in wrapper_has_args_func
File "/usr/local/lib/python3.11/site-packages/AFQ/tasks/decorators.py", line 148, in wrapper_as_file
gen, meta = func(*args[:og_arg_count], **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/AFQ/tasks/segmentation.py", line 94, in segment
bundles, bundle_meta = recognize(
^^^^^^^^^^
TypeError: recognize() got an unexpected keyword argument 'seg_algo'