乡下人产国偷v产偷v自拍,国产午夜片在线观看,婷婷成人亚洲综合国产麻豆,久久综合给合久久狠狠狠9

  • <output id="e9wm2"></output>
    <s id="e9wm2"><nobr id="e9wm2"><ins id="e9wm2"></ins></nobr></s>

    • 分享

      筆記 | GWAS 操作流程2-6:去掉親緣關(guān)系近的個(gè)體

       育種數(shù)據(jù)分析 2021-11-18

      這是使用plink學(xué)習(xí)GWAS中質(zhì)控的最后一篇,后面是使用GLM和MLM模型進(jìn)行建模,以及對(duì)結(jié)果的整理和可視化。

      這里,我們要對(duì)一些親子關(guān)系的個(gè)體,進(jìn)行一下過(guò)濾,計(jì)算類(lèi)似IBS的結(jié)果。

      「注意:」

      ?

      這里講親子關(guān)系的個(gè)體移除,不是必須要的,比如我們分析的群體里面有親子關(guān)系的個(gè)體,想要進(jìn)行分析,不需要做這一步的篩選。

      ?

      1. 計(jì)算pihat > 0.2的組合

      plink --bfile HapMap_3_r3_10 --genome --min 0.2 --out pihat_min0.2

      說(shuō)明文檔:

      --genome invokes an IBS/IBD computation, and then writes a report with the following fields to plink.genome:

      FID1Family ID for first sample
      IID1Individual ID for first sample
      FID2Family ID for second sample
      IID2Individual ID for second sample
      RTRelationship type inferred from .fam/.ped file
      EZIBD sharing expected value, based on just .fam/.ped relationship
      Z0P(IBD=0)
      Z1P(IBD=1)
      Z2P(IBD=2)
      PI_HATProportion IBD, i.e. P(IBD=2) + 0.5*P(IBD=1)
      PHEPairwise phenotypic code (1, 0, -1 = AA, AU, and UU pairs, respectively)
      DSTIBS distance, i.e. (IBS2 + 0.5*IBS1) / (IBS0 + IBS1 + IBS2)
      PPCIBS binomial test
      RATIOHETHET : IBS0 SNP ratio (expected value 2)

      2. 提取Z1大于0.9的個(gè)體

      awk '{if($8>0.9) print $0}' pihat_min0.2.genome > zoom_pihat.genome

      過(guò)濾出91個(gè)組合:

      3. 作圖

      R代碼

      pdf("relatedness.pdf")
      relatedness = read.table("pihat_min0.2.genome", header=T)
      par(pch=16, cex=1)
      with(relatedness,plot(Z0,Z1, xlim=c(0,1), ylim=c(0,1), type="n"))
      with(subset(relatedness,RT=="PO") , points(Z0,Z1,col=4))
      with(subset(relatedness,RT=="UN") , points(Z0,Z1,col=3))
      legend(1,1, xjust=1, yjust=1, legend=levels(relatedness$RT), pch=16, col=c(4,3))

      pdf("zoom_relatedness.pdf")
      relatedness_zoom = read.table("zoom_pihat.genome", header=T)
      par(pch=16, cex=1)
      with(relatedness_zoom,plot(Z0,Z1, xlim=c(0,0.02), ylim=c(0.98,1), type="n"))
      with(subset(relatedness_zoom,RT=="PO") , points(Z0,Z1,col=4))
      with(subset(relatedness_zoom,RT=="UN") , points(Z0,Z1,col=3))
      legend(0.02,1, xjust=1, yjust=1, legend=levels(relatedness$RT), pch=16, col=c(4,3))

      pdf("hist_relatedness.pdf")
      relatedness = read.table("pihat_min0.2.genome", header=T)
      hist(relatedness[,10],main="Histogram relatedness", xlab= "Pihat")
      dev.off()

      這里的PO為:親子關(guān)系 這里的UN為:非親緣關(guān)系

      4. 刪除親子關(guān)系的個(gè)體

      plink --bfile HapMap_3_r3_10 --filter-founders --make-bed --out HapMap_3_r3_11

      日志:

      PLINK v1.90b6.5 64-bit (13 Sep 2018) www.cog-genomics.org/plink/1.9/
      (C) 2005-2018 Shaun Purcell, Christopher Chang GNU General Public License v3
      Logging to HapMap_3_r3_11.log.
      Options in effect:
      --bfile HapMap_3_r3_10
      --filter-founders
      --make-bed
      --out HapMap_3_r3_11

      515185 MB RAM detected; reserving 257592 MB for main workspace.
      1073743 variants loaded from .bim file.
      161 people (77 males, 84 females) loaded from .fam.
      110 phenotype values loaded from .fam.
      51 people removed due to founder status (--filter-founders).
      Using 1 thread (no multithreaded calculations invoked).
      Before main variant filters, 110 founders and 0 nonfounders present.
      Calculating allele frequencies... done.
      Total genotyping rate in remaining samples is 0.998016.
      1073743 variants and 110 people pass filters and QC.
      Among remaining phenotypes, 55 are cases and 55 are controls.
      --make-bed to HapMap_3_r3_11.bed + HapMap_3_r3_11.bim + HapMap_3_r3_11.fam ...
      done.

      可以看出,51個(gè)個(gè)體被移除。

      5. 結(jié)果文件

      HapMap_3_r3_11.bed HapMap_3_r3_11.bim HapMap_3_r3_11.fam HapMap_3_r3_11.log

      6. 注意

      這里講親子關(guān)系的個(gè)體移除,不是必須要的,比如我們分析的群體里面有親子關(guān)系的個(gè)體,想要進(jìn)行分析,不需要做這一步的篩選。

      相關(guān)系列:

      筆記 | GWAS 操作流程1:下載數(shù)據(jù)

      筆記 | GWAS 操作流程2-1:缺失質(zhì)控

      筆記 | GWAS 操作流程2-2:性別質(zhì)控

      筆記 | GWAS 操作流程2-3:MAF過(guò)濾

      筆記 | GWAS 操作流程2-4:哈溫平衡檢驗(yàn)

      筆記 | GWAS 操作流程2-5:雜合率檢驗(yàn)

        轉(zhuǎn)藏 分享 獻(xiàn)花(0

        0條評(píng)論

        發(fā)表

        請(qǐng)遵守用戶(hù) 評(píng)論公約

        類(lèi)似文章