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 @ 2022-07-20 09:45  小鲨鱼2018  阅读(308)  评论(0)    收藏  举报