样本数据集

来自1000个基因组项目第3阶段第5版的504名EAS个体

  • -CHB:中国北京的汉族人
    -JPT:日本东京的日本人
    -CHS:南方汉族
    -CDX:中国西双版纳的中国傣族
    -KHV:金在胡志明市,越南

Url: http://ftp.1000genomes.ebi.ac.uk/vol1/ftp/release/20130502/

Genome build: human_g1k_v37.fasta (hg19)

基因组构建:人类_g1k_v37.fasta(hg19)

基因型数据处理

  • Selected only autosomal variants
  • Split multi-allelic variants
  • Variants were normalized
  • Remove duplicated variants
  • Selected only SNP (ATCG)
  • Selected 2% rare SNPs (plink --mac 2 --max--maf 0.01 --thin 0.02)
  • Selected 15% common SNPs (plink --maf 0.01 --thin 0.15)
  • Converted to plink bed format and merged to a single file
  • Randomly added some missing data points
  • -仅选择常染色体变异
    -分裂多等位基因变体
    -变异已标准化
    -删除重复的变体
    -仅选择SNP(ATCG)
    -选定的2%罕见SNP(“plink-mac 2-max-maf 0.01-thin 0.02”)
    -选定15%的常见SNP(“plink-maf 0.01-thin 0.15”)
    -转换为bed格式并合并为单个文件
    -随机添加了一些缺失的数据点

下载

note
The sample dataset 1KG.EAS.auto.snp.norm.nodup.split.rare002.common015.missing.zip has been included in 01_Dataset when you clone the repository. There is no need to download it again if you clone this repository.

样本数据集’1KG。克隆存储库时,EAS.auto.snp.norm.nodup.split.rare002.common015.inmissing.zip已包含在“01_Dataset”中。如果克隆此存储库,则无需再次下载。

You can also simply run download_sampledata.sh in 01_Dataset and the dataset will be downloaded and decompressed.

您也可以简单地在“01_Dataset”中运行“download_sampledata.sh”,数据集将被下载并解压缩。

1
./download_sampledata.sh

warning “Sample dataset is currently hosted on Dropbox which may not be accessible for users in certain regions.”

or you can manually download it from this link.

Unzip the dataset unzip -j 1KG.EAS.auto.snp.norm.nodup.split.rare002.common015.missing.zip, and you will get the following files:

警告“示例数据集当前托管在Dropbox上,某些地区的用户可能无法访问。”
或者您可以从[此链接]手动下载(https://www.dropbox.com/scl/fi/41ep8xbdccp9xw5epim19/1KG.EAS.auto.snp.norm.nodup.split.rare002.common015.missing.zip?rlkey=tklapxwypeg79b1sx03o6ycs7&dl=1).
解压缩数据集Unzip 1KG.EAS.auto.snp.norm.nodup.split.rare002.common015.inmissing.zip,您将获得以下文件:

1
2
3
1KG.EAS.auto.snp.norm.nodup.split.rare002.common015.missing.bed
1KG.EAS.auto.snp.norm.nodup.split.rare002.common015.missing.bim
1KG.EAS.auto.snp.norm.nodup.split.rare002.common015.missing.fam

表型模拟

Phenotypes were simply simulated using GCTA with the 1KG EAS dataset.

使用GCTA和1KG EAS数据集简单模拟表型。

1
2
3
4
5
6
7
8
9
10
11
12
13
14
gcta  \
--bfile 1KG.EAS.auto.snp.norm.nodup.split.rare002.common015 \
--simu-cc 250 254 \
--simu-causal-loci causal.snplist \
--simu-hsq 0.8 \
--simu-k 0.5 \
--simu-rep 1 \
--out 1kgeas_binary
$ cat causal.snplist
2:55620927:G:A 3
8:97094292:C:T 3
20:42758834:T:C 3
7:134326056:G:T 3
1:167562605:G:A 3

warning
This simulation is just used for showing the analysis pipeline and data format. The trait was simulated under an unreal condition (effect sizes are extremely large) so the result itself is meaningless.

此模拟仅用于显示分析管道和数据格式。该特征是在不真实的条件下模拟的(效果大小非常大),因此结果本身毫无意义。

​ Allele frequency and Effect size

等位基因频率和效应大小

Reference

  • 1000 Genomes Project Consortium. (2015). A global reference for human genetic variation. Nature, 526(7571), 68.
  • Yang, J., Lee, S. H., Goddard, M. E., & Visscher, P. M. (2011). GCTA: a tool for genome-wide complex trait analysis. The American Journal of Human Genetics, 88(1), 76-82.

PED与BED文件格式在遗传数据分析中的主要区别

文件结构与编码

  • PED格式:纯文本文件,包含样本系谱信息和基因型数据。前6列为固定系谱字段(家系ID、个体ID、父ID、母ID、性别、表型),后续每两列表示一个SNP的两个等位基因(用1/2或A/C/G/T表示)。例如:
    1
    FAM001  ID001  0  0  1  0  A A  G T  1 2
  • BED格式:二进制文件(需配合.bim/.fam使用),采用紧凑的比特编码。每个基因型用2比特表示:
    $00$=homozygous1, $01$=缺失, $10$=杂合, $11$=homozygous2。无法直接阅读,需专用工具解析

存储效率

  • BED文件大小通常比PED小3-10倍(相同数据集)。例如10万样本×50万SNP的数据:
    PED约100-500GB,BED仅需10-50GB
  • BED的二进制结构减少磁盘I/O,加速数据分析流程

数据处理性能

  • BED格式读取速度比PED快5-20倍(尤其在大规模GWAS中)
  • PLINK处理BED的运算耗时通常为PED的$1/3$到$1/5$
  • 内存消耗:BED加载时内存占用降低30-50%

应用场景差异

  • PED适用
    • 小型数据集或交互式分析
    • 需要人工查看/编辑基因型的场景
    • 与传统软件兼容(如FAMOZ, MERLIN)
  • BED适用
    • 百万级样本的GWAS研究
    • 云计算/高性能计算环境
    • PLINK/SAIGE等现代工具流水线

数据完整性

  • PED直接包含表型和系谱数据
  • BED需配套.fam(样本信息)和.bim(位点信息)文件:
    1
    2
    3
    4
    # snp.bim示例
    1 rs123 0 100500 A G
    # snp.fam示例
    FAM001 ID001 0 0 1 0