-
Notifications
You must be signed in to change notification settings - Fork 6
Preprocess Rat brains
Gabriel A. Devenyi edited this page May 3, 2020
·
14 revisions
Your rat data may need preprocessing, therefore here are the preprocessing steps performed by the script mentioned here:
- flip
- reorder dimensions to standard MINC ordering
- center
- N4 bias field correct everything
- Otsu mask
- re-bias field correct with otsu mask
- register to rat template
- bias field correction with template mask
First, have your rat brains in MINC.
Load the modules:
> module load cobralab
> module load minc-toolkit ANTs minc-toolkit-extras
> module load minc-toolkit minc-toolkit-extras ANTs qbatch
The ways to use the script are either by file:
rat-preprocessing-v3.sh input output
Example: rat-preprocessing-v3.sh rat1_t1.mnc rat1_t1_preproc.mnc
Example: bash rat-preprocessing-v3.sh rat1_t1.mnc rat1_t1_preproc.mnc
Example: ./rat-preprocessing-v3.sh rat1_t1.mnc rat1_t1_preproc.mnc
Its best to submit this to a cluster to do the preprocessing, at the CIC:
for file in /path/to/input/*mnc; do
echo rat-preprocessing-v3.sh $file /path/to/save/outputs/$(basename $file .mnc)_preproc.mnc
done | qbatch --ppj 4 -N rat-preproc -
On Niagara:
for file in /path/to/input/*mnc; do
echo rat-preprocessing-v3.sh $file /path/to/save/outputs/$(basename $file .mnc)_preproc.mnc
done | qbatch -N rat-preproc -