进入文件数据文件夹和激活conda
cd /
/mnt/d/peng/fst
conda activate seletion
1 提取数据, 转化成vcf格式
./plink --file 90breeds --keep B1.txt --chr-set 29 --recode --out B1
./plink --file 90breeds --keep B2.txt --chr-set 29 --recode --out B2
./plink --file B1 --make-bed --chr-set 29 --out B1
./plink --file B2 --make-bed --chr-set 29 --out B2
./plink --bfile B1 --export vcf --chr-set 30 --out B1
./plink --bfile B2 --export vcf --chr-set 30 --out B2
3#提B1B2
./plink --file 90breeds --keep B1B2.txt --chr-set 29 --recode --out B1B2
./plink --file B1B2 --make-bed --chr-set 29 --out B1B2
./plink --bfile B1B2 --export vcf --chr-set 30 --out B1B2
3#merge 文件
./plink --file B1 --merge B2.ped B2.map --chr-set 29 --recode --out B1B2
./plink --bfile B1B2 --export vcf --chr-set 29 --out B1B2
2计算fst-SNP单点计算和滑窗(个体名字要和vcf的名字对应(切记), map和ped 文件转化后,个体名字有所变化)
vcftools --vcf B1B2.vcf --weir-fst-pop B1.txt --weir-fst-pop B2.txt --out fst-B1B2
vcftools --vcf B1B2.vcf --weir-fst-pop B1.txt --weir-fst-pop B2.txt --out B1B2_bin500 --fst-window-size 500000 --fst-window-step 50000