4
|
1 #!/bin/bash
|
|
2 bed=$1
|
|
3 fam=$2
|
|
4 bim=$3
|
|
5 outputs=$4
|
|
6 logs=$5
|
|
7 best_k_output=$6
|
|
8 best_k_logfile=$7
|
|
9 kmin=$8
|
|
10 kmax=$9
|
5
|
11 groups=${10}
|
|
12 threshold_group=${11}
|
4
|
13
|
|
14 directory=`dirname $0`
|
|
15 mkdir tmpdir$$
|
|
16 cp -rf $bed tmpdir$$/input.bed
|
|
17 cp -rf $fam tmpdir$$/input.fam
|
|
18 cp -rf $bim tmpdir$$/input.bim
|
|
19
|
|
20
|
5
|
21 perl $directory/Admixture.pl -i tmpdir$$/input -o $outputs -k $kmin -m $kmax -d tmpdir$$ -t $threshold_group
|
4
|
22
|
|
23 mv tmpdir$$/output $best_k_output
|
|
24 mv tmpdir$$/log $best_k_logfile
|
|
25 mv tmpdir$$/outputs.Q $outputs
|
|
26 mv tmpdir$$/logs $logs
|
5
|
27 mv tmpdir$$/groups $groups
|
4
|
28
|
|
29
|