'''Index''' <> = Name = dmri_bids_config: Auto-configure [[Tracula|TRACULA]] to run on a [[https://bids-specification.readthedocs.io/en/stable/04-modality-specific-files/01-magnetic-resonance-imaging-data.html|BIDS]]-formatted dataset ||<#CCEEFF>'''NOTE:''' This is a new script that is currently only available in the development version of the !FreeSurfer. You can [[https://raw.githubusercontent.com/freesurfer/freesurfer/dev/scripts/dmri_bids_config|download it from the development version]] and save it into your '''$FREESURFER_HOME/bin/''' regardless of which version of !FreeSurfer you are using. || = Usage = {{{ dmri_bids_config --in --c }}} This script will take as its input a BIDS-formatted study directory. It will parse the contents of this directory and it will output: 1. A [[dmrirc|TRACULA configuration]] file: This file is needed to pre-process the DWI data, reconstruct tracts of interest, etc. with [[trac-all]]. 1. A [[FsgdFormat|FreeSurfer Group Descriptor (FSGD)]] file: This file is needed to perform statistics on the output tract measures with [[mri_glmfit]]. It will be generated if the input BIDS directory contains a '''participants.tsv''' file. = Arguments = == Required arguments == ||--in ||Path to the input data (the top-level BIDS directory for the study, not a single subject or session directory) || At least one of the following two is required: ||--c  ||Output [[dmrirc|configuration file]] that specifies DWI inputs and analysis options for TRACULA || ||--f  ||Output [[FsgdFormat|FSGD file]] that specifies subject-specific continuous and discrete variables for linear regression analyses (Default: append '''.fsgd''' to the argument of --c) || == Optional arguments == ||--fsdir  ||!FreeSurfer '''SUBJECTS_DIR''' for this study (This must be specified, either here or with: '''setenv SUBJECTS_DIR ...)''' || ||--trdir  ||Output TRACULA directory for this study (If not specified, TRACULA will use the !FreeSurfer '''SUBJECTS_DIR)''' || ||--acq  ||Only use DWI scans collected with this acquisition (The name of the NIfTI volumes in BIDS must include the string '''acq-''' followed by this name) || = After you run dmri_bids_config = It is important that you inspect the configuration file generated by this script to make sure that everything has been set up the way you intended. It is not always possible to guess the intentions of the investigator from the contents of BIDS directory structure. The TRACULA configuration file is a simple text file that you can edit as you wish before initiating data analysis. The [[dmrirc|example configuration files]] and the [[FsTutorial/Tracula|tutorial]] explain in detail all the variables in the configuration file. A few examples of situations where you may have to edit the configuration file: * If the subject names under your !FreeSurfer '''SUBJECTS_DIR''' directory do not match the subject/session names that they have in the BIDS structure, then you have to edit the configuration file to make sure that the '''subjlist''' variable contains the subject names in your '''SUBJECTS_DIR''' (i.e., the names that you used when you ran [[recon-all]] on the structural images). * If this is a longitudinal study, then the '''subjlist''' and '''baselist''' variables in the configuration file must match, respectively, the time point and base names in your '''SUBJECTS_DIR''' (i.e., the names that you used when you ran the longitudinal stream of [[recon-all]] on the structural images). * If at least one of your subjects has DWIs from multiple sessions (this means multiple visits, not multiple DWI scans in the same visit), then we will assume that this is a longitudinal study and the configuration file will be set up to run the longitudinal stream of TRACULA. If this is not the case and, for example, you only want to use one session from each subject, then you have to edit the configuration file to remove all entries related to the unwanted sessions, and to remove the '''baselist''' variable entirely. * If you collected multiple DWI scans in the same scan session but these should not be analyzed together (e.g., you ran different sequences that you want to compare or to use for different analyses), you should check the configuration file to make sure that it contains only the DWI scans that you intend to use. (This can be also controlled with the '''--acq''' command-line argument, assuming that an acquisition string is included in the names of the NIfTI volumes in the BIDS structure.) * If there are multiple possibilities for how B0 inhomogeneity correction can be performed (e.g., the DWIs were collected with multiple phase-encode directions, but separate field mapping scans were also collected), you should inspect the configuration file to make sure that corrections will be performed with the method of your choice. * You may want to change settings of the downstream analysis with TRACULA (e.g., reconstruct only a few tracts of interest and not all 42). * These are just a few examples. Please inspect the configuration file after it is generated and before it is used for analysis, even if none of the above applies to you. = See also = [[dmrirc]], [[trac-all]] = Links = [[Tracula|TRACULA]] = References = If you use TRACULA, please cite: . [[http://www.frontiersin.org/Neuroinformatics/10.3389/fninf.2011.00023/abstract|Automated probabilistic reconstruction of white-matter pathways in health and disease using an atlas of the underlying anatomy.]] Yendiki A, Panneck P, Srinivasan P, Stevens A, Zöllei L, Augustinack J, Wang R, Salat D, Ehrlich S, Behrens T, Jbabdi S, Gollub R and Fischl B (2011). ''Front. Neuroinform.'' 5:23. doi: 10.3389/fninf.2011.00023 . [[https://www.sciencedirect.com/science/article/pii/S1053811921009782|Using diffusion MRI data acquired with ultra-high gradients to improve tractography in routine-quality data.]] Maffei C, Lee C, Planich M, Ramprasad M, Ravi N, Trainor D, Urban Z, Kim M, Jones R, Henin A, Hofmann S, Pizzagalli D, Auerbach R, Gabrieli J, Whitfield-Gabrieli S, Greve D, Haber N, Yendiki A (2021). ''!NeuroImage'' 245:118706. If you use our measures of head motion, please cite: . [[http://www.sciencedirect.com/science/article/pii/S1053811913011312|Spurious group differences due to head motion in a diffusion MRI study.]] Yendiki A, Koldewyn K, Kakunoori S, Kanwisher N, Fischl B (2014). ''!NeuroImage'' 88:79–90. If you use the longitudinal stream of TRACULA, please cite: . [[http://www.sciencedirect.com/science/article/pii/S1053811915011167|Joint reconstruction of white-matter pathways from longitudinal diffusion MRI data with anatomical priors.]] Yendiki A, Reuter, M, Wilkens P, Rosas H D, Fischl B (2016). ''!NeuroImage'' 127:277–286. = Reporting Bugs = Report bugs to < analysis-bugs@nmr.mgh.harvard.edu > = Author/s = Anastasia Yendiki