12 December 2018 2 8K Report

Dear FSL users, Now I have written a batch processing for FEAT in FSL.However, I still can not successfully replace the markers (directory of OUTPUT file, anatomical, and functional data) in the template.fsf  and I can not figure out what's the problem. Any suggestions will be highly appreciated. Thank you very much.

Here is my batch (the template.fsf is from one subject's feat result, I copy it and renamed it 'template.fsf').

#!/bin/bash

FSLDIR=/usr/local/fsl . ${FSLDIR}/etc/fslconf/fsl.sh PATH=${FSLDIR}/bin:${PATH} export FSLDIR PATH

dir=$( pwd )

SUBJ="G1_AG_1446"

for run in $SUBJ do

echo "precossing" ##current subject directory SUBJ=$dir/$run

OUTPUT=${SUBJ}/1st_oput DATA=${SUBJ}/funct/epi.nii.gz ANAT=${SUBJ}/anat/anat_brain.nii.gz echo $OUTPUT ##makes the fsf files from the template fsf file

for i in 'template.fsf'; do  sed -e 's@OUTPUT@'$OUTPUT'@g' \   -e 's@ANAT@'$ANAT'@g' \   -e 's@DATA@'$DATA'@g' ${SUBJ}/feat_01.fsf done

echo "finish" #runs the analysis using the newly created fsf file feat $dir/$run/feat_01.fsf

done

Best Regards,

Shun

Similar questions and discussions