-
Notifications
You must be signed in to change notification settings - Fork 8
Manual
Yntiglei edited this page Jan 16, 2024
·
15 revisions
This section describes the main steps we go through from raw dicoms to final tractography results using launchcontainers
. You can follow this manual for your analysis.
- structural MRI: MP2RAGE
- diffusion MRI: NORDIC
-
The Brain Imaging Data Structure (BIDS) is a standard for organizing and describing neuroimaging and behavioral data. Below is a typical structure of a BIDS-valid project folder:
basedir/ ├──BIDS/ ├── dataset_description.json ├── participants.tsv ├── README └── sub-01/ └── anat/ ├── sub-01_T1w.nii.gz ├── sub-01_T1w.json ├── sub-01_T2w.nii.gz └── sub-01_T2w.json ├── func/ ├── dwi/ ├── fmap/ └── beh/ ├── sub-02/ ├── ... └── derivatives/ └── container_name/ └── analysis-xxx ├── sub-01/ ├── sub-02/ ├── ... ├──dicom/ ├──derivatives/ ├──code/ ├── ...
- (optional) Use HeuDiConv to convert dicom files to nifti files.
- Under nifti folder, preprocess raw nifti to final nifti.
> cp path_to_launchcontainers/example_configs/example_lc_config.yaml PROJECT_NAME/code/lc_config.yaml
> cp path_to_launchcontainers/example_configs/example_subSesList.txt PROJECT_NAME/code/subSesList.txt
> # take anatrois as an example
> cp path_to_launchcontainers/example_configs/example_anatrois_config.json PROJECT_NAME/code/anatrois_config.json
-
launchcontainers
takes path as input and reads the config files by itself. Thus, having a short and easy-to-input path will facilitate your analysis - Usually, we copy config files from
launchcontainers/example_configs/
tobasedir/code
- IMPORTANT: This file will be dynamic, every time we use it, it will be copied to the corresponding container/analysis folder, so that we have a copy of what was run in this specific analysis. You can edit this file as much as you need and delete it at the end.
- lc_config.yaml: Refer to How to edit configs or the instructions in the yaml file.
- subSesList.txt: Refer to How to edit configs
- container_specific_configs:
5. Run launchcontainers
in prepare
mode. (Descriptions in workflow)
- (optional) Check the documentation and help for launchcontainer, it will give you some explanation on the flags:
launchcontainers -h
or
launchcontainers --help
- Run
prepare
mode to create symlinks and auto-check if all the required files are in place.
launchcontainers --lcc $path_to_config.yml -ssl $path_to_subseslist.txt -cc $path_to_config_file(s)
-
ATTENTION If your container has more than one container_config, put them here one after the other separated with one white space
- Use 'tree' command with color coding to check that there are no broken links
7. Run launchcontainers
in run
mode (Descriptions in workflow)
launchcontainers --lcc $path_to_config.yml -ssl $path_to_subseslist.txt -cc $path_to_config_file(s) --run_lc
- there are 3 levels of verbosity you can control when running
Launchcontainers
in the command line. The levels are controlled by command line input, and one parameters in the config.yml file:- CRITICAL level:
print_command_only == True
in the config.yml - CRITICAL and INFO level: in the command line input add
-v
--verbose
flag or setprint_command_only == False
in the config.yml - DEBUG level: in the command line input add
--DEBUG
flag
- CRITICAL level: