Dear 4galaxy77,
thank you for your very fast help. If I apply the filter for LD pruning 50 5 0.2 I still have 23373 SNPs of 85076. So I try to test different cutoffs as you rocomended.
is there, in general, a rule of thumb as to which cutoffs can be "legally" used/tested? I have tested following combinations
win_size=(8 10 20 40 50)
vifs=(0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8)
shifts=(2 3 4 5)
for win in ${win_size[*]};do
for vif in ${vifs[*]};do
for shift in ${shifts[*]};do
plink --noweb --file myplink --chr-set -14 -indep-pairwise ${win} ${shift} ${vif} -out ~/SNP_${win}_${shift}_${vif}
done
done
done
The next question which arises, when I tested different Cutoffs. Is there any way, or any parameter, which can be used to make a decision which cutoff is stringent enough?
At the moment I try to test all those cutoffs in ADMIXTURE analysis as follows:
win_size=(8 10 20 40 50)
vifs=(0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8)
shifts=(2 3 4 5)
for win in ${win_size[*]};do
for vif in ${vifs[*]};do
for shift in ${shifts[*]};do
for K in 1 2 3 4 5 6 7 8; do admixture --cv -j7 --haploid="*" ${win}_${shift}_${vif}_pruneddata.ped $K | tee log${K}_${win}_${shift}_${vif}.out; done
done
done
done
...and extract the CVE values to check which "K" in the respective Cutoff scenario have the lowest CVE value in overall.
win_size=(8 10 20 40 50)
vifs=(0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8)
shifts=(2 3 4 5)
for win in ${win_size[*]};do
for vif in ${vifs[*]};do
for shift in ${shifts[*]};do
print ${win}_${shift}_${vif}
grep -h CV log*_${win}_${shift}_${vif}.out > ${win}_${shift}_${vif}.txt
awk '{print $0, FILENAME}' ${win}_${shift}_${vif}.txt >> cv_diff_cutoffs.txt
done
done
done
Finally I get such results:
library(ggplot2)
library(dplyr)
cv2=read.table("cv_diff_cutoffs.txt",header=TRUE)
cv2 %>% ggplot(aes(gsub("\\(","",gsub("\\):","",K)), CV)) +
geom_point(color = "steelblue") +
labs(y = "CVR", x = "Number of groups tested by Admixture") +
facet_wrap(~ gsub(".txt","",Name), ncol=7)
What do you think is it the right way to decide which cutoff should be used for LD pruning?
Thank you for your help Kind regards Pavlo