8000份大豆重测序数据文章的流程
目录
- 分析流程总览
- 数据分析具体流程
- 图表制作
分析流程总览
整体流程架构
1 2 3 4 5 6 7 8 9 10 11
| 原始数据 ↓ 数据质控 ↓ 比对到参考基因组 ↓ 变异检测 ↓ 变异注释 ↓ 进化和群体遗传学分析
|
数据分析具体流程
一、数据质控
1. FastQC - 质量评估
软件功能:对测序数据进行质量评估
基本用法:
1
| fastqc -t 8 -o /path/to/output /path/to/seq_data/*.fastq
|
参数说明:
-t 8:使用8个线程
-o:指定输出目录
- 输入文件:fastq格式的测序数据
输出结果:
- HTML格式的质量报告文件
- 包含测序质量分布、GC含量、序列长度分布、接头含量等信息
2. fastp - 质控与过滤
软件功能:
- 质量剪切(quality trimming)
- 过滤低质量reads
- 去接头
- UMI(Unique Molecular Identifier)处理
- 过滤polyG(Illumina NovaSeq特征)
- 生成HTML和JSON格式的质控报告
基本用法:
1 2 3
| fastp -i sample_R1.fq.gz -I sample_R2.fq.gz \ -o clean_R1.fq.gz -O clean_R2.fq.gz \ -w 8
|
常用参数详解:
| 参数 |
说明 |
默认值 |
-i |
输入的R1(前向)reads文件 |
- |
-I |
输入的R2(反向)reads文件 |
- |
-o |
输出的清洁R1 reads文件 |
- |
-O |
输出的清洁R2 reads文件 |
- |
-w |
线程数 |
2 |
-q |
质量值阈值,低于此值的碱基将被剪切 |
15 |
-u |
低质量reads百分比阈值,超过此比例的reads将被过滤 |
30 |
-n |
reads长度阈值,短于此长度的reads将被过滤 |
0 |
-l |
保留的最小reads长度 |
15 |
--detect_adapter_for_pe |
自动检测接头(推荐) |
- |
--trim_poly_g |
去除polyG尾(NovaSeq数据必需) |
- |
--poly_g_min_len |
触发polyG剪切的 最小长度 |
10 |
--cut_front |
从前端剪切指定数量的碱基 |
- |
--cut_tail |
从尾端剪切指定数量的碱基 |
- |
--cut_mean_quality |
按平均质量值剪切 |
- |
--length_required |
reads最小长度要求 |
15 |
--json |
输出JSON格式质控报告 |
fastp.json |
--html |
输出HTML格式质控报告 |
fastp.html |
--report_title |
报告标题 |
fastp report |
二、序列比对
BWA-MEM 比对
软件功能:将清洁后的reads比对到参考基因组
完整流程:
2.1 建立参考基因组索引
1
| bwa index reference.fasta
|
说明:此步骤会生成多个索引文件(.amb, .ann, .bwt, .pac, .sa)
2.2 序列比对
1 2 3
| bwa mem -t 8 -M reference.fasta \ clean_R1.fq.gz clean_R2.fq.gz \ > sample.sam
|
参数说明:
-t 8:使用8个线程进行比对,提高速度
-M:将shorter split hits标记为次优,以便兼容Picard工具
reference.fasta:参考基因组序列文件
- 输入:清洁后的R1和R2 reads(gzip压缩格式)
- 输出:SAM格式比对结果
2.3 SAM转BAM并排序
1 2 3 4 5 6 7 8
| samtools view -Sb sample.sam > sample.bam
samtools sort sample.bam -o sample.sorted.bam
samtools index sample.sorted.bam
|
2.4 标记PCR重复
1 2 3 4 5 6 7 8
| picard MarkDuplicates \ I=sample.sorted.bam \ O=sample.dedup.bam \ M=metrics.txt
samtools index sample.dedup.bam
|
说明:
I=:输入文件
O=:输出文件
M=:输出重复统计信息
2.5 添加/read groups信息(可选但推荐)
1 2 3 4 5 6 7 8
| gatk AddOrReplaceReadGroups \ -I sample.dedup.bam \ -O sample.rg.bam \ -RGID id1 \ -RGLB lib1 \ -RGPL illumina \ -RGPU unit1 \ -RGSM sample1
|
参数说明:
-RGID:Read Group ID
-RGLB:Library名称
-RGPL:测序平台(illumina, iontorrent等)
-RGPU:测序单元
-RGSM:样本名称
三、变异检测
GATK Best Practices 流程
GATK(Genome Analysis Toolkit)是目前最广泛使用的变异检测软件之一。
3.1 HaplotypeCaller - 单样本变异检测
基本用法(GVCF模式):
1 2 3 4 5
| gatk HaplotypeCaller \ -R reference.fasta \ -I sample.dedup.bam \ -O sample.g.vcf.gz \ -ERC GVCF
|
参数说明:
-R:参考基因组fasta文件
-I:输入的BAM文件
-O:输出的gVCF文件(gzip压缩)
-ERC GVCF:产生GVCF格式,用于后续联合分析
说明:GVCF模式会记录所有位点的信息,包括变异位点和非变异位点,便于后续多样本联合分析。
3.2 CombineGVCFs - 合并多个gVCF
1 2 3 4 5 6 7
| gatk CombineGVCFs \ -R reference.fasta \ --variant sample1.g.vcf.gz \ --variant sample2.g.vcf.gz \ --variant sample3.g.vcf.gz \ ... \ -O cohort.g.vcf.gz
|
说明:将多个样本的gVCF文件合并成一个联合gVCF文件
批处理示例:
1 2 3 4 5 6 7 8 9
| ls *.g.vcf.gz > variant_list.txt
gatk CombineGVCFs \ -R reference.fasta \ --variant sample1.g.vcf.gz \ --variant sample2.g.vcf.gz \ -O cohort.g.vcf.gz
|
3.3 GenotypeGVCFs - 联合基因分型
1 2 3 4
| gatk GenotypeGVCFs \ -R reference.fasta \ -V cohort.g.vcf.gz \ -O cohort.vcf.gz
|
说明:对合并后的gVCF进行联合基因分型,生成最终的VCF文件
3.4 VariantFiltration - 变异过滤
SNP过滤标准:
1 2 3 4 5 6 7 8 9
| gatk VariantFiltration \ -R reference.fasta \ -V cohort.vcf.gz \ -O cohort.filtered.vcf.gz \ --filter-name "QD_filter" --filter-expression "QD < 2.0" \ --filter-name "FS_filter" --filter-expression "FS > 60.0" \ --filter-name "MQ_filter" --filter-expression "MQ < 40.0" \ --filter-name "MQRankSum_filter" --filter-expression "MQRankSum < -12.5" \ --filter-name "ReadPosRankSum_filter" --filter-expression "ReadPosRankSum < -8.0"
|
InDel过滤标准:
1 2 3 4 5 6 7
| gatk VariantFiltration \ -R reference.fasta \ -V cohort.vcf.gz \ -O cohort.indel.filtered.vcf.gz \ --filter-name "QD_filter" --filter-expression "QD < 2.0" \ --filter-name "FS_filter" --filter-expression "FS > 200.0" \ --filter-name "ReadPosRankSum_filter" --filter-expression "ReadPosRankSum < -20.0"
|
过滤指标说明:
| 指标 |
全称 |
说明 |
SNP阈值 |
InDel阈值 |
| QD |
QualByDepth |
每深度质量分数 |
< 2.0 |
< 2.0 |
| FS |
FisherStrand |
链偏向性 |
> 60.0 |
> 200.0 |
| MQ |
RMSMappingQuality |
根均方映射质量 |
< 40.0 |
- |
| MQRankSum |
MappingQualityRankSumTest |
映射质量秩和检验 |
< -12.5 |
- |
| ReadPosRankSum |
ReadPositionRankSumTest |
Read位置秩和检验 |
< -8.0 |
< -20.0 |
| SOR |
StrandOddsRatio |
链比值 |
> 3.0 |
> 10.0 |
3.5 SelectVariants - 提取高质量变异
提取通过所有过滤的变异:
1 2 3 4 5
| gatk SelectVariants \ -R reference.fasta \ -V cohort.filtered.vcf.gz \ --exclude-filtered \ -O cohort.high_quality.vcf.gz
|
3.6 分别提取SNP和InDel
提取SNP:
1 2 3 4
| gatk SelectVariants \ -V cohort.high_quality.vcf.gz \ -select-type SNP \ -O cohort.snp.vcf.gz
|
提取InDel:
1 2 3 4
| gatk SelectVariants \ -V cohort.high_quality.vcf.gz \ -select-type INDEL \ -O cohort.indel.vcf.gz
|
四、变异注释
ANNOVAR 注释流程
软件功能:对检测到的变异进行功能注释,预测变异对基因功能的影响
4.1 准备工作
下载注释数据库:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
| mkdir humandb/
annotate_variation.pl -buildver dm6 \ -downdb -webfrom annovar \ refGene humandb/
annotate_variation.pl -buildver dm6 \ -downdb -webfrom annovar \ dbnsfp42a humandb/
annotate_variation.pl -buildver dm6 \ -downdb -webfrom annovar \ gnomad_genome humandb/
|
4.2 转换VCF格式为ANNOVAR输入格式
1 2 3 4 5
| convert2annovar.pl -format v4 cohort.snp.vcf.gz > cohort.snp.avinput
convert2annovar.pl -format v4 cohort.indel.vcf.gz > cohort.indel.avinput
|
4.3 执行注释
SNP注释:
1 2 3 4 5 6 7 8
| table_annovar.pl cohort.snp.avinput humandb/ \ -buildver dm6 \ -out cohort.snp_annotated \ -remove \ -protocol refGene,dbnsfp42a,gnomad_genome \ -operation g,f,f \ -nastring . \ -vcfinput
|
InDel注释:
1 2 3 4 5 6 7 8
| table_annovar.pl cohort.indel.avinput humandb/ \ -buildver dm6 \ -out cohort.indel_annotated \ -remove \ -protocol refGene \ -operation g \ -nastring . \ -vcfinput
|
参数说明:
-buildver:基因组版本(如dm6, hg38等)
-protocol:指定要使用的注释数据库
-operation:
-nastring:缺失值的表示字符串
-vcfinput:输入为VCF格式
注释结果解读:
- exonic:外显子区的变异
- splicing:剪接位点附近的变异(±2bp)
- intronic:内含子区的变异
- upstream/downstream:基因上游/下游区域
- intergenic:基因间区
- UTR5/UTR3:5’/3’非翻译区
功能影响预测:
- synonymous SNV:同义突变(不改变氨基酸)
- nonsynonymous SNV:非同义突变
- missense:错义突变
- nonsense:无义突变(产生终止密码子)
- frameshift:移码突变
图表制作
一、群体遗传学分析
1.1 PCA分析(主成分分析)
分析目的:
- 评估群体结构
- 识别样本聚类模式
- 检测离群样本
- 揭示样本间的遗传关系
常用软件:
- PLINK:命令行工具,快速高效
- GCTA:支持混合线性模型
- SNPRelate(R包):灵活,便于可视化
PLINK进行PCA分析:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
| plink --vcf cohort.vcf.gz --make-bed --out population
plink --bfile population \ --maf 0.05 \ --geno 0.1 \ --hwe 1e-6 \ --make-bed \ --out population_filtered
plink --bfile population_filtered \ --pca 20 \ --out pca_result
|
R语言可视化:
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
| pca_data <- read.table("pca_result.eigenvec", header=FALSE) colnames(pca_data) <- c("FID", "IID", paste0("PC", 1:20))
group_info <- read.table("group_info.txt", header=TRUE) pca_data <- merge(pca_data, group_info, by="IID")
library(ggplot2) ggplot(pca_data, aes(x=PC1, y=PC2, color=Group)) + geom_point(size=3, alpha=0.7) + theme_bw() + labs(x="PC1", y="PC2", title="PCA Analysis", subtitle=paste0("PC1: ", round(summary(prcomp(pca_data[,3:22]))$importance[2,1]*100, 2), "% variance"))
ggplot(pca_data, aes(x=PC1, y=PC3, color=Group)) + geom_point(size=3, alpha=0.7) + theme_bw() + labs(x="PC1", y="PC3")
eigenvals <- read.table("pca_result.eigenval") var_explained <- eigenvals$V1 / sum(eigenvals$V1) * 100 plot(1:20, var_explained[1:20], type="b", xlab="Principal Component", ylab="Variance Explained (%)", main="Scree Plot")
|
1.2 系统发育树构建
分析目的:
常用方法:
| 方法 |
特点 |
适用场景 |
软件 |
| 邻接法(NJ) |
速度快,适用于大数据 |
初步分析 |
MEGA, PHYLIP |
| 最大似然法(ML) |
准确性高,计算量大 |
精确分析 |
RAxML, IQ-TREE |
| 贝叶斯法 |
最准确,计算量极大 |
小数据集精细分析 |
MrBayes |
完整流程:
Step 1: 提取变异位点并格式转换
1 2 3 4 5
| vcf2phylip.py --input cohort.vcf.gz --output phylip_file
seqtk subseq reference.fasta region_list.txt > alignment.fasta
|
Step 2: 构建系统发育树(IQ-TREE)
1 2 3 4 5 6 7 8 9 10 11 12 13
| iqtree -s phylip_file -m GTR+G -bb 1000 -nt AUTO
|
Step 3: 使用RAxML(替代方案)
1 2 3 4 5 6 7 8 9 10 11 12 13 14
| raxmlHPC -s phylip_file \ -n output \ -m GTRGAMMA \ -p 12345 \ - -f a
|
Step 4: 可视化
在线工具:
本地软件:
- FigTree:图形界面软件
- ggtree(R包):可编程,灵活
R语言ggtree示例:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
| library(ggtree) library(treeio)
tree <- read.tree("output.treefile")
ggtree(tree) + geom_tiplab() + geom_tippoint(aes(color=group), size=3) + theme_tree2()
ggtree(tree) + geom_treescale() + geom_tiplab(size=3) + geom_nodepoint(aes(label=label), color="red", size=3)
ggtree(tree) + geom_nodelab(aes(label=bootstrap), size=3, color="blue")
|
1.3 群体结构分析
分析目的:
- 评估群体混合程度
- 估计祖先群体数量
- 检测基因流事件
ADMIXTURE分析:
Step 1: 数据准备
1 2 3 4 5 6 7 8 9 10 11 12
| plink --vcf cohort.vcf.gz --make-bed --out population
plink --bfile population \ --indep-pairwise 50 5 0.2 \ --out prune
plink --bfile population \ --extract prune.prune.in \ --make-bed \ --out population.pruned
|
Step 2: 运行ADMIXTURE
1 2 3 4 5 6 7 8
| for K in {1..10}; do admixture --cv population.pruned.bed $K | tee log${K}.out done
|
Step 3: 选择最优K值
1 2 3 4
| grep -h CV log*.out | sort -t':' -k2 -n
|
Step 4: 可视化(R语言)
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
| library(ggplot2)
K <- 3 Q <- read.table(paste0("population.pruned.", K, ".Q"))
order_idx <- order(Q[,1]) Q_ordered <- Q[order_idx,]
plot_data <- as.data.frame(Q_ordered) colnames(plot_data) <- paste0("Ancestry", 1:K) plot_data$Sample <- factor(1:nrow(Q_ordered))
library(reshape2) plot_data_long <- melt(plot_data, id.vars="Sample", variable.name="Ancestry", value.name="Proportion")
ggplot(plot_data_long, aes(x=Sample, y=Proportion, fill=Ancestry)) + geom_bar(stat="identity", width=0.8) + scale_fill_brewer(palette="Set3") + theme_minimal() + theme( axis.text.x = element_blank(), axis.ticks.x = element_blank(), legend.position="right" ) + labs(x="Sample", y="Ancestry Proportion", title=paste0("ADMIXTURE Analysis (K=", K, ")"))
|
STRUCTURE分析(替代软件):
1 2 3 4 5
| structure -K 3 -i population_input.txt -o structure_output
|
二、连锁不平衡分析
2.1 LD衰减分析
分析目的:
- 评估连锁不平衡随着距离增加而衰减的程度
- 估算历史重组率
- 指导关联分析中的标记密度选择
关键指标:
| 指标 |
说明 |
取值范围 |
| r² |
两个位点间的相关系数 |
0-1 |
| D’ |
标准化连锁不平衡系数 |
0-1 |
LD衰减曲线:当r²降至其最大值的一半时,对应的物理距离即为LD衰减距离
软件1: PopLDdecay(推荐)
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
| PopLDdecay -InVCF cohort.vcf.gz \ -OutStat ld_decay_stat
PopLDdecay -InVCF cohort.vcf.gz \ -OutStat ld_decay_stat \ -MaxDist 1000000 \ -MAF 0.05 \ -Miss 0.2 \ -Het 1
PopLDdecay -InVCF cohort.vcf.gz \ -OutStat ld_decay_stat \ -OutPlot ld_decay_plot
|
软件2: PLINK
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
| plink --vcf cohort.vcf.gz \ --r2 \ --ld-window 99999 \ --ld-window-kb 100 \ --ld-window-r2 0 \ --out ld_pairwise
plink --vcf cohort.vcf.gz \ --ld-window 100 \ --ld-window-kb 100 \ --ld-window-r2 0.2 \ --r2 --ld-window-r2 0 \ --out ld_window
|
R语言可视化:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
| library(ggplot2)
ld_data <- read.table("ld_decay_stat.stat", header=TRUE) colnames(ld_data) <- c("Distance", "R2")
ld_avg <- aggregate(R2 ~ Distance, data=ld_data, FUN=mean)
ggplot(ld_avg, aes(x=Distance/1000, y=R2)) + geom_line(size=1, color="steelblue") + geom_smooth(method="loess", se=FALSE, color="red", linetype="dashed") + labs(x="Distance (kb)", y="Linkage Disequilibrium (r²)", title="LD Decay Analysis") + theme_bw() + annotate("segment", x=0, xend=Inf, y=0.1, yend=0.1, linetype="dotted", color="gray50")
half_decay_distance <- approx(ld_avg$R2, ld_avg$Distance, xout=0.1)$y print(paste0("Half-decay distance: ", round(half_decay_distance/1000, 2), " kb"))
|
2.2 LD热图
目的:展示特定染色体区域的LD模式
R语言实现:
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
| library(LDheatmap) library(SNPRelate)
snpgdsVCF2GDS("cohort.vcf.gz", "cohort.gds")
genofile <- snpgdsOpen("cohort.gds")
snp_id <- snpgdsSelectSNP(genofile, chromosome=1, start.position=1000000, end.position=2000000)
ld_matrix <- snpgdsLDMat(genofile, snp.id=snp_id, method="r", slide=100, LD.threshold=0.2)
png("LD_heatmap.png", width=2000, height=2000, res=150) LDheatmap(ld_matrix$snpdist, ld_matrix$LDmatrix, flip=TRUE, title="LD Heatmap (Chr1: 1-2 Mb)", geneMap="no genes") dev.off()
snpgdsClose(genofile)
|
三、核苷酸多样性分析
3.1 π (Pi) 计算
定义:
π(核苷酸多样性)是指从群体中随机抽取的两个染色体的任意位点上,核苷酸差异的平均比例。
计算公式:
其中,πij是第i个和第j个序列之间的核苷酸差异,n是样本数量
生物学意义:
- 反映群体内的遗传多样性水平
- 高π值:高遗传多样性
- 低π值:低遗传多样性(可能经历了选择或瓶颈效应)
使用VCFtools计算:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
| vcftools --vcf cohort.vcf.gz \ --site-pi \ --out pi_per_site
vcftools --vcf cohort.vcf.gz \ --window-pi 100000 \ --window-pi-step 50000 \ --out pi_window
|
使用PopGenome(R包):
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
| library(PopGenome)
data <- readVCF("cohort.vcf.gz", include.unknown=TRUE)
data <- diversity.stats(data)
pi_genome <- data@nuc.diversity.within print(paste0("Genome-wide π: ", pi_genome))
data <- sliding.window.transform(data, width=100000, step=50000) data <- diversity.stats(data)
window_pi <- data@nuc.diversity.within window_positions <- data@sliding.window.positions
plot(window_positions/1000000, window_pi, type="l", lwd=2, xlab="Genome Position (Mb)", ylab="Nucleotide Diversity (π)", main="Sliding Window π Analysis")
|
群体间π比较:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
| vcftools --vcf cohort.vcf.gz \ --keep population1.txt \ --window-pi 100000 \ --out pi_pop1
vcftools --vcf cohort.vcf.gz \ --keep population2.txt \ --window-pi 100000 \ --out pi_pop2
vcftools --vcf cohort.vcf.gz \ --keep population3.txt \ --window-pi 100000 \ --out pi_pop3
|
3.2 Watterson’s θ (Theta)
定义:
基于分离位点(segregating sites)数目的核苷酸多样性估计量
计算公式:
其中:
- S:分离位点数目
- an:调和级数和,an = Σ[1/(i-1)], i从2到n
生物学意义:
- 与π类似,也是衡量遗传多样性的指标
- 在中性进化条件下,θ ≈ π
- π < θ:说明群体经历了扩张
- π > θ:说明存在平衡选择或群体收缩
计算方法:
1 2 3 4 5 6 7 8 9 10 11 12 13
| library(PopGenome)
data <- readVCF("cohort.vcf.gz", include.unknown=TRUE)
data <- neutrality.stats(data)
theta <- data@Watterson.theta theta <- data@Tajimas.D
print(paste0("Watterson's θ: ", theta))
|
Tajima’s D检验:
1 2 3 4 5 6 7
| vcftools --vcf cohort.vcf.gz \ --TajimaD 100000 \ --out tajimaD
|
四、固定指数 (FST)
4.1 FST计算
定义:
FST(Fixation Index)是衡量群体间遗传分化程度的指标
取值范围及意义:
| FST值 |
分化程度 |
解释 |
| 0 - 0.05 |
很小 |
群体间几乎无分化 |
| 0.05 - 0.15 |
中等 |
群体间有一定分化 |
| 0.15 - 0.25 |
较大 |
群体间分化显著 |
| > 0.25 |
极大 |
群体间分化极大 |
使用VCFtools计算:
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
|
Sample001 Sample002 ...
Sample101 Sample102 ...
vcftools --vcf cohort.vcf.gz \ --weir-fst-pop population1.txt \ --weir-fst-pop population2.txt \ --out fst_pop1_pop2
vcftools --vcf cohort.vcf.gz \ --weir-fst-pop population1.txt \ --weir-fst-pop population2.txt \ --fst-window-size 100000 \ --fst-window-step 50000 \ --out fst_window
|
使用PopGenome(R包):
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
| library(PopGenome)
data <- readVCF("cohort.vcf.gz", include.unknown=TRUE, gffpath="annotation.gff")
populations <- list( pop1 = read.table("population1.txt")$V1, pop2 = read.table("population2.txt")$V1, pop3 = read.table("population3.txt")$V1 )
data <- set.populations(data, populations)
data <- F_ST.stats(data, mode="nucleotide")
fst_matrix <- data@F_ST.matrix print(fst_matrix)
for (i in 1:(nrow(fst_matrix)-1)) { for (j in (i+1):nrow(fst_matrix)) { cat(sprintf("FST(%s, %s) = %.4f\n", rownames(fst_matrix)[i], colnames(fst_matrix)[j], fst_matrix[i,j])) } }
|
可视化FST分布:
1 2 3 4 5 6 7 8 9 10 11 12 13 14
| library(ggplot2)
fst_data <- read.table("fst_window.windowed.weir.fst", header=TRUE)
ggplot(fst_data, aes(x=POS/1000000, y=WEIR_AND_COCKERHAM_FST)) + geom_point(size=0.5, alpha=0.6, color="steelblue") + geom_hline(yintercept=0.15, linetype="dashed", color="red") + facet_wrap(~CHROM, scales="free_x", ncol=4) + labs(x="Position (Mb)", y="FST", title="Genome-wide FST between Population 1 and 2") + theme_bw() + theme(strip.text = element_text(size=8))
|
FST热图:
1 2 3 4 5 6 7 8 9
| library(pheatmap)
pheatmap(fst_matrix, display_numbers=TRUE, number_format="%.3f", main="Pairwise FST between Populations", color=colorRampPalette(c("white", "orange", "red"))(50), breaks=seq(0, max(fst_matrix), length.out=51))
|
五、选择清除分析
5.1 核苷酸多样性比值 (π-ratio)
原理:
受选择区域的核苷酸多样性会显著降低,通过计算不同群体间π的比值可以检测选择信号
计算公式:
1
| π-ratio = π_selected / π_control
|
低π-ratio值:该区域可能经历了正选择
分析流程:
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
|
vcftools --vcf cohort.vcf.gz \ --keep population1.txt \ --window-pi 100000 \ --window-pi-step 50000 \ --out pi_pop1
vcftools --vcf cohort.vcf.gz \ --keep population2.txt \ --window-pi 100000 \ --window-pi-step 50000 \ --out pi_pop2
import pandas as pd
pi1 = pd.read_csv("pi_pop1.windowed.pi", sep="\t") pi2 = pd.read_csv("pi_pop2.windowed.pi", sep="\t")
pi_ratio = pi1.copy() pi_ratio["PI_RATIO"] = pi1["PI"] / pi2["PI"] pi_ratio.to_csv("pi_ratio.txt", sep="\t", index=False)
|
R语言可视化:
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
| library(ggplot2)
pi1 <- read.table("pi_pop1.windowed.pi", header=TRUE) pi2 <- read.table("pi_pop2.windowed.pi", header=TRUE)
pi_ratio <- data.frame( CHROM = pi1$CHROM, BIN_START = pi1$BIN_START, BIN_END = pi1$BIN_END, PI_RATIO = pi1$PI / pi2$PI )
threshold <- quantile(pi_ratio$PI_RATIO, 0.05) candidates <- pi_ratio[pi_ratio$PI_RATIO < threshold, ]
ggplot(pi_ratio, aes(x=BIN_START/1000000, y=PI_RATIO)) + geom_line(color="steelblue", size=0.5) + geom_hline(yintercept=threshold, linetype="dashed", color="red", size=1) + geom_point(data=candidates, aes(x=BIN_START/1000000, y=PI_RATIO), color="red", size=2, alpha=0.7) + facet_wrap(~CHROM, scales="free_x", ncol=4) + labs(x="Position (Mb)", y="π Ratio (Pop1/Pop2)", title="Nucleotide Diversity Ratio Scan") + theme_bw()
write.table(candidates, "selection_candidates.txt", sep="\t", row.names=FALSE, quote=FALSE)
|
5.2 XP-CLR (跨群体复合似然比检验)
原理:
检测由于选择引起的群体间等位基因频率差异,考虑了连锁不平衡和遗传重组
特点:
- 不需要单体型相位信息
- 适用于大数据集
- 对古老选择信号敏感
分析流程:
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
|
vcftools --vcf cohort.vcf.gz \ --freq \ --out allele_freq
xpclr -xpclr cohort.vcf.gz \ -w1 1 200 2000 \ -w2 1 100 1000 \ -p0 0.001 \ -maxSNP 1000 \ -out xpclr_result
|
结果可视化:
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
| library(ggplot2)
xpclr <- read.table("xpclr_result", header=FALSE) colnames(xpclr) <- c("CHROM", "Position", "XP_CLR_Score", "Ref_Freq", "Alt_Freq")
window_size <- 100000 xpclr$Window <- floor(xpclr$Position / window_size) * window_size xpclr_avg <- aggregate(XP_CLR_Score ~ Window + CHROM, data=xpclr, FUN=mean)
ggplot(xpclr_avg, aes(x=Window/1000000, y=XP_CLR_Score)) + geom_line(color="steelblue", size=1) + facet_wrap(~CHROM, scales="free_x", ncol=4) + labs(x="Position (Mb)", y="XP-CLR Score", title="XP-CLR Scan for Selection Signals") + theme_bw()
threshold <- quantile(xpclr_avg$XP_CLR_Score, 0.99) peaks <- xpclr_avg[xpclr_avg$XP_CLR_Score > threshold, ]
ggplot(xpclr_avg, aes(x=Window/1000000, y=XP_CLR_Score)) + geom_line(color="gray") + geom_point(data=peaks, aes(x=Window/1000000, y=XP_CLR_Score), color="red", size=2) + geom_hline(yintercept=threshold, linetype="dashed", color="red") + facet_wrap(~CHROM, scales="free_x", ncol=4) + labs(x="Position (Mb)", y="XP-CLR Score", title="Significant Selection Peaks") + theme_bw()
|
5.3 XP-EHH (交叉群体扩展单体型纯合性)
原理:
检测一个群体中已经完成的正选择(单体型频率高且扩展范围大),而另一群体中未完成的选择
特点:
分析流程:
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
| plink --vcf cohort.vcf.gz --make-bed --out cohort
shapeit -B cohort \ -M genetic_map.txt \ -O cohort.phased \ --thread 8
beagle gt=cohort.bed \ out=cohort.phased \ nthreads=8
selscan --xpehh \ --vcf cohort.phased.vcf.gz \ --map genetic_map.txt \ --pop1 population1.txt \ --pop2 population2.txt \ --out xpehh_result
norm --xpehh --files xpehh_result
|
结果可视化:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
| library(ggplot2)
xpehh <- read.table("xpehh_result.norm.xpehh", header=TRUE)
ggplot(xpehh, aes(x=POS/1000000, y=normXPEHH)) + geom_point(size=0.5, alpha=0.6, color="steelblue") + geom_hline(yintercept=0, linetype="dashed", color="gray50") + geom_hline(yintercept=2, linetype="dashed", color="red") + geom_hline(yintercept=-2, linetype="dashed", color="blue") + facet_wrap(~CHR, scales="free_x", ncol=4) + labs(x="Position (Mb)", y="Standardized XP-EHH", title="XP-EHH Scan") + theme_bw()
candidates_pos <- xpehh[xpehh$normXPEHH > 2, ] candidates_neg <- xpehh[xpehh$normXPEHH < -2, ]
|
5.4 Tajima’s D
定义:
基于等位基因频谱的中性检验统计量
计算公式:
取值及生物学意义:
| D值 |
意义 |
进化解释 |
| D >> 0 |
显著为正 |
群体收缩或平衡选择 |
| D ≈ 0 |
接近0 |
符合中性进化 |
| D << 0 |
显著为负 |
群体扩张或正选择 |
使用VCFtools计算:
1 2 3 4 5 6 7 8 9 10
| vcftools --vcf cohort.vcf.gz \ --TajimaD 100000 \ --out tajimaD
|
使用PopGenome(R包):
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
| library(PopGenome)
data <- readVCF("cohort.vcf.gz", include.unknown=TRUE)
data <- sliding.window.transform(data, width=100000, step=50000)
data <- neutrality.stats(data)
tajima_d <- data@Tajimas.D window_positions <- data@sliding.window.positions
plot(window_positions/1000000, tajima_d, type="l", lwd=2, col="steelblue", xlab="Genome Position (Mb)", ylab="Tajima's D", main="Tajima's D Scan")
abline(h=2, col="red", lty=2) abline(h=-2, col="blue", lty=2)
sig_pos <- which(tajima_d > 2) sig_neg <- which(tajima_d < -2)
|
六、全基因组关联分析 (GWAS)
6.1 分析流程总览
完整流程:
1
| 表型数据收集 → 基因型数据质控 → 群体结构控制 → 关联分析 → 多重检验校正 → 结果可视化 → 候选基因鉴定
|
6.2 数据准备
表型文件:
1 2 3 4 5
| Sample_ID Trait1 Trait2 Trait3 Sample001 10.5 25.3 1.2 Sample002 12.3 28.1 1.5 Sample003 9.8 24.7 1.1 ...
|
基因型文件:
- VCF格式
- PLINK BED格式
- HapMap格式
群体结构文件(可选但推荐):
- Q矩阵:从ADMIXTURE或STRUCTURE获得
- PC矩阵:从PCA获得
6.3 基因型数据质控
质控标准:
| 参数 |
阈值 |
说明 |
| MAF |
> 0.05 |
最小等位基因频率 |
| Missing rate |
< 0.1 |
缺失率(位点) |
| HWE P |
> 1e-6 |
哈代-温伯格平衡p值 |
| Geno missing |
< 0.1 |
缺失率(个体) |
使用PLINK进行质控:
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
| plink --vcf cohort.vcf.gz --make-bed --out gwas_raw
plink --bfile gwas_raw \ --maf 0.05 \ --geno 0.1 \ --hwe 1e-6 \ --mind 0.1 \ --make-bed \ --out gwas_cleaned
plink --bfile gwas_cleaned \ --indep-pairwise 50 5 0.2 \ --out prune
plink --bfile gwas_cleaned \ --extract prune.prune.in \ --make-bed \ --out gwas_pruned
|
6.4 关联分析
常用软件对比:
| 软件 |
模型 |
特点 |
适用场景 |
| TASSEL |
GLM/MLM |
图形界面,易于使用 |
小数据集 |
| GAPIT |
多种模型 |
R包,灵活 |
中等数据集 |
| GEMMA |
LMM |
快速,准确 |
大数据集 |
| EMMAX |
LMM |
高效 |
大数据集 |
使用GEMMA进行关联分析:
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
| gemma -bfile gwas_cleaned \ -gk 1 \ -o kinship_matrix
gemma -bfile gwas_cleaned \ -k output/kinship_matrix.cXX.txt \ -lmm 4 \ -phenotype phenotype.txt \ -o gwas_result
|
使用GAPIT(R包):
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
| library(GAPIT3)
myG <- read.table("gwas_cleaned.raw", header=TRUE) myY <- read.table("phenotype.txt", header=TRUE)
myPCA <- GAPIT.PCA(myG)
myGWAS <- GAPIT( Y = myY, G = myG, PCA.total = 3, model = "MLM", SNP.MAF = 0.05 )
myGWAS_multi <- GAPIT( Y = myY, G = myG, PCA.total = 3, model = c("GLM", "MLM", "FarmCPU", "Blink") )
|
6.5 结果解读
关联结果文件格式:
| 列名 |
说明 |
| CHR |
染色体编号 |
| SNP |
SNP标识符(位置或ID) |
| BP |
物理位置 |
| P |
p值 |
| BETA |
效应大小 |
| SE |
标准误 |
| R2 |
解释方差比例 |
多重检验校正:
| 方法 |
阈值 |
说明 |
| Bonferroni |
0.05/N |
保守,适合严格标准 |
| FDR |
0.05 |
允许5%假阳性 |
| Suggestive |
1e-5 |
建议显著性阈值 |
基因组显著性阈值:
1 2 3 4 5
| Bonferroni correction: 0.05 / N 其中 N = 总SNP数量
例如,N = 1,000,000: 阈值 = 0.05 / 1,000,000 = 5e-8
|
6.6 结果可视化
曼哈顿图:
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
| library(qqman)
gwas <- read.table("gwas_result.assoc.txt", header=TRUE)
manhattan(gwas, chr = "CHR", bp = "BP", p = "P", genomewideline = -log10(5e-8), suggestiveline = -log10(1e-5), highlight = NULL, main = "GWAS Manhattan Plot")
manhattan(gwas, chr = "CHR", bp = "BP", p = "P", highlight = gwas$SNP[gwas$P < 5e-8], main = "Significant SNPs")
manhattan(gwas, chr = "CHR", bp = "BP", p = "P", annotatePval = 1e-6, annotateTop = TRUE)
|
使用ggplot2绘制曼哈顿图:
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
| library(ggplot2) library(dplyr)
gwas_plot <- gwas %>% mutate( neglog10p = -log10(P), chr_color = ifelse(as.numeric(CHR) %% 2 == 0, "even", "odd"), CHR = factor(CHR, levels=unique(CHR)) )
threshold <- 5e-8
ggplot(gwas_plot, aes(x=BP/1000000, y=neglog10p)) + geom_point(aes(color=chr_color), size=0.5, alpha=0.7) + facet_wrap(~CHR, scales="free_x", ncol=4) + scale_color_manual(values=c("odd"="steelblue", "even"="orange")) + geom_hline(yintercept=-log10(threshold), linetype="dashed", color="red", size=1) + labs(x="Position (Mb)", y="-log10(P)", title="Genome-wide Association Study", subtitle=paste0("Significance threshold: ", threshold)) + theme_bw() + theme( legend.position="none", strip.text = element_text(size=8), axis.text.x = element_text(angle=45, hjust=1) )
|
QQ图:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
| qq(gwas$P, main="Q-Q Plot")
library(ggplot2)
expected <- -log10((1:nrow(gwas)) / (nrow(gwas) + 1)) observed <- -log10(sort(gwas$P))
qq_data <- data.frame(Expected=expected, Observed=observed)
ggplot(qq_data, aes(x=Expected, y=Observed)) + geom_point(size=0.5, alpha=0.6) + geom_abline(intercept=0, slope=1, linetype="dashed", color="red", size=1) + labs(x="Expected -log10(P)", y="Observed -log10(P)", title="Q-Q Plot") + theme_bw()
lambda <- median(qchisq(1 - gwas$P, 1)) / qchisq(0.5, 1) cat(paste0("Genomic inflation factor (λ): ", round(lambda, 3)))
|
火山图:
1 2 3 4 5 6 7 8 9
| ggplot(gwas, aes(x=BETA, y=-log10(P))) + geom_point(aes(color=-log10(P) > -log10(5e-8)), alpha=0.6, size=0.5) + scale_color_manual(values=c("FALSE"="gray", "TRUE"="red")) + geom_hline(yintercept=-log10(5e-8), linetype="dashed") + labs(x="Effect Size (BETA)", y="-log10(P)", title="Volcano Plot") + theme_bw()
|
区域关联图(Locus Zoom):
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
| sig_snp <- gwas %>% filter(P < 5e-8) %>% arrange(P) %>% slice(1)
chr <- as.character(sig_snp$CHR) center_pos <- sig_snp$BP window <- 500000
region_data <- gwas %>% filter(CHR == chr & BP >= (center_pos - window) & BP <= (center_pos + window))
ggplot(region_data, aes(x=BP/1000000, y=-log10(P))) + geom_point(color="steelblue", size=1.5) + geom_vline(xintercept=center_pos/1000000, linetype="dashed", color="red") + labs(x=paste0("Position on Chr", chr, " (Mb)"), y="-log10(P)", title=paste0("Regional Association Plot (", round(center_pos/1000000, 2), " Mb)")) + theme_bw()
|
6.7 候选基因鉴定
提取显著SNP附近的基因:
1 2 3 4 5 6 7 8 9
| awk 'NR>1 && $9 < 5e-8' gwas_result.assoc.txt > significant_snps.txt
bedtools closest -a significant_snps.bed \ -b genes.gff3 \ -d 100000 \ > candidate_genes.txt
|
使用BEDTools:
1 2 3 4 5
| awk 'BEGIN{OFS="\t"} {print $1, $2-1, $2, $3, $4}' significant_snps.txt > snps.bed
bedtools window -a snps.bed -b genes.bed -w 100000 > snp_genes.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
| library(clusterProfiler) library(org.At.tair.db)
genes <- read.table("candidate_genes.txt", header=FALSE)$V1
go_enrich <- enrichGO( gene = genes, OrgDb = org.At.tair.db, keyType = "TAIR", ont = "BP", pAdjustMethod = "BH", pvalueCutoff = 0.05, qvalueCutoff = 0.10 )
dotplot(go_enrich, showCategory=20) + ggtitle("GO Enrichment") barplot(go_enrich, showCategory=20) + ggtitle("GO Enrichment") emapplot(go_enrich) + ggtitle("GO Enrichment")
kegg_enrich <- enrichKEGG( gene = genes, organism = 'ath', pvalueCutoff = 0.05 )
dotplot(kegg_enrich) + ggtitle("KEGG Pathway Analysis")
|
七、其他分析
7.1 基因家族分析
目的:鉴定特定基因家族的成员、进化历史和表达模式
分析流程:
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
|
blastp -query known_family_proteins.fa \ -db soybean_proteome.fa \ -evalue 1e-5 \ -outfmt 6 \ -out blast_results.txt
hmmbuild gene_family.hmm known_family_alignment.sto hmmsearch --domtblout hmm_results.txt gene_family.hmm soybean_proteome.fa
samtools faidx soybean_proteome.fa $(awk '{print $1}' blast_results.txt) > candidate_genes.fa
mafft --auto candidate_genes.fa > candidate_genes_aligned.fa
iqtree -s candidate_genes_aligned.fa -m MFP -bb 1000 -nt AUTO
KaKs_Calculator -i coding_sequences.fa -o ka_ks_results.txt
grep -f candidate_genes_list.txt soybean_annotation.gff3 > gene_locations.gff3
|
可视化基因家族:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
| library(ggtree) library(ggplot2)
tree <- read.tree("candidate_genes_aligned.fa.treefile")
ggtree(tree) + geom_tiplab(size=2) + geom_tippoint(aes(color=group), size=2) + theme_tree2() + labs(title="Gene Family Phylogenetic Tree")
if (file.exists("expression_data.txt")) { expr_data <- read.table("expression_data.txt", header=TRUE, row.names=1) gheatmap(tree, expr_data, offset=0.5, width=0.5, colnames_angle=-45, colnames_offset_y=5) }
|
7.2 选择压力分析
Ka/Ks比值分析:
定义:
- Ka:非同义替换率
- Ks:同义替换率
- Ka/Ks:选择压力指标
比值解读:
| Ka/Ks |
选择类型 |
说明 |
| Ka/Ks < 1 |
纯化选择 |
功能约束,去除有害突变 |
| Ka/Ks = 1 |
中性进化 |
无选择压力 |
| Ka/Ks > 1 |
正选择 |
适应性进化 |
使用KaKs_Calculator:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
|
KaKs_Calculator -i gene_pairs.fa -o ka_ks_results.txt -m MYN
|
使用PAML (codeml):
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
|
seqfile = gene_alignment.phy treefile = gene_tree.nwk outfile = codeml_results.txt runmode = 0 model = 0 NSsites = 0 icode = 0
codeml codeml.ctl
|
可视化Ka/Ks分布:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
| library(ggplot2)
ka_ks <- read.table("ka_ks_results.txt", header=TRUE)
ggplot(ka_ks, aes(x=Ka_Ks)) + geom_histogram(binwidth=0.1, fill="steelblue", color="black") + geom_vline(xintercept=1, linetype="dashed", color="red", size=1) + labs(x="Ka/Ks Ratio", y="Count", title="Distribution of Ka/Ks Ratios") + theme_bw()
ggplot(ka_ks, aes(x=Ks, y=Ka)) + geom_point(alpha=0.6) + geom_abline(intercept=0, slope=1, linetype="dashed", color="red", size=1) + labs(x="Ks (synonymous)", y="Ka (nonsynonymous)", title="Ka vs Ks Plot") + theme_bw()
|
7.3 单倍型分析
目的:分析基因区域的单倍型组成和频率分布
使用Haploview:
使用PLINK:
1 2 3 4 5 6 7 8 9 10 11 12 13
| plink --bfile gwas_cleaned \ --blocks no-pheno-req \ --hap-freq \ --out haplotype_freq
|
使用VCFtools:
1 2 3 4 5 6 7 8 9
| vcftools --vcf cohort.vcf.gz \ --chr 1 \ --from-bp 1000000 \ --to-bp 2000000 \ --recode \ --out region
|
7.4 受选择基因功能富集
目的:确定受选择基因显著富集的功能类别
分析流程:
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 50 51 52 53 54 55 56 57 58
| selected_genes <- read.table("selected_genes.txt", header=FALSE)$V1
library(clusterProfiler) library(org.At.tair.db)
go_bp <- enrichGO( gene = selected_genes, OrgDb = org.At.tair.db, keyType = "TAIR", ont = "BP", pAdjustMethod = "BH", pvalueCutoff = 0.01, qvalueCutoff = 0.05 )
dotplot(go_bp, showCategory=25) + ggtitle("GO Biological Process Enrichment")
cnetplot(go_bp, showCategory=15) + ggtitle("Gene Concept Network")
goplot(go_bp) + ggtitle("GO Relationship")
kegg <- enrichKEGG( gene = selected_genes, organism = 'atha', pvalueCutoff = 0.05 )
dotplot(kegg, showCategory=20) + ggtitle("KEGG Pathway Enrichment")
genes_pop1 <- read.table("selected_genes_pop1.txt")$V1
genes_pop2 <- read.table("selected_genes_pop2.txt")$V1
go_pop1 <- enrichGO(gene = genes_pop1, OrgDb = org.At.tair.db, ont = "BP", pAdjustMethod = "BH") go_pop2 <- enrichGO(gene = genes_pop2, OrgDb = org.At.tair.db, ont = "BP", pAdjustMethod = "BH")
compare <- compareCluster(gene = list(Population1 = genes_pop1, Population2 = genes_pop2), fun = "enrichGO", OrgDb = org.At.tair.db, ont = "BP")
dotplot(compare, showCategory=20) + ggtitle("GO Enrichment Comparison between Populations")
|
总结
本流程文档详细描述了8000份大豆重测序数据的完整分析pipeline,涵盖了从原始数据到最终发表图表的所有关键步骤:
核心流程
- 数据质控:FastQC和fastp确保数据质量
- 序列比对:BWA-MEM高效比对到参考基因组
- 变异检测:GATK Best Practices流程检测SNP和InDel
- 变异注释:ANNOVAR进行功能注释和效应预测
高级分析
群体遗传学分析
- PCA:评估群体结构
- 系统发育树:重建进化历史
- ADMIXTURE:分析祖先组成
选择信号分析
- 核苷酸多样性(π):遗传多样性评估
- FST:群体分化分析
- XP-CLR/XPEHH:选择信号扫描
- Tajima’s D:中性检验
全基因组关联分析(GWAS)
- 线性混合模型
- 多重检验校正
- 候选基因鉴定
- 功能富集分析
数据可视化
- 曼哈顿图和QQ图(GWAS结果)
- LD衰减曲线
- PCA图和系统发育树
- ADMIXTURE条形图
- FST和π分布图
- 选择信号扫描图
所有分析方法均提供了详细的命令行示例、参数说明和R语言可视化代码,可直接应用于实际数据分析。该流程适用于大豆及其他作物的重测序数据分析,为遗传学研究和分子育种提供了完整的技术方案。