09遗传多样性

项目示例

/share/nas2/zhouxy/project/diversity/GP-20221216-5465-2_zhenjiang_nongkeyuan_kasp_fingerprint/SNP

cd /share/nas2/yuj/project/2023/xxx/xxxxx/
mkdir diversity && cd diversity

提前准备
1)snp.table.xls
cd ../*kasp/kasp_analysis/fingerprint && python3 /share/nas1/yuj/script/kasp/marker2snptable.py -i samples.sortMarker.xls -o snp.table.xls && cp snp.table.xls ../../../*diversity && cd ../../../*diversity
2)group.list  通常是xxx/analysis_dir/config_dir/group.list
一列样品  一列分组

cp /share/nas2/zhouxy/pipline/marker/snp/v1.0/snp-diversity.config.yaml ./
修改配置文件

主流程

perl /share/nas2/zhouxy/pipline/marker/snp/current/snp-diversity.pl -i snp-diversity.config.yaml -o analysis

整理结果:
perl /share/nas2/zhouxy/pipline/marker/snp/v1.0/bin/results/resultDir2.pl -i analysis -o complete_dir

生成报告:
cp /share/nas2/zhouxy/project/diversity/GP-20221216-5465-2_zhenjiang_nongkeyuan_kasp_fingerprint/SNP/snp_report.cfg ./

perl /share/nas1/yuj/pipline/marker/snp/v1.0/Web_Report/snp_Web_Report.pl -id complete_dir/ -cfg snp_report.cfg
# perl /share/nas2/zhouxy/pipline/marker/snp/v1.0/Web_Report/snp_Web_Report.pl -id complete_dir/ -cfg snp_report.cfg 未修改电话地址

三. FAQ

3.1 structureHarvester

snp_structure.ok结束后会报错

3.1.1 20240221 网站打不开

压缩包diversity/analysis/structure/structure_K.zip上传https://taylor0.biology.ucla.edu/structureHarvester/ 
得到结果解压放入structureHarvester文件夹
继续跑流程即可

Structure Harvester

3.1.2 本地绘图

cd analysis/structure/structureHarvester && cp evanno.txt evannoTable.tab && Rscript /share/nas1/yuj/script/diversity/deltaK_plot.r evanno.txt ./ && cd -
继续跑流程

3.2 snp_tassel.cmds

1.手动运行,出图
java -jar /share/nas6/zhouxy/biosoft/tassel/tassel-tassel3-standalone/sTASSEL.jar
操作过程见以下图片
Rsquared和DPrimer结果分别保存为svg格式
snp_LD.Rsquared_pvalue
snp_LD.DPrimer_pvalue
还要导出LD结果为snp_LD.result.xls

2.
cd analysis/tassel/ && rename snp_LD.result.xls.txt snp_LD.result.xls snp_LD.result.xls.txt && cd -

3.跑剩下3行命令

4.
touch analysis/.flag_dir/snp_tassel.ok

image.png

image.png

image.png
运行
选中生成的结果绘图
image.png

image.png

3.3 excel插件

3.3.1 analysis/PCoA

输入文件snp_GenAlEx.xls,由pcoa命令的第一行生成

1.打开宏插件,启用宏,打开snp_GenAlEx.xls
2.计算GD
image.png
弹出页面,默认ok即可,得到名为GD的sheet
3.计算pcoa
image.png

image.png
选中GD页面,点击pcoa,勾上color code pops,ok运行

如上俩张图运行,得到结果,
将pcoa这个页面内容复制到snp_GenAlEx.result.xls里
随后将整个excel保存到snp_GenAlEx.PCoA.xlsx
最后运行pcoa.cmds的第二步程序

3.3.2 analysis/diversity/GenAlEx

1.输入文件snp_GenAlEx.xls
2.Frequency-Based中的Frequency,点击ok
3.弹出下一个页面check all后ok运行

---- 另存为
snp_genalex一直到fstt页面,整个表 → → → snp_GenAlEx.pop.xlsx
snp_genalex一直到ali页面 → → → snp_GenAlEx.All.xlsx

cd analysis/diversity/GenAlEx && touch snp_GenAlEx.pop.Fstat.diversity.xls && touch snp_GenAlEx.pop.diversity.xls &&  touch snp_GenAlEx.All.diversity.xls && cd -
 ---- 以下为复制粘贴
snp_GenAlEx.pop.Fstat.diversity.xls来自hfl  下图1
snp_GenAlEx.pop.diversity.xls完全来自于hfl页面   下图2
snp_GenAlEx.All.diversity.xls来自pop.diversity的合并 手动计算一下吧

image.png

image.png