plink软件删除非ATCG的位点

1、测试数据

root@PC1:/home/test# ls
test.map  test.ped
root@PC1:/home/test# cat test.map   ## 测试数据中一共包含有5个位点
2       snp1    0       209225353
2       snp2    0       209233002
2       snp3    0       209237381
13      snp4    0       63047423
13      snp5    0       63047428
root@PC1:/home/test# cat test.ped   ## 最后两个位点中包含有I和D
3998953053      idv1    0       0       0       -9      A A     A A     A A     D I     D I
3998953053      idv2    0       0       0       -9      A A     G A     A A     D I     D I
3998953053      idv3    0       0       0       -9      A A     A A     A A     I I     I I
3998953053      idv4    0       0       0       -9      C A     G A     A A     I I     I I
3998953053      idv5    0       0       0       -9      A A     G A     A A     I I     I I
3998953053      idv6    0       0       0       -9      C C     G A     A A     I I     I I

 

2、使用plink软件删除包含I和D的位点

root@PC1:/home/test# ls
test.map  test.ped
root@PC1:/home/test# cat test.map
2       snp1    0       209225353
2       snp2    0       209233002
2       snp3    0       209237381
13      snp4    0       63047423
13      snp5    0       63047428
root@PC1:/home/test# cat test.ped
3998953053      idv1    0       0       0       -9      A A     A A     A A     D I     D I
3998953053      idv2    0       0       0       -9      A A     G A     A A     D I     D I
3998953053      idv3    0       0       0       -9      A A     A A     A A     I I     I I
3998953053      idv4    0       0       0       -9      C A     G A     A A     I I     I I
3998953053      idv5    0       0       0       -9      A A     G A     A A     I I     I I
3998953053      idv6    0       0       0       -9      C C     G A     A A     I I     I I
root@PC1:/home/test# plink --file test --snps-only just-acgt --recode tab --out result    ## 使用--snps-only just-acgt参数删除非actg位点
PLINK v1.90b6.24 64-bit (6 Jun 2021)           www.cog-genomics.org/plink/1.9/
(C) 2005-2021 Shaun Purcell, Christopher Chang   GNU General Public License v3
Logging to result.log.
Options in effect:
  --file test
  --out result
  --recode tab
  --snps-only just-acgt

15967 MB RAM detected; reserving 7983 MB for main workspace.
.ped scan complete (for binary autoconversion).
Performing single-pass .bed write (5 variants, 6 people).
--file: result-temporary.bed + result-temporary.bim + result-temporary.fam
written.
3 out of 5 variants loaded from .bim file.
6 people (0 males, 0 females, 6 ambiguous) loaded from .fam.
Ambiguous sex IDs written to result.nosex .
Using 1 thread (no multithreaded calculations invoked).
Before main variant filters, 6 founders and 0 nonfounders present.
Calculating allele frequencies... done.
Total genotyping rate is exactly 1.
3 variants and 6 people pass filters and QC.
Note: No phenotypes present.
--recode ped to result.ped + result.map ... done.
root@PC1:/home/test# ls
result.log  result.map  result.nosex  result.ped  test.map  test.ped
root@PC1:/home/test# cat result.map  ##查看结果
2       snp1    0       209225353
2       snp2    0       209233002
2       snp3    0       209237381
root@PC1:/home/test# cat result.ped   ## 查看结果
3998953053      idv1    0       0       0       -9      A A     A A     A A
3998953053      idv2    0       0       0       -9      A A     G A     A A
3998953053      idv3    0       0       0       -9      A A     A A     A A
3998953053      idv4    0       0       0       -9      C A     G A     A A
3998953053      idv5    0       0       0       -9      A A     G A     A A
3998953053      idv6    0       0       0       -9      C C     G A     A A

 

posted @ 2022-03-23 18:24  小鲨鱼2018  阅读(324)  评论(0编辑  收藏  举报