plink 软件提取指定物理区间的数据

 

001、单位bp

复制代码
root@DESKTOP-1N42TVH:/home/test6# ls
outcome.map  outcome.ped
root@DESKTOP-1N42TVH:/home/test6# cut -f 1 outcome.map | uniq -c | head -n 3
   5244 1
   4970 2
   4465 3                         ## 提取 1号染色体 10000000-20000000的数据
root@DESKTOP-1N42TVH:/home/test6# plink --file outcome --chr 1 --from-bp 10000000 --to-bp 20000000  --tab --recode --out test
PLINK v1.90b6.26 64-bit (2 Apr 2022)           www.cog-genomics.org/plink/1.9/
(C) 2005-2022 Shaun Purcell, Christopher Chang   GNU General Public License v3
Logging to test.log.
Options in effect:
  --chr 1
  --file outcome
  --from-bp 10000000
  --out test
  --recode
  --tab
  --to-bp 20000000

Note: --tab flag deprecated.  Use "--recode tab ...".
16007 MB RAM detected; reserving 8003 MB for main workspace.
.ped scan complete (for binary autoconversion).
Performing single-pass .bed write (5244 variants, 440 people).
--file: test-temporary.bed + test-temporary.bim + test-temporary.fam written.
207 out of 5244 variants loaded from .bim file.
440 people (440 males, 0 females) loaded from .fam.
Using 1 thread (no multithreaded calculations invoked).
Before main variant filters, 440 founders and 0 nonfounders present.
Calculating allele frequencies... done.
Total genotyping rate is exactly 1.
207 variants and 440 people pass filters and QC.
Note: No phenotypes present.
--recode ped to test.ped + test.map ... done.
root@DESKTOP-1N42TVH:/home/test6#
root@DESKTOP-1N42TVH:/home/test6# ls
outcome.map  outcome.ped  test.log  test.map  test.ped
root@DESKTOP-1N42TVH:/home/test6# cut -f 1 test.map | uniq -c
    207 1
复制代码

 

002、单位kb

复制代码
root@DESKTOP-1N42TVH:/home/test6# ls
outcome.map  outcome.ped
root@DESKTOP-1N42TVH:/home/test6# plink --file outcome --chr 1 --from-kb 10000 --to-kb 20000 --tab --recode --out test 1> /dev/null
root@DESKTOP-1N42TVH:/home/test6# ls
outcome.map  outcome.ped  test.log  test.map  test.ped
root@DESKTOP-1N42TVH:/home/test6# head -n 5 test.map
1       OAR1_9747314.1  0       10006147
1       OAR1_9804499.1  0       10065777
1       OAR1_9822302.1  0       10085171
1       OAR1_9881817.1  0       10139907
1       OAR1_9944815.1  0       10208873
root@DESKTOP-1N42TVH:/home/test6# tail -n 5 test.map
1       OAR1_19875829.1 0       19755922
1       OAR1_19945652.1 0       19863392
1       OAR1_20007545.1 0       19920691
1       OAR1_20035449.1 0       19951917
1       s05208.1        0       19996057
复制代码

 

 

 

 

003、单位mb

复制代码
root@DESKTOP-1N42TVH:/home/test6# ls
outcome.map  outcome.ped
root@DESKTOP-1N42TVH:/home/test6# plink --file outcome --chr 1 --from-mb 10 --to-mb 20 --tab --recode --out test 1> /dev/null
root@DESKTOP-1N42TVH:/home/test6# ls
outcome.map  outcome.ped  test.log  test.map  test.ped
root@DESKTOP-1N42TVH:/home/test6# head -n 5 test.map
1       OAR1_9747314.1  0       10006147
1       OAR1_9804499.1  0       10065777
1       OAR1_9822302.1  0       10085171
1       OAR1_9881817.1  0       10139907
1       OAR1_9944815.1  0       10208873
root@DESKTOP-1N42TVH:/home/test6# tail -n 5 test.map
1       OAR1_19875829.1 0       19755922
1       OAR1_19945652.1 0       19863392
1       OAR1_20007545.1 0       19920691
1       OAR1_20035449.1 0       19951917
1       s05208.1        0       19996057
复制代码

 

posted @   小鲨鱼2018  阅读(278)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 震惊!C++程序真的从main开始吗?99%的程序员都答错了
· 【硬核科普】Trae如何「偷看」你的代码?零基础破解AI编程运行原理
· 单元测试从入门到精通
· 上周热点回顾(3.3-3.9)
· winform 绘制太阳,地球,月球 运作规律
历史上的今天:
2021-07-20 c语言中sizeof()运算符显示各种数据类型的大小
2021-07-20 c语言中浮点数的舍入错误
2021-07-20 c语言中浮点数的上溢
点击右上角即可分享
微信分享提示