-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathautoscript
More file actions
executable file
·29 lines (23 loc) · 818 Bytes
/
autoscript
File metadata and controls
executable file
·29 lines (23 loc) · 818 Bytes
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
j=$(pwd)
for filename in $j/$1/*; do
basename "${filename}"
# If a SNP set is not provided, then use all SNPs
# Otherwise filter out the SNP set
if [ -z "$3" ]
then
./plink --23file $filename --recode --out me >run.log 2>error.log
./plink --bfile $2 --make-bed --out reference_panel/temp_panel >>run.log 2>>error.log
else
./plink --23file $filename --extract $3 --recode --out me >run.log 2>error.log
./plink --bfile $2 --extract $3 --make-bed --out reference_panel/temp_panel >>run.log 2>>error.log
fi
./ancestry temp_panel
open ancestry.png
echo
echo "Press enter to start next run: "
read input
# Remove old analysis files
rm -f me*
done
# House keeping
rm -f reference_panel/temp_panel*