-
Notifications
You must be signed in to change notification settings - Fork 2
/
cmds-to-minify.sh
59 lines (46 loc) · 2.46 KB
/
cmds-to-minify.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#!/usr/bin/env bash
set -e
if [ ! -d /mnt/BIDS ]; then
echo "error: directory not found: /mnt/BIDS"
echo ""
echo "Be sure to mount the data directory to /mnt"
exit 1
fi
#######################################################
# Run tests to capture external software dependencies #
#######################################################
5ttgen fsl /mnt/BIDS/sub-01/anat/sub-01_T1w.nii.gz /tmp/5ttgen_fsl_default.mif -force
5ttgen fsl /mnt/BIDS/sub-01/anat/sub-01_T1w.nii.gz /tmp/5ttgen_fsl_nocrop.mif -nocrop -force
rm -f /tmp/5ttgen_fsl_default.mif /tmp/5ttgen_fsl_nocrop.mif
5ttgen hsvs /mnt/freesurfer/sub-01 /tmp/5ttgen_hsvs.mif -force
rm -f /tmp/5ttgen_hsvs.mif
dwibiascorrect ants /mnt/BIDS/sub-01/dwi/sub-01_dwi.nii.gz \
-fslgrad /mnt/BIDS/sub-01/dwi/sub-01_dwi.bvec /mnt/BIDS/sub-01/dwi/sub-01_dwi.bval /tmp/dwibiascorrect_ants.mif -force
rm -f /tmp/dwibiascorrect_ants.mif
dwibiascorrect fsl /mnt/BIDS/sub-01/dwi/sub-01_dwi.nii.gz \
-fslgrad /mnt/BIDS/sub-01/dwi/sub-01_dwi.bvec /mnt/BIDS/sub-01/dwi/sub-01_dwi.bval /tmp/dwibiascorrect_fsl.mif -force
rm -f /tmp/dwibiascorrect_fsl.mif
mrconvert /mnt/BIDS/sub-04/fmap/sub-04_dir-1_epi.nii.gz \
-json_import /mnt/BIDS/sub-04/fmap/sub-04_dir-1_epi.json /tmp/dir-1_epi.mif -force
mrconvert /mnt/BIDS/sub-04/fmap/sub-04_dir-2_epi.nii.gz \
-json_import /mnt/BIDS/sub-04/fmap/sub-04_dir-2_epi.json /tmp/dir-2_epi.mif -force
mrcat /tmp/dir-1_epi.mif /tmp/dir-2_epi.mif /tmp/seepi.mif -axis 3 -force
rm -f /tmp/dir-1_epi.mif /tmp/dir-2_epi.mif
dwifslpreproc /mnt/BIDS/sub-04/dwi/sub-04_dwi.nii.gz \
-fslgrad /mnt/BIDS/sub-04/dwi/sub-04_dwi.bvec /mnt/BIDS/sub-04/dwi/sub-04_dwi.bval /tmp/dwifslpreproc.mif \
-pe_dir ap -readout_time 0.1 -rpe_pair -se_epi /tmp/seepi.mif \
-eddyqc_all /tmp/eddyqc -eddy_options " --cnr_maps" -force
rm -rf /tmp/seepi.mif /tmp/dwifslpreproc.mif /tmp/eddyqc
labelsgmfix /mnt/BIDS/sub-01/anat/aparc+aseg.mgz /mnt/BIDS/sub-01/anat/sub-01_T1w.nii.gz \
/mnt/labelsgmfix/FreeSurferColorLUT.txt /tmp/labelsgmfix.mif -sgm_amyg_hipp -force
rm -f /tmp/labelsgmfix.mif
###########################################################################
# Capture ANTs license file (required by license for binary distribution) #
###########################################################################
cat /opt/ants/ANTSCopyright.txt
############################
# Capture FSL sidecar data #
############################
cat ${FSLDIR}/source.txt
cat ${FSLDIR}/LICENCE
cat ${FSLDIR}/etc/fslversion