help > Preprocessing Script 1000 FCP
Jul 17, 2016  04:07 PM | Seyed Mehdi Mazhari Mousavi
Preprocessing Script 1000 FCP
Hi guys
  • [b]I have problem while running this code :
[/b]

#!/bin/sh
# Subject directories (Change Me)
STUDY_DIR="/home/fsl/COBRE";
#############
# CONSTANTS #
#############
subjects="0040000";

umask 0002;
######################
# PROCESSING COMMANDS #
######################
# Change to STUDY_DIR
cd $STUDY_DIR;
mkdir COBRE_MELODIC
# Loop through subjects
set -x
for i in $subjects; do
if [ ! -f "$STUDY_DIR/COBRE_MELODIC/${i}_melodic_mix_new" ]; then
cd $STUDY_DIR/${i}/session_1/rest_1
rm -r *.ica*
rm rest_mcf*
rm prefiltered*
rm filtered*
mcflirt -in rest.nii.gz -out prefiltered_func_data_mcf -mats -rmsrel -rmsabs
fslmaths prefiltered_func_data_mcf -Tmean mean_func
bet2 mean_func mask -f 0.3 -n -m; immv mask_mask mask
fslmaths prefiltered_func_data_mcf -mas mask prefiltered_func_data_bet
fslstats prefiltered_func_data_bet -p 2 -p 98
fslmaths prefiltered_func_data_bet -thr 100.8095459 -Tmin -bin mask -odt char
fslstats prefiltered_func_data_mcf -k mask -p 50
fslmaths mask -dilF mask
fslmaths prefiltered_func_data_mcf -mas mask prefiltered_func_data_thresh
fslmaths prefiltered_func_data_thresh -Tmean mean_func
susan prefiltered_func_data_thresh 614.340225 2.12314225053 3 1 1
mean_func 614.340225 prefiltered_func_data_smooth
fslmaths prefiltered_func_data_smooth -mas mask prefiltered_func_data_smooth
fslmaths prefiltered_func_data_smooth -mul 12.2082189881 prefiltered_func_
data_intnorm
fslmaths prefiltered_func_data_intnorm -bptf 25.0 -1 prefiltered_func_
data_tempfilt
fslmaths prefiltered_func_data_tempfilt filtered_func_data
fslmaths filtered_func_data -Tmean mean_func
melodic -i filtered_func_data --nobet --bgthreshold=3 --tr=2.0000000000 -d 0
--mmthresh=0.5
cp filtered_func_data.ica/melodic_mix
$STUDY_DIR/COBRE_MELODIC/${i}_melodic_mix_new
fi
done
set +x
#END "Loop through subjects..."
echo "Processing complete.";
  • [b]And the result is :
[/b]

[fsl@fslvm6 ~]$ sh p
+ for i in '$subjects'
+ '[' '!' -f /home/fsl/COBRE/COBRE_MELODIC/0040000_melodic_mix_new ']'
+ cd /home/fsl/COBRE/0040000/session_1/rest_1
+ rm -r '*.ica*'
rm: cannot remove '*.ica*': No such file or directory
+ rm 'rest_mcf*'
rm: cannot remove 'rest_mcf*': No such file or directory
+ rm 'prefiltered*'
rm: cannot remove 'prefiltered*': No such file or directory
+ rm 'filtered*'
rm: cannot remove 'filtered*': No such file or directory
+ mcflirt -in rest.nii.gz -out prefiltered_func_data_mcf -mats -rmsrel -rmsabs
+ fslmaths prefiltered_func_data_mcf -Tmean mean_func
+ bet2 mean_func mask -f 0.3 -n -m
+ immv mask_mask mask
+ fslmaths prefiltered_func_data_mcf -mas mask prefiltered_func_data_bet
+ fslstats prefiltered_func_data_bet -p 2 -p 98
0.000000 1008.000000
+ fslmaths prefiltered_func_data_bet -thr 100.8095459 -Tmin -bin mask -odt char
+ fslstats prefiltered_func_data_mcf -k mask -p 50
819.000000
+ fslmaths mask -dilF mask
+ fslmaths prefiltered_func_data_mcf -mas mask prefiltered_func_data_thresh
+ fslmaths prefiltered_func_data_thresh -Tmean mean_func
+ susan prefiltered_func_data_thresh 614.340225 2.12314225053 3 1 1

Usage: susan [ [ ]]
is brightness threshold and should be greater than noise level and less than contrast of edges to be preserved.
is spatial size (sigma, i.e., half-width) of smoothing, in mm.
is dimensionality (2 or 3), depending on whether smoothing is to be within-plane (2) or fully 3D (3).
determines whether to use a local median filter in the cases where single-point noise is detected (0 or 1).
determines whether the smoothing area (USAN) is to be found from secondary images (0, 1 or 2).
A negative value for any brightness threshold will auto-set the threshold at 10% of the robust range
+ mean_func 614.340225 prefiltered_func_data_smooth
p: line 36: mean_func: command not found
+ fslmaths prefiltered_func_data_smooth -mas mask prefiltered_func_data_smooth
Cannot open volume prefiltered_func_data_smooth for reading!
+ fslmaths prefiltered_func_data_smooth -mul 12.2082189881 prefiltered_func_
Cannot open volume prefiltered_func_data_smooth for reading!
+ data_intnorm
p: line 39: data_intnorm: command not found
+ fslmaths prefiltered_func_data_intnorm -bptf 25.0 -1 prefiltered_func_
Cannot open volume prefiltered_func_data_intnorm for reading!
+ data_tempfilt
p: line 41: data_tempfilt: command not found
+ fslmaths prefiltered_func_data_tempfilt filtered_func_data
Cannot open volume prefiltered_func_data_tempfilt for reading!
+ fslmaths filtered_func_data -Tmean mean_func
Cannot open volume filtered_func_data for reading!
+ melodic -i filtered_func_data --nobet --bgthreshold=3 --tr=2.0000000000 -d 0 [STUNNED here!]
  • Why this happening to me ? :\\\\\ Please Help me :((((( Thank You !

Threaded View

TitleAuthorDate
Preprocessing Script 1000 FCP
Seyed Mehdi Mazhari Mousavi Jul 17, 2016
Seyed Mehdi Mazhari Mousavi Jul 17, 2016