-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSNPs.txt
49 lines (36 loc) · 1.53 KB
/
SNPs.txt
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
40
41
42
43
44
45
46
47
48
49
##########################
## SNP calling in ANGSD ##
##########################
# Set X to at least 80% of all individuals
angsd \
-GL 2 -SNP_pval 1e-6 \
-doDepth 1 -doCounts 1 -doGeno 2 -doPost 1 -doGlf 2 \
-doMaf 2 -doMajorMinor 1 \
-bam bamfilelist.filelist \
-minMapQ 30 -minQ 30 \
-minInd X -setMinDepthInd 3 -geno_minDepth 3 \
-out output \
-doPlink 2 -nThreads 24
########################
## Filtering in PLINK ##
########################
plink --tfile input --allow-no-sex --allow-extra-chr --indep-pairwise 200 50 0.5 --memory 50000
#Extracting SNP data
plink --tfile input --extract plink.prune.in --allow-extra-chr --make-bed --out output_prune --threads 16
#Check missing data for each individual
plink --bfile output_prune --allow-extra-chr --missing --allow-no-sex --out postprune.missing --threads 16
#Formating output data in structure format
plink --bfile output_prune --allow-extra-chr --recode structure --out output_prune_str --threads 16
#Formating output data in vcf format
plink --bfile output_prune --allow-extra-chr --recode vcf --out output_prune_vcf --threads 16
#PCA
plink --bfile output_prune --pca --allow-extra-chr --allow-no-sex --out output_prune_pca_plinkout
###############
## Admixture ##
###############
for K in 1 2 3 4 5; \
do admixture -s time -j10 sample_prune_recode.ped $K | tee ./log${K}.out; done
###############
## VCFTools ##
###############
vcftools --vcf sample_prune_vcf.vcf --weir-fst-pop sample_pop1 --weir-fst-pop sample_pop2 --out pop1_vs_pop2_FST