家系分析
可以同时对一整个家系的所有样本进行分析,评估相关的致病位点。家系分析需要先证者(proband)和父母的样本数据。
PED文件
PED文件描述了家系的成员关系,是很多工具的标准输入格式。格式为6列制表符分隔:
FamilyID IndividualID PaternalID MaternalID Sex Phenotype
FAM001 proband father mother 1 2
FAM001 father 0 0 1 1
FAM001 mother 0 0 2 1
各列含义:
- FamilyID:家系标识
- IndividualID:个体标识
- PaternalID:父亲ID(无则填0)
- MaternalID:母亲ID(无则填0)
- Sex:性别(1=男,2=女,0=未知)
- Phenotype:表型(1=正常,2=患病,0=未知)
注意:IndividualID必须与VCF/BAM中的样本名完全一致。
亲缘关系鉴定
在进行家系分析前,需要先验证样本之间的亲缘关系是否正确。使用Peddy进行验证:
peddy \
-p 16 \
--sites GRCH38.sites \
--prefix trio \
trio.vcf.gz \
trio.ped
Peddy会进行三项检查:
- ped_check:验证家系关系是否与声明一致,通过IBS (Identity By State) 计算
- sex_check:验证性别是否与声明一致,通过X染色体杂合率判断
- het_check:检查杂合率异常,排查近亲婚配或样本污染
如果亲缘关系验证不通过,需要排查原因后再进行后续分析。
GVCF合并
对于产生自DeepVariant的GVCF文件来说,需要使用GLNexus进行合并。GLNexus在合并的同时完成联合基因分型,这比GATK的CombineGVCFs + GenotypeGVCFs两步流程更高效:
# 将所有样本的gVCF和索引链接到同一目录
mkdir -p inputs_dir
ln -s proband.g.vcf.gz inputs_dir/
ln -s proband.g.vcf.gz.tbi inputs_dir/
ln -s father.g.vcf.gz inputs_dir/
ln -s father.g.vcf.gz.tbi inputs_dir/
ln -s mother.g.vcf.gz inputs_dir/
ln -s mother.g.vcf.gz.tbi inputs_dir/
# 使用GLNexus进行联合基因分型
glnexus_cli \
--config DeepVariantWES \
--threads 16 \
inputs_dir/*.g.vcf.gz > trio.glnexus.bcf
# 转换为VCF.gz并建立索引
bcftools view --threads 16 -O z -o trio.glnexus.vcf.gz trio.glnexus.bcf
bcftools index -t trio.glnexus.vcf.gz
--config DeepVariantWES是专门为DeepVariant WES数据优化的配置,与DeepVariant配合使用效果最佳。
注意:GLNexus的输入必须是DeepVariant或GATK HaplotypeCaller产生的GVCF文件。
单倍型定相
在联合基因分型后,使用先证者的BAM文件进行read-backed单倍型定相。这有助于确认从父母遗传的变异是否位于同一条染色体上:
whatshap phase \
--reference=GRCh38.d1.vd1.fa \
-o trio.phase.vcf \
trio.glnexus.vcf.gz \
bam/proband.markdup.bam
bgzip -f trio.phase.vcf
tabix -f -p vcf trio.phase.vcf.gz
左对齐和过滤
与单样本流程一致,进行左对齐和过滤:
gatk LeftAlignAndTrimVariants \
-R GRCh38.d1.vd1.fa \
-V trio.phase.vcf.gz \
-O trio.left.vcf.gz \
--split-multi-allelics
bcftools view -f 'PASS,.' trio.left.vcf.gz -Oz -o trio.final.vcf.gz
bcftools index -t trio.final.vcf.gz
家系变异分析
使用VEP对联合分型后的VCF进行注释,然后生成报告。报告会自动处理多个样本的基因型信息:
# VEP注释(与单样本流程相同)
vep \
--offline --cache \
--dir_cache cache_dir --merged \
--dir_plugins /opt/vep/.vep/Plugins \
-i trio.final.vcf.gz -o trio.vep.vcf \
--format vcf --vcf \
--fa GRCh38.d1.vd1.fa \
--assembly GRCh38 --symbol --hgvs \
--transcript_filter "stable_id match N[MR]_" \
--custom file=schema_bundle/hg38_clinvar_20260415.vcf.gz,short_name=ClinVar,format=vcf,type=exact,coords=0,fields=CLNSIG%CLNDN%CLNREVSTAT%CLNSTAR \
--custom file=schema_bundle/hg38_gnomad.v4.1.filtered.vcf.gz,short_name=GnomAD,format=vcf,type=exact,coords=0,fields=AC_joint%AN_joint%AF_joint%AF_joint_eas
# 生成报告
python3 vep_report.py \
-i trio.vep.vcf.gz \
-o report/trio.snv_indel.txt \
--gencc assets/gencc-submissions.xlsx \
-t assets/transcripts.json \
--sex male \
-n proband,father,mother
报告会显示每个变异在三个样本中的基因型,便于判断遗传模式(如de novo突变、复合杂合、纯合等)。
UPD检测
在获得家系数据后,可以检测UPD (单亲二倍体)。原理是比较先证者的ROH区域与父母的ROH模式:
# 对每个样本分别检测ROH
bash AutoMap_v1.3.sh --vcf proband.vcf --genome hg38 --out roh/proband --id proband
bash AutoMap_v1.3.sh --vcf father.vcf --genome hg38 --out roh/father --id father
bash AutoMap_v1.3.sh --vcf mother.vcf --genome hg38 --out roh/mother --id mother
# 生成ROH报告
python3 roh_report.py -i roh/proband/proband.HomRegions.tsv -o report/proband.roh.anno.txt -g assets/gencc-submissions.xlsx -b assets/Gencode.GRCh38.cnvkit.target.bed
python3 roh_report.py -i roh/father/father.HomRegions.tsv -o report/father.roh.anno.txt -g assets/gencc-submissions.xlsx -b assets/Gencode.GRCh38.cnvkit.target.bed
python3 roh_report.py -i roh/mother/mother.HomRegions.tsv -o report/mother.roh.anno.txt -g assets/gencc-submissions.xlsx -b assets/Gencode.GRCh38.cnvkit.target.bed
# UPD检测
python3 upd_detection.py \
-p report/proband.roh.anno.txt \
-f report/father.roh.anno.txt \
-m report/mother.roh.anno.txt \
-o report/trio.upd_report.txt
如果先证者的某个ROH区域与父亲的ROH重叠但与母亲不重叠,则该区域可能为父源UPD;反之为母源UPD。