Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
open-science
analysis
C-MORE brain MRI
Commits
8eea30ed
Commit
8eea30ed
authored
Apr 08, 2021
by
Ludovica Griffanti
Browse files
Delete bb_tbss_md_NAWM.sh
parent
fee603e2
Changes
1
Hide whitespace changes
Inline
Side-by-side
bb_tbss_md_NAWM.sh
deleted
100644 → 0
View file @
fee603e2
#!/bin/bash
.
"
$BB_BIN_DIR
"
/bb_pipeline_tools/bb_set_header
direc
=
"
$PWD
"
/
"
$1
"
TBSSDir
=
"
$direc
"
/dMRI/TBSS
biancaDIR
=
"
$direc
"
/T2_FLAIR/lesions/
################# Apply FNRIT warp to WMH to have WMH_to_MNI.nii.gz
cd
"
$biancaDIR
"
$FSLDIR
/bin/applywarp
-i
final_mask.nii.gz
-o
final_mask_to_MNI.nii.gz
-r
${
FSLDIR
}
/data/standard/MNI152_T1_1mm.nii.gz
-w
../../T1/transforms/T1_to_MNI_warp.nii.gz
################# Calculating IDPs masking out WMH
cd
"
$TBSSDir
"
cd
stats
fslmaths
${
biancaDIR
}
/final_mask_to_MNI.nii.gz
-thr
0.2
-binv
-mul
all_MD all_MD_NAWM
fslmaths all_MD_NAWM
-mas
mean_FA_skeleton_mask all_MD_NAWM_skeletonised
fslstats
-K
${
FSLDIR
}
/data/atlases/JHU/JHU-ICBM-labels-1mm all_MD_NAWM_skeletonised.nii.gz
-M
>
JHUrois_MD_NAWM.txt
cd
../..
################# Saving IDPs in the main IDPs directory
#Setting the string of NaN in case there is a problem.
numVars
=
"48"
nanResult
=
""
;
for
i
in
$(
seq
1
$numVars
)
;
do
nanResult
=
"NaN
$nanResult
"
;
done
result
=
""
#for i in FA MD ; do
for
i
in
MD_NAWM
;
do
if
[
-f
${
TBSSDir
}
/stats/JHUrois_
${
i
}
.txt
]
;
then
if
[
`
cat
${
TBSSDir
}
/stats/JHUrois_
${
i
}
.txt |
wc
-w
`
=
$numVars
]
;
then
miniResult
=
`
cat
${
TBSSDir
}
/stats/JHUrois_
${
i
}
.txt
`
else
miniResult
=
"
$nanResult
"
fi
else
miniResult
=
"
$nanResult
"
fi
result
=
"
$result
$miniResult
"
done
echo
$result
>
${
direc
}
/IDP_files/bb_IDP_diff_TBSS_NAWM.txt
done
.
"
$BB_BIN_DIR
"
/bb_pipeline_tools/bb_set_footer
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment