plink 軟件中 --recode 01、--recode 12、--output-missing-genotype的作用


1、准備測試數據,8個樣本,8個位點

[root@linuxprobe test]# cat outcome.ped DOR 1       0       0       0       -9      A G     G G     G G     G C     G G     C C     C C     0 0 DOR 2       0       0       0       -9      G G     G G     A G     C C     G G     G C     C C     0 0 DOR 3       0       0       0       -9      G G     G G     A G     G C     C G     C C     G G     0 0 DOR 4       0       0       0       -9 G G G G G G G G C G G G G G G G DOR 5       0       0       0       -9 G G G G A G G C G G C C G G G G DOR 6       0       0       0       -9 G G G G A A C C G G C C G G G G DOR 7       0       0       0       -9 A A G G G G C C G G C C G G A G DOR 9       0       0       0       -9 A A G G G G C C G G C C G G A G [root@linuxprobe test]# cat outcome.map 1       snp1    0       55910
1       snp2    0       85204
1       snp3    0       122948
1       snp4    0       203750
1       snp5    0       312707
1       snp6    0       356863
1       snp7    0       400518
1       snp8    0       487423

 

2、 --recode 01

plink --file outcome --recode 12 --out test;rm *.log *.nosex ## --recode 12 的作用是將次等位基因轉換為1,主等位基因轉換為2,缺失基因型扔為0 [root@linuxprobe test]# cat test.map 1       snp1    0       55910
1       snp2    0       85204
1       snp3    0       122948
1       snp4    0       203750
1       snp5    0       312707
1       snp6    0       356863
1       snp7    0       400518
1       snp8    0       487423 [root@linuxprobe test]# cat test.ped DOR 1 0 0 0 -9 1 2 2 2 2 2 1 2 2 2 2 2 1 1 0 0 DOR 2 0 0 0 -9 2 2 2 2 1 2 2 2 2 2 1 2 1 1 0 0 DOR 3 0 0 0 -9 2 2 2 2 1 2 1 2 1 2 2 2 2 2 0 0 DOR 4 0 0 0 -9 2 2 2 2 2 2 1 1 1 2 1 1 2 2 2 2 DOR 5 0 0 0 -9 2 2 2 2 1 2 1 2 2 2 2 2 2 2 2 2 DOR 6 0 0 0 -9 2 2 2 2 1 1 2 2 2 2 2 2 2 2 2 2 DOR 7 0 0 0 -9 1 1 2 2 2 2 2 2 2 2 2 2 2 2 1 2 DOR 9 0 0 0 -9 1 1 2 2 2 2 2 2 2 2 2 2 2 2 1 2

 

3、--recode 01

[root@linuxprobe test]# plink --file outcome --recode 01 --out test;rm *.log *.nosex ## 直接使用,報錯了 PLINK v1.90b6.19 64-bit (16 Sep 2020)          www.cog-genomics.org/plink/1.9/ (C) 2005-2020 Shaun Purcell, Christopher Chang GNU General Public License v3 Logging to test.log. Options in effect: --file outcome --out test --recode 01

23700 MB RAM detected; reserving 11850 MB for main workspace. .ped scan complete (for binary autoconversion). Performing single-pass .bed write (8 variants, 8 people). --file: test-temporary.bed + test-temporary.bim + test-temporary.fam written. 8 variants loaded from .bim file. 8 people (0 males, 0 females, 8 ambiguous) loaded from .fam. Ambiguous sex IDs written to test.nosex . Using 1 thread (no multithreaded calculations invoked). Before main variant filters, 8 founders and 0 nonfounders present. Calculating allele frequencies... done. Total genotyping rate is 0.953125. 8 variants and 8 people pass filters and QC. Note: No phenotypes present. Error: The --recode '01' modifier normally has to be used with a nonzero --output-missing-genotype setting.

 

4、--recode 01  +  --output-missing-genotype 

plink --file outcome --recode 01 --output-missing-genotype 9 --out test;rm *.log *.nosex  ## 加參數 --output-missing-genotype
[root@linuxprobe test]# cat test.ped  ## 此等位基因變為0,主等位基因變為1,缺失基因型變為9
DOR 1 0 0 0 -9 0 1 1 1 1 1 0 1 1 1 1 1 0 0 9 9
DOR 2 0 0 0 -9 1 1 1 1 0 1 1 1 1 1 0 1 0 0 9 9
DOR 3 0 0 0 -9 1 1 1 1 0 1 0 1 0 1 1 1 1 1 9 9
DOR 4 0 0 0 -9 1 1 1 1 1 1 0 0 0 1 0 0 1 1 1 1
DOR 5 0 0 0 -9 1 1 1 1 0 1 0 1 1 1 1 1 1 1 1 1
DOR 6 0 0 0 -9 1 1 1 1 0 0 1 1 1 1 1 1 1 1 1 1
DOR 7 0 0 0 -9 0 0 1 1 1 1 1 1 1 1 1 1 1 1 0 1
DOR 9 0 0 0 -9 0 0 1 1 1 1 1 1 1 1 1 1 1 1 0 1
[root@linuxprobe test]# cat test.map
1       snp1    0       55910
1       snp2    0       85204
1       snp3    0       122948
1       snp4    0       203750
1       snp5    0       312707
1       snp6    0       356863
1       snp7    0       400518
1       snp8    0       487423

 

 

結論:--recode 12 :將次等位基因變為1,主等位基因變為2

         --recode 01 :需結合--output-missing-genotype使用,將次等位基因變為0,主等位基因變為1,--output-missing-genotype作用是設定缺失基因型的代表字符。


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM