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
|
|
11
|
|
12 directory=`dirname $0`
|
|
13 mkdir tmpdir$$
|
|
14 cp -rf $bed tmpdir$$/input.bed
|
|
15 cp -rf $fam tmpdir$$/input.fam
|
|
16 cp -rf $bim tmpdir$$/input.bim
|
|
17
|
|
18
|
|
19 perl $directory/Admixture.pl -i tmpdir$$/input -o $outputs -k $kmin -m $kmax -d tmpdir$$
|
|
20
|
|
21 mv tmpdir$$/output $best_k_output
|
|
22 mv tmpdir$$/log $best_k_logfile
|
|
23 mv tmpdir$$/outputs.Q $outputs
|
|
24 mv tmpdir$$/logs $logs
|
|
25
|
|
26
|