Command line#
usage: mpat [-h] [--n-proc N_PROC] [--max-mem MAX_MEM] [--moments] [--tol TOL]
[--angle ANGLE] [--single-odf] [--bundles BUNDLES [BUNDLES ...]]
[--max-length MAX_LENGTH] [--out-dir OUT_DIR] [--verbose]
[--mni-thalamus] [--no-viz] [--midline-tol MIDLINE_TOL]
[--no-midline BUNDLE [BUNDLE ...]] [--no-fornix-exclude]
[--synthseg-cst] [--pyafq] [--rois-only] [--viz-only]
[--colormap NAME] [--viz-rois] [--flux] [--fixels] [--ptt]
[--step STEP] [--stop-mass STOP_MASS] [--fod-thresh FOD_THRESH]
[--fod-power FOD_POWER] [--curv-sigma CURV_SIGMA]
[--probe-radius PROBE_RADIUS] [--sift2] [--arbor]
[--arbor-branches ARBOR_BRANCHES]
[--save-transitions {odx,nifti,both}] [--afq-kwargs AFQ_KWARGS]
dwi bval bvec t1 output_dir
``mpat``: run pyAFQ (for its derivatives) and MPAT on one participant.
positional arguments:
dwi
bval
bvec
t1 T1w image, registered to the DWI (pyAFQ's t1_file)
output_dir
options:
-h, --help show this help message and exit
--n-proc N_PROC threads (required unless --rois-only / --viz-only)
--max-mem MAX_MEM memory budget, e.g. 16GB, or auto (default): min(80%,
limit - 10 GB) of the job's memory limit (cgroup /
SLURM / physical), less what is already in use
--moments spatial first moments (narrower bundles)
--tol TOL remaining walker mass at which solves stop (default
1e-6)
--angle ANGLE maximum turn per one-voxel hop (deg)
--single-odf first-order hops (pyAFQ-like), not doubleODF
--bundles BUNDLES [BUNDLES ...]
pyAFQ bundle names (default: all)
--max-length MAX_LENGTH
soft maximum streamline length, mm: states where
walkers would mostly outlast it (traps) end them, for
every bundle (0: off)
--out-dir OUT_DIR write MPAT's outputs here (default:
<output_dir>/mpat); output_dir is then only read for
pyAFQ's derivatives
--verbose log timing inside the solves (ms per power step)
--mni-thalamus keep the template's thalamic start / end ROIs
(default: SynthSeg's thalami)
--no-viz skip the collage and viewer pages (written by default)
--midline-tol MIDLINE_TOL
mm past the midline the corticospinal tracts may go
before the other hemisphere is excluded (default:
their rule, 10; 0: strict cut at x = 0); other one-
sided bundles follow their rules in mpat.bundles
(default: cut at x = 0)
--no-midline BUNDLE [BUNDLE ...]
ignore cross_midline=False for these bundles (no
other-hemisphere exclusion)
--no-fornix-exclude the anterior thalamic radiations as pyAFQ defines
them, without the default exclusion of the fornix /
septum on the midline (MNI box x -3..3, y -28..15, z
-5..22 mm)
--synthseg-cst corticospinal tracts from SynthSeg endpoints only:
precentral, paracentral and postcentral cortex to the
brainstem, no waypoints, the same midline rule
(mpat.bundles.synthseg_cst_bd); runs SynthSeg's
cortical parcellation and hypothalamus models once per
subject if not done yet (<stem>_model-
synthseg2parc_dseg.nii.gz); with --pyafq, pyAFQ gets
the same ends
--pyafq also run pyAFQ's own pipeline (tractography,
segmentation, profiles; export_all) on the same
ParticipantAFQ, for comparison: same inputs, kwargs
and derivatives
--rois-only solve nothing: write a finished run's ROI masks (start
/ end / include / exclude) and a viewer page showing
them, <stem>_desc-mpat_rois.html
--viz-only solve nothing: rewrite a finished run's collage and
viewer pages from its outputs (e.g. after updating
mpat); give the same arguments as the run. The collage
and the all-bundles page always show every bundle;
--bundles limits which per-bundle pages are redone
--colormap NAME NiiVue colour map of the density on every viewer page
(default actc), e.g. jet, hot, cubehelix; 'bundle':
one hue per bundle
--viz-rois viewer pages also show each bundle's include (green) /
exclude (red) ROIs
--flux also write edge-flux maps per bundle (mpat.fields)
--fixels also write an MRtrix fixel directory with each
bundle's expected streamlines per fixel and its share
of all traffic (mpat.fixels; one extra whole-brain
solve)
--ptt use Parallel Transport Tractography (PTT) defaults
(fod_thresh=0.08, fod_power=1.5, curv_sigma=18.0,
probe_radius=0.5, stop_mass=1e-4)
--step STEP hop length in voxels (default 1.0)
--stop-mass STOP_MASS
MITTENS stopping regularizer tau
--fod-thresh FOD_THRESH
relative fODF floor
--fod-power FOD_POWER
fODF sharpening exponent p
--curv-sigma CURV_SIGMA
PTT curvature & co-circularity sigma (deg)
--probe-radius PROBE_RADIUS
PTT cylindrical probe radius (voxels)
--sift2 calibrate seed launch weights globally with path-
consistent SIFT2 before segmentation
--arbor also extract and write 3-D multi-branch cross-section
ridge arbors (.trx, .json, .tsv)
--arbor-branches ARBOR_BRANCHES
maximum cortical endpoint branches per side for arbor
extraction (default 5)
--save-transitions {odx,nifti,both}
persist transition probabilities as ODX (.odx), 4-D
NIfTI (.nii.gz + codi/coasy), or both
--afq-kwargs AFQ_KWARGS
extra ParticipantAFQ arguments: JSON, or a Python
expression giving a dict, with afd (AFQ.data.fetch),
abd (AFQ.api.bundle_dict), mb (mpat.bundles) and the
AFQ.definitions image / mapping classes in scope, e.g.
'dict(bundle_info=abd.baby_bd(),
brain_mask_definition=BabyBrainMask())'
See Usage for examples, and Options for how to choose the settings.