Commit 9dc3d886 authored by Alexandre Routier's avatar Alexandre Routier

Harmonize CLI for pet-surface and statistics-surface pipelines. It follows the...

Harmonize CLI for pet-surface and statistics-surface pipelines. It follows the categorization convention for cmdline arguments
parent e36bc725
Pipeline #928 passed with stages
in 23 seconds
......@@ -28,18 +28,30 @@ class PetSurfaceCLI(ce.CmdParser):
def define_options(self):
"""Define the sub-command arguments
"""
self._args.add_argument("bids_directory",
help='Path to the BIDS directory.')
self._args.add_argument("caps_directory",
help='Path to the CAPS directory. (Filled with results from t1-freesurfer-cross-sectional')
self._args.add_argument("-tsv", "--subjects_sessions_tsv",
help='TSV file containing a list of subjects with their sessions.')
self._args.add_argument("-pt", "--pet_tracer", type=str, default='fdg',
help='PET tracer type. Can be fdg or av45. Default value : fdg')
self._args.add_argument("-wd", "--working_directory",
help='Temporary directory to store pipeline intermediate results')
self._args.add_argument("-np", "--n_procs", type=int,
help='Number of cores used to run in parallel')
from clinica.engine.cmdparser import PIPELINE_CATEGORIES
# Clinica compulsory arguments (e.g. BIDS, CAPS, group_id)
clinica_comp = self._args.add_argument_group(PIPELINE_CATEGORIES['CLINICA_COMPULSORY'])
clinica_comp.add_argument("bids_directory",
help='Path to the BIDS directory.')
clinica_comp.add_argument("caps_directory",
help='Path to the CAPS directory. (Filled with results from t1-freesurfer-cross-sectional')
# Optional arguments (e.g. FWHM)
optional = self._args.add_argument_group(PIPELINE_CATEGORIES['OPTIONAL'])
optional.add_argument("-pt", "--pet_tracer", type=str, default='fdg',
help='PET tracer type. Can be fdg or av45 (default: --pet_tracer fdg)')
# Clinica standard arguments (e.g. --n_procs)
clinica_opt = self._args.add_argument_group(PIPELINE_CATEGORIES['CLINICA_OPTIONAL'])
clinica_opt.add_argument("-tsv", "--subjects_sessions_tsv",
help='TSV file containing a list of subjects with their sessions.')
clinica_opt.add_argument("-wd", "--working_directory",
help='Temporary directory to store pipelines intermediate results')
clinica_opt.add_argument("-np", "--n_procs",
metavar=('N'), type=int,
help='Number of cores to use when running the pipeline in parallel (default: --n_procs 1).')
# clinica_opt.add_argument("-sl", "--slurm",
# action='store_true',
# help='Run the pipelines using SLURM')
def run_command(self, args):
......
......@@ -44,14 +44,11 @@ class T1VolumeNewTemplateCLI(ce.CmdParser):
# Clinica standard arguments (e.g. --n_procs)
clinica_opt = self._args.add_argument_group(PIPELINE_CATEGORIES['CLINICA_OPTIONAL'])
clinica_opt.add_argument("-tsv", "--subjects_sessions_tsv",
metavar=('participants.tsv'),
help='TSV file containing a list of subjects with their sessions.')
clinica_opt.add_argument("-wd", "--working_directory",
metavar=('Working_Directory'),
help='Temporary directory to store pipelines intermediate results')
clinica_opt.add_argument("-np", "--n_procs",
metavar=('N'),
type=int,
metavar=('N'), type=int,
help='Number of cores used to run in parallel')
clinica_opt.add_argument("-sl", "--slurm",
action='store_true',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment