cmp.bidsappmanager.gui.bidsapp module
Connectome Mapper BIDS App Interface Window.
- class cmp.bidsappmanager.gui.bidsapp.BIDSAppInterfaceWindow(project_info=None, bids_root='', subjects=None, anat_config='', dmri_config='', fmri_config='')[source]
Bases:
traits.has_traits.HasTraits
Class that defines the Window of the BIDS App Interface.
- project_info
Instance of
CMP_Project_Info
that represents the processing project- Type
- bids_root
BIDS root dataset directory
- Type
traits.Directory
- output_dir
Output directory
- Type
traits.Directory
- subjects
List of subjects (in the form
sub-XX
) present in the dataset- Type
traits.List
- number_of_participants_processed_in_parallel
Number of participants / subjects to be processed in parallel that takes values in the [1, # of CPUs - 1] range
- Type
traits.Range
- number_threads_max
Maximal number of threads to be used by OpenMP programs (4 by default)
- Type
traits.Int
- number_of_threads
Number of threads to be used by OpenMP programs that takes values in the [1,
number_threads_max
] range- Type
traits.Range
- fs_file
Path to Freesurfer license file
- Type
traits.File
- list_of_subjects_to_be_processed
Selection of subjects to be processed from the
subjects
list- Type
List(Str)
- dmri_inputs_checked
True if dMRI data is available in the dataset
- Type
traits.Bool
- fmri_inputs_checked
rue if fMRI data is available in the dataset
- Type
traits.Bool
- anat_config
Configuration file for the anatomical MRI pipeline
- Type
traits.File
- dmri_config
Configuration file for the diffusion MRI pipeline
- Type
traits.File
- fmri_config
Configuration file for the functional MRI pipeline
- Type
traits.File
- run_anat_pipeline
If True, run the anatomical pipeline
- Type
traits.Bool
- run_dmri_pipeline
If True, run the diffusion pipeline
- Type
traits.Bool
- run_fmri_pipeline
If True, run the functional pipeline
- Type
traits.Bool
- bidsapp_tag
Selection of BIDS App version to use
- Type
traits.Enum
- data_provenance_tracking
If set and if
datalad_is_available
is True run the BIDS App using datalad (False by default)- Type
traits.Bool
- datalad_update_environment
If True and
data_provenance_tracking
is True, tell to datalad to update the BIDS App container image if there was a previous execution (True by default)- Type
traits.Bool
- datalad_is_available
Boolean used to store if datalad is available in the computing environment (False by default)
- Type
traits.Bool
- carbon_emission_msg
Carbon footprint reporting message
- Type
traits.Str
- check
Button to check if all parameters are properly set for execution of the BIDS App
- Type
traits.ui.Button
- start_bidsapp
Button to run the BIDS App
- Type
traits.ui.Button
- traits_view
TraitsUI QtView that describes the content of the window
- Type
QtView
- check_settings()[source]
Checks if all the parameters of the BIDS App run are properly set before execution.
- classmethod manage_bidsapp_procs(proclist)[source]
Manage parallelized process at the participant level
- Parameters
proclist (List of subprocess.Popen) – List of Popen processes
- number_of_parallel_procs_updated(new)[source]
Callback function when
number_of_parallel_procs
is updated.
- classmethod run(command, env=None, cwd='/home/docs/checkouts/readthedocs.org/user_builds/connectome-mapper-3/checkouts/v3.0.3/docs')[source]
Function to run datalad commands.
It runs the command specified as input via
subprocess.run()
.- Parameters
command (string) – String containing the command to be executed (required)
env (os.environ) – Specify a custom os.environ
cwd (os.path) – Specify a custom current working directory
Examples
>>> cmd = 'datalad save -m my dataset change message' >>> run(cmd)
- start_bids_app()[source]
Function executed when the Run BIDS App button is clicked.
It implements all steps in the creation and execution of the BIDS App with or without datalad.
- start_bidsapp_participant_level_process(bidsapp_tag, participant_labels)[source]
Create and run the BIDS App command.
- Parameters
bidsapp_tag (traits.Str) – Version tag of the CMP 3 BIDS App
participant_labels (traits.List) – List of participants labels in the form [“01”, “03”, “04”, …]
- start_bidsapp_participant_level_process_with_datalad(bidsapp_tag, participant_labels)[source]
Create and run the BIDS App command with Datalad.
- Parameters
bidsapp_tag (traits.Str) – Version tag of the CMP 3 BIDS App
participant_labels (traits.List) – List of participants labels in the form [“01”, “03”, “04”, …]