-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path1.6.3_easySFS_folded.sh
More file actions
39 lines (31 loc) · 1.31 KB
/
1.6.3_easySFS_folded.sh
File metadata and controls
39 lines (31 loc) · 1.31 KB
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
37
38
39
#!/bin/bash -l
#SBATCH -J foldedSFS
# sbatch 1.6.3_easySFS_folded.sh 05.1_recal/overlap/neuall_incIRQ/134inds_overlapped_filtered_norepeats_hwe_neuall_incIRQ cor1_cor2to3_cnx1to3_cnx6_50ind_folded_all_nochr18 30,30,30,10 4PopModel1
conda activate easySFS
ref="Path/04_fresh2/genome_HC_allpaths41687_v2.5_chrW.fasta"
dat="Path/04_fresh2"
echo $(date)
STARTTIME=$(date +%s)
popmodel=${4}
popgrp=${popmodel:0:4}
echo ${popgrp}
poptype=${popmodel:0:1}
echo $poptype
cd ${dat}/fastsimcoal2/${popgrp}
#if folded SFS
python3 ${dat}/fastsimcoal2/easySFS/easySFS.py -i ${dat}/${1}.vcf.gz -p ${2}.pop -a -f --proj ${3} -o $2 --prefix ${4}
cd ./${2}/fastsimcoal2
for i in {2..8}
do
cp 4PopModel1_jointMAFpop1_0.obs 4PopModel${i}_jointMAFpop1_0.obs
cp 4PopModel1_jointMAFpop2_0.obs 4PopModel${i}_jointMAFpop2_0.obs
cp 4PopModel1_jointMAFpop3_0.obs 4PopModel${i}_jointMAFpop3_0.obs
cp 4PopModel1_jointMAFpop2_1.obs 4PopModel${i}_jointMAFpop2_1.obs
cp 4PopModel1_jointMAFpop3_1.obs 4PopModel${i}_jointMAFpop3_1.obs
cp 4PopModel1_jointMAFpop3_2.obs 4PopModel${i}_jointMAFpop3_2.obs
done
ENDTIME=$(date +%s)
echo $(date)
echo "It takes $(($ENDTIME - $STARTTIME)) seconds to complete this task"
echo "It takes $((($ENDTIME - $STARTTIME)/60)) mins to complete this task"
echo "It takes $((($ENDTIME - $STARTTIME)/3600)) hours to complete this task"