001、
root@PC1:/home/test2# ls test.map root@PC1:/home/test2# cat test.map ## 用一个map文件进行测试,按照染色体打乱顺序 6 snp16 0 312984 1 snp2 0 85204 5 snp15 0 204629 6 snp17 0 380470 8 snp23 0 37314 5 snp13 0 93955 5 snp14 0 184537 1 snp3 0 122948 1 snp1 0 55910 4 snp12 0 281182 7 snp20 0 547068 7 snp19 0 507749 3 snp9 0 234281 3 snp7 0 144010 4 snp11 0 257944 6 snp18 0 412799 2 snp6 0 361433 2 snp4 0 167127 8 snp24 0 145783 8 snp22 0 2459 4 snp10 0 236366 3 snp8 0 199910 2 snp5 0 176079 7 snp21 0 609903 root@PC1:/home/test2# awk '{print > "chr"$1}' test.map ## 按照第一列进行拆分、提取数据 root@PC1:/home/test2# ls chr1 chr2 chr3 chr4 chr5 chr6 chr7 chr8 test.map root@PC1:/home/test2# cat chr1 1 snp2 0 85204 1 snp3 0 122948 1 snp1 0 55910 root@PC1:/home/test2# cat chr5 ## 查看输出结果 5 snp15 0 204629 5 snp13 0 93955 5 snp14 0 184537
原创文章,作者:306829225,如若转载,请注明出处:https://blog.ytso.com/278561.html