forked from matsengrp/PREAST
-
Notifications
You must be signed in to change notification settings - Fork 0
/
runListBounds.bash
executable file
·30 lines (30 loc) · 994 Bytes
/
runListBounds.bash
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/bin/bash
. <(./setup.sh)
export R_LIBS_USER=/home/tholzman/R/Library
export mainDir=$1
export toBeCreatedDir=$2
export patient=$3
export lb=$4
export ub=$5
export outputDir=${mainDir}/founder-inference-bakeoff_${toBeCreatedDir}_${patient}
mkdir $outputDir
rm -rf ${outputDir}/*
export listFile=${mainDir}/processed_${patient}.list
export homeDir=`pwd`
while read fname
do
echo $fname
bn=`basename $fname .fasta`
export outputFile=${outputDir}/${bn}.out
export errFile=${outputDir}/${bn}.err
echo $fname > $outputFile
pushd .
cd $outputDir
echo "$homeDir/bin/infer.sh --verbose --toi ${lb},${ub} -p ${bn}. $fname >>$outputFile 2>>$errFile" >>$outputFile
$homeDir/bin/infer.sh --verbose --toi ${lb},${ub} -p ${bn}. $fname >>$outputFile 2>>$errFile
mv infer_multiple.fa ${outputFile}multiple.fa
mv infer_single.fa ${outputFile}single.fa
mv infer_toi.csv ${outputFile}toi.csv
mv infer_beast_in.xml ${outputFile}_beast_in.xml
popd
done < $listFile