- 论坛徽章:
- 1
|
回复 6# zxy877298415
请问i+=6是什么意思?我跑了我的例子没问题,可是换了个大点的文件结果就不是我想要的了,请帮忙看看哪里出了问题? 哎,照猫画虎都不成。。。
文件的样子
>g1_ENSRNOG00000013436_451a 0 -1 g1_ENSRNOG00000013436_451a Yes
V$GFI1_Q6_01 12 10 21 g1_ENSRNOG00000013436_451a Yes
V$SMAD4_Q6_01 29 7 35 g1_ENSRNOG00000013436_451a Yes
V$GKLF_Q4 34 7 40 g1_ENSRNOG00000013436_451a Yes
V$YY1_Q6_03 37 7 43 g1_ENSRNOG00000013436_451a Yes
V$NANOG_01 48 12 59 g1_ENSRNOG00000013436_451a Yes
V$CDX2_01 63 16 78 g1_ENSRNOG00000013436_451a Yes
V$BBX_04 64 17 80 g1_ENSRNOG00000013436_451a Yes
V$BBX_04 65 17 81 g1_ENSRNOG00000013436_451a Yes
V$FREAC3_01 65 16 80 g1_ENSRNOG00000013436_451a Yes
V$AIRE_01 71 26 96 g1_ENSRNOG00000013436_451a Yes
V$TEF1_Q6_04 75 11 85 g1_ENSRNOG00000013436_451a Yes
V$IK_Q5_01 78 7 84 g1_ENSRNOG00000013436_451a Yes
V$YY1_Q6_03 79 7 85 g1_ENSRNOG00000013436_451a Yes
V$IK_Q5_01 83 7 89 g1_ENSRNOG00000013436_451a Yes
V$RFX1_01 107 17 123 g1_ENSRNOG00000013436_451a Yes
V$CHCH_01 111 6 116 g1_ENSRNOG00000013436_451a Yes
V$MYB_05 114 17 130 g1_ENSRNOG00000013436_451a Yes
V$RFX_Q6 115 9 123 g1_ENSRNOG00000013436_451a Yes
V$NANOG_01 116 12 127 g1_ENSRNOG00000013436_451a Yes
V$MYB_Q4 116 12 127 g1_ENSRNOG00000013436_451a Yes
V$CPBP_Q6 120 7 126 g1_ENSRNOG00000013436_451a Yes
V$TBX5_01 120 12 131 g1_ENSRNOG00000013436_451a Yes
V$CHCH_01 121 6 126 g1_ENSRNOG00000013436_451a Yes
V$CDX2_01 122 16 137 g1_ENSRNOG00000013436_451a Yes
V$TATA_01 127 15 141 g1_ENSRNOG00000013436_451a Yes
V$CDX2_Q5_02 128 6 133 g1_ENSRNOG00000013436_451a Yes
V$TBX5_01 129 12 140 g1_ENSRNOG00000013436_451a Yes
跑出来的结果
awk -v RS=">" 'NR>1{print ">"$1;for(i=2;i<=NF;i+=6) {a[$i]++} for(i in a) {print i,a} delete a;}' g1a_tf_yes
>g1_ENSRNOG00000013436_451a
6 5
26 1
7 15
8 3
9 2
10 11
11 4
12 9
13 1
14 6
15 7
16 4
17 5
19 1
20 4
0 1
>g1_ENSRNOG00000016371_102a
5 2
6 19
7 50
8 47
|
|