GWAS | 全基因组关联分析 | PLINK | 实战 | 统计遗传学

参考:PLINK | File format reference

vcftools

 

plink的主要功能:数据处理,质量控制的基本统计,群体分层分析,单位点的基本关联分析,家系数据的传递不平衡检验,多点连锁分析,单倍体关联分析,拷贝数变异分析,Meta分析等等。

 

首先必须了解plink的三种格式:bed、fam和bim。(注意:这里的bed和我们genome里的区域文件bed完全不同)

plink需要的格式一般可以从vcf文件转化而来 (顺便了解一下ped和map两种格式):

PED: Original standard text format for sample pedigree information and genotype calls. Normally must be accompanied by a .map file. 谱系信息和基因型信息。每一行是一个人。

MAP: Variant information file accompanying a .ped text pedigree + genotype table. 变异信息。每一行是一个变异 | snp。

# PED
     1 1 0 0 1  0    G G    2 2    C C
     1 2 0 0 1  0    A A    0 0    A C
     1 3 1 2 1  2    0 0    1 2    A C
     2 1 0 0 1  0    A A    2 2    0 0
     2 2 0 0 1  2    A A    2 2    0 0
     2 3 1 2 1  2    A A    2 2    A A
# MAP 
     1 snp1 0 1
     1 snp2 0 2
     1 snp3 0 3
# vcf转ped和map
plink --vcf file.vcf --recode --out file
# ped和map转bed、bim和fam
plink --file test --make-bed --out test

  

三种格式的官方介绍

bed文件(真实的bed文件是二进制的,比较难读)

bed:Primary representation of genotype calls at biallelic variants. Must be accompanied by .bim and .fam files. Loaded with --bfile; generated in many situations, most notably when the --make-bed command is used. Do not confuse this with the UCSC Genome Browser's BED format, which is totally different. 基因型信息。所以转换后就是一个matrix,每一行是一个个体,每一列就是一个变异。其中0、1、2分别对应了aa、Aa或aA和AA。不考虑碱基型,因为我们不关注ATGC的变化。

fam:Sample information file accompanying a .bed binary genotype table. 样本信息。每一行就是一个样本。

bim:Extended variant information file accompanying a .bed binary genotype table. 每一行是一个变异,及其注释信息。

 

             rs497038
  • 11
    点赞
  • 79
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值