Conversion
Download
Download the appropriate files from UT Southwestern’s AIRC website (https://swlxaircweb.swmed.edu/) to
/raid/data/shared/incoming/airc/Make the zip file name completely lowercase and should match the following:
<airc_id>_<sub>_w<1|2|3>/However, if there is no study ID such as the participant being a pilot, it can be:
<airc_id>/or<airc_id>_w<1|2|3>/
Convert
Note
Install the following package if you have not run this before:
module load python/3.8.6
pip install --user git+https://github.com/epongpipat/pyHelperKennedyRodrigue.git
Load appropriate modules and set parameters for subsequent code
module load sge module load python/3.8.6 root_dir='/raid/data' airc_id="" sub="" ses=""
Convert MRI
code_dir="${root_dir}/shared/software/scripts/eep170030/mri/convert" bash ${code_dir}/convert_uber.sh \ --airc_id ${airc_id} \ --sub ${sub} \ --ses ${ses}
The code performs the following:
unzip files and rename the output directory to lowercase
sort the DICOM files into their appropriate directories by series name
convert files from DICOM to NIfTI using dcm2niix
After the script is done, check the conversion and move bad files (e.g., incomplete acquisitions) into a
bad/directory
QC Parameters
Create QC files
code_dir="${root_dir}/shared/software/scripts/eep170030/mri/qc_mri" bash ${code_dir}/qc_uber.sh \ --airc_id ${airc_id} \ --sub ${sub}
The code performs the following:
converts dcm2niix bids output from .json to .csv format
combines dcm2niix bids output (.csv) across participants by acquisition
converts fslhd output to .csv format
combines fslhd output (.csv) across participants by acquisition
combines all .csv output by acquisition
Create QC report
Note
The following code needs to be run locally. The server does not currently have a compatible pandoc version
code_dir="${root_dir}/shared/software/scripts/eep170030/mri/qc_mri/rmd" Rscript ${code_dir}/render-rmds.RSix (6) QC html reports will be updated/saved in
${root_dir}/shared/incoming/qc/derivatives/sub-differences/rmd-html. Please review and any potential outliers in either qualitative or quantitive values, and bring up any potential concerns to the team.
Copy Files
Copy and rename files
Note
may need to install the following if running for the first time:
Rscript -e 'devtools::install_github("epongpipat/rHelperKennedyRodrigue")'
code_dir="${root_dir}/shared/software/scripts/eep170030/mri/modality_specific_conversion" bash ${code_dir}/modality_specific_conversion/copy_files_uber.sh \ --airc_id ${airc_id} \ --sub ${sub}
The code performs the following:
copy files into an
original/directoryrename and merge/split files volumes to match prior convention