Commit 3824a1e3 authored by Ludovica Griffanti's avatar Ludovica Griffanti
Browse files

Upload bb_IDP_asl.sh

parent 6893cad9
#!/bin/sh
#
# Script name: bb_asl_summary_measures
#
# Description: Script to generate the IDPs related to ASL
#
# Authors: Thomas Okell, Flora Kennedy McConnell, Ludovica Griffanti, Fidel Alfaro-Almagro
#
# Copyright 2021 University of Oxford
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
origDir=`pwd`
#scriptName=`basename "$0"`
scriptName="bb_IDP_ASL"
direc=$1
cd $direc
#Setting the string of NaN in case there is a problem.
result1="NaN"
result2="NaN"
result3="NaN"
result4="NaN"
result5="NaN"
result6="NaN"
result7="NaN"
result8="NaN"
if [ -f ASL/CBF_gm_mean.txt ] ; then
result1=`cat ASL/CBF_gm_mean.txt`
fi
if [ -f ASL/ATT_gm_mean.txt ] ; then
result2=`cat ASL/ATT_gm_mean.txt`
fi
if [ -f ASL/CBF_wm_mean.txt ] ; then
result3=`cat ASL/CBF_wm_mean.txt`
fi
if [ -f ASL/ATT_wm_mean.txt ] ; then
result4=`cat ASL/ATT_wm_mean.txt`
fi
if [ -f ASL/CBF_pvcorr_gm_mean.txt ] ; then
result5=`cat ASL/CBF_pvcorr_gm_mean.txt`
fi
if [ -f ASL/ATT_pvcorr_gm_mean.txt ] ; then
result6=`cat ASL/ATT_pvcorr_gm_mean.txt`
fi
if [ -f ASL/CBF_pvcorr_wm_mean.txt ] ; then
result7=`cat ASL/CBF_pvcorr_wm_mean.txt`
fi
if [ -f ASL/ATT_pvcorr_wm_mean.txt ] ; then
result8=`cat ASL/ATT_pvcorr_wm_mean.txt`
fi
result="$result1 $result2 $result3 $result4 $result5 $result6 $result7 $result8"
mkdir -p IDP_files
echo $result > IDP_files/$scriptName.txt
echo $result
cd $origDir
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment