跟着nature plants做种群历推断:PSMC、SMC++、MSMC2 (二)
https://datadryad.org/stash/share/jcQfZcbai80MmLb6kO4_mrQLfu1tX-I_1_Yx7hAfJkI
ref=genome.fa
PSMC
bcftools mpileup \
-C 50 \
-O u \
-f ${ref} \
${bam} \
| bcftools call -c -Ov - \
| vcfutils.pl vcf2fq -d 10 -D 100 \
> ${sample}.fq
fq2psmcfa -q 20 ${sample}.fq > ${sample}.psmcfa
psmc \
-N 25 \
-t 15 \
-r 5 \
-p "4+25*2+4+6" \
-o ${sample}.psmc \
${sample}.psmcfa
splitfa ${sample}.psmcfa > ${sample}.split.psmcfa
mkdir ${sample}.bootstrap
for i in `seq 100`
do
psmc \
-N 25 \
-t 15 \
-r 5 \
-b \
-p "4+25*2+4+6" \
-o ${sample}.bootstrap/round-${i}.psmc \
e.${sample}.split.psmcfa
done
cat ${sample}.psmc ${sample}.bootstrap/round-*.psmc > ${sample}.addboot.psmc