Treemix分析流程+报错分析+基本理解 - 知乎 (zhihu.com)
还是在重新真理一下
plink --bfile c --export vcf --out c --chr-set 24
vcftools --vcf c --max-missing 1 --recode --stdout > YOUs_no_missing.vcf
plink --vcf YOUs_no_missing.vcf --indep-pairwise 50 100 0.2 --out YOUs_no_missing.ld --set-missing-var-ids @:# --keep-allele-order --chr-set 24
plink --vcf YOUs_no_missing.vcf --extract YOUs_no_missing.ld.prune.in --make-bed --out input_missing --chr-set 24 --set-missing-var-ids @:# --keep-allele-order
plink --bfile input_missing --recode vcf --out input_missingvcftools --vcf input_missing.vcf --plink-tped --out test
根据这篇文章进行格式修改直到能出现 plink.frq.strat
使用 treemix 进行基因渗入分析 & 使用 hierfstat 计算成对 Fst | Typhon (flystar233.github.io)
生成的test.tfam
1051_1051 1051_1051 0 0 0 0
修改为G4 1051_1051 0 0 0 -9
准备我们的pop.vcs文件
G4 1051_1051 G4
跑命令plink --tfile test --freq --within popDFLS4.cov --chr-set 24
gzip plink.frq.strat
在nygcresearch / treemix / Downloads — Bitbucket下载plink2treemix.py
python2 plink2treemix.py plink.frq.strat.gz treemix_in.gz
使用./run跑出out
for i in {0..4}
do
if ! treemix -i treemix_in.gz -m $i -root G1 -noss -o out.${i} ; then
echo "Treemix 命令执行失败"
else
echo "Treemix 命令执行成功"
fi
done
然后下载plotting_funcs.R可视化pophistory-tutorial/example2/plotting_funcs.R at master · joepickrell/pophistory-tutorial (github.com)
setwd("E:/绘图/TreemixDFLS5/1")
prefix="out"
#没有包的自己下载一下
library(RColorBrewer)
#install.packages("R.utils")
library(R.utils)
source("plotting_funcs.R")
# 调整边距
par(mar=c(4, 4, 2, 1))
# 设置2x3的布局
par(mfrow=c(2,3))
for(edge in 0:5){
# 如果plot_tree函数提供了边距参数,你也可以在此处调整
plot_tree(cex=0.8, paste0(prefix,".",edge))
title(paste(edge,"edges"))
}
可以用得到的网页2024/5/15
系统发育网络推断 —— TreeMix | 生信技工 (yanzhongsino.github.io)
ipyrad-analysis toolkit: treemix — ipyrad documentation
Speciation in the presence of gene flow population genomics of.pdf
*Inference of Population Splits and Mixtures from.pdf
Extreme population subdivision or cryptic speciation in the cactus.pdf
群体遗传系列之:一文了解和使用Treemix来研究群体之间的基因流-腾讯云开发者社区-腾讯云 (tencent.com) 使用 treemix 进行基因渗入分析 & 使用 hierfstat 计算成对 Fst | Typhon (flystar233.github.io)
Treemix | Speciation & Population Genomics: a how-to-guide (speciationgenomics.github.io)