Clean_bundles directory missing with latest pyAFQ

I recently updated my pyAFQ to the latest version, 1.2 using python -m pip install pyAFQ method. When I run the following bash code:

python3 - ${SBJ} << EOF
import os.path as op
import AFQ.api.bundle_dict as abd
from AFQ.api.participant import ParticipantAFQ
from AFQ.definitions.image import ImageFile

mask_path="/pyAFQPATH/preproc/${SBJ}/dwi/${SBJ}_brainmask.nii.gz"
dwi_path="/pyAFQPATH/preproc/${SBJ}/dwi/${SBJ}_dwi.nii.gz"
bval_path="/pyAFQPATH/preproc/${SBJ}/dwi/${SBJ}_dwi.bval"
bvec_path="/pyAFQPATH/preproc/${SBJ}/dwi/${SBJ}_dwi.bvec"
out_dir="/pyAFQPATH/afq/${SBJ}"

brain_mask_definition = ImageFile(path=mask_path)

myafq = ParticipantAFQ(
    dwi_path,
    bval_path,
    bvec_path,
    out_dir,
    brain_mask_definition=brain_mask_definition,
    tracking_params={
        "n_seeds": 4,
        "odf_model": "CSD"
    },
    cleaning_params={
        "length_threshold": 3,
        "distance_threshold": 4,
        "clean_rounds": 20,
    },
)

myafq.export_all()
EOF

I get the following directories:

.
├── bundles
├── ROIs
├── tract_profile_plots
├── viz_bundles
└── viz_core_bundles

In the past (v1.0.0 and v1.0.1), I would have a directory called clean_bundles. I’m wondering what happened to this directory? Are the tracks being cleaned?

I even tried rerunning the code with cleaning_params changed to clean_bundle. Oddly the code runs with no errors in both situations, but I never getting the clean_bundles directory at the end.

Hello! Thanks for asking about this. We noticed that the “non-cleaned” bundles were rarely used, so as of the recent release pyAFQ only saves the “cleaned” versions under the bundles directory. In other words, what you are looking for is in now in the “bundles” directory. We should’ve probably documented this more clearly in the release notes for 1.2, and I apologize that we did not.

1 Like

Thank you so much for your quick reply!