-
Notifications
You must be signed in to change notification settings - Fork 67
/
Copy pathexample_script_runadmixture.sh
36 lines (26 loc) · 1.15 KB
/
example_script_runadmixture.sh
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
31
32
33
34
35
36
####
#### Admixture
## For Juniperus
mkdir -p ../genetic/JmINGP/out.noreplicates/popstructure
cd ../genetic/JmINGP/out.noreplicates/popstructure
# recode plink to needed formats
cp ../batch_1.plink.* ./
plink --file batch_1.plink --maf 0.05 --geno .2 --make-bed --out batch_1.plink --noweb --allow-no-sex
# run admixture using multithreaded mode, fixed random seed and corss-validation procedure to choose the correct value
for K in 1 2 3 4 5 6 7 8 9 10 11 12 13;
do ../../../../bin/admixture --cv batch_1.plink.bed $K -j4 -s 21 | tee log${K}.out; done
# Check CV
grep -h CV log*.out
# back to bin
cd ../../../../bin
## For Berberis
mkdir -p ../genetic/BerSS/out.noreplicates/popstructure
cd ../genetic/BerSS/out.noreplicates/popstructure
# recode plink to needed formats
cp ../batch_1.plink.* ./
plink --file batch_1.plink --maf 0.05 --geno .2 --make-bed --out batch_1.plink --noweb --allow-no-sex
# run admixture using multithreaded mode, fixed random seed and corss-validation procedure to choose the correct value
for K in 1 2 3 4 5 6 7;
do ../../../../bin/admixture --cv batch_1.plink.bed $K -j4 -s 21 | tee log${K}.out; done
# Check CV
grep -h CV log*.out