ruby-minigraph 0.0.20.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (89) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE.txt +21 -0
  3. data/README.md +62 -0
  4. data/ext/Rakefile +56 -0
  5. data/ext/cmappy/cmappy.c +7 -0
  6. data/ext/cmappy/cmappy.h +8 -0
  7. data/ext/minigraph/LICENSE.txt +23 -0
  8. data/ext/minigraph/Makefile +66 -0
  9. data/ext/minigraph/NEWS.md +317 -0
  10. data/ext/minigraph/README.md +207 -0
  11. data/ext/minigraph/algo.c +194 -0
  12. data/ext/minigraph/algo.h +33 -0
  13. data/ext/minigraph/asm-call.c +147 -0
  14. data/ext/minigraph/bseq.c +133 -0
  15. data/ext/minigraph/bseq.h +76 -0
  16. data/ext/minigraph/cal_cov.c +139 -0
  17. data/ext/minigraph/doc/example1.png +0 -0
  18. data/ext/minigraph/doc/example2.png +0 -0
  19. data/ext/minigraph/doc/examples.graffle +0 -0
  20. data/ext/minigraph/format.c +241 -0
  21. data/ext/minigraph/galign.c +140 -0
  22. data/ext/minigraph/gchain1.c +532 -0
  23. data/ext/minigraph/gcmisc.c +223 -0
  24. data/ext/minigraph/gfa-aug.c +260 -0
  25. data/ext/minigraph/gfa-base.c +526 -0
  26. data/ext/minigraph/gfa-bbl.c +372 -0
  27. data/ext/minigraph/gfa-ed.c +617 -0
  28. data/ext/minigraph/gfa-io.c +395 -0
  29. data/ext/minigraph/gfa-priv.h +154 -0
  30. data/ext/minigraph/gfa.h +166 -0
  31. data/ext/minigraph/ggen.c +182 -0
  32. data/ext/minigraph/ggen.h +21 -0
  33. data/ext/minigraph/ggsimple.c +570 -0
  34. data/ext/minigraph/gmap.c +211 -0
  35. data/ext/minigraph/index.c +230 -0
  36. data/ext/minigraph/kalloc.c +224 -0
  37. data/ext/minigraph/kalloc.h +82 -0
  38. data/ext/minigraph/kavl.h +414 -0
  39. data/ext/minigraph/kdq.h +134 -0
  40. data/ext/minigraph/ketopt.h +116 -0
  41. data/ext/minigraph/khashl.h +348 -0
  42. data/ext/minigraph/krmq.h +474 -0
  43. data/ext/minigraph/kseq.h +256 -0
  44. data/ext/minigraph/ksort.h +164 -0
  45. data/ext/minigraph/kstring.h +165 -0
  46. data/ext/minigraph/kthread.c +159 -0
  47. data/ext/minigraph/kthread.h +15 -0
  48. data/ext/minigraph/kvec-km.h +105 -0
  49. data/ext/minigraph/kvec.h +110 -0
  50. data/ext/minigraph/lchain.c +441 -0
  51. data/ext/minigraph/main.c +301 -0
  52. data/ext/minigraph/map-algo.c +500 -0
  53. data/ext/minigraph/mgpriv.h +128 -0
  54. data/ext/minigraph/minigraph.1 +359 -0
  55. data/ext/minigraph/minigraph.h +176 -0
  56. data/ext/minigraph/miniwfa.c +834 -0
  57. data/ext/minigraph/miniwfa.h +95 -0
  58. data/ext/minigraph/misc/mgutils.js +1451 -0
  59. data/ext/minigraph/misc.c +12 -0
  60. data/ext/minigraph/options.c +134 -0
  61. data/ext/minigraph/shortk.c +251 -0
  62. data/ext/minigraph/sketch.c +109 -0
  63. data/ext/minigraph/sys.c +147 -0
  64. data/ext/minigraph/sys.h +20 -0
  65. data/ext/minigraph/test/MT-chimp.fa +277 -0
  66. data/ext/minigraph/test/MT-human.fa +239 -0
  67. data/ext/minigraph/test/MT-orangA.fa +276 -0
  68. data/ext/minigraph/test/MT.gfa +19 -0
  69. data/ext/minigraph/tex/Makefile +13 -0
  70. data/ext/minigraph/tex/minigraph.bib +676 -0
  71. data/ext/minigraph/tex/minigraph.tex +986 -0
  72. data/ext/minigraph/tex/plots/CHM13-f1-90.bb.anno.gp +42 -0
  73. data/ext/minigraph/tex/plots/CHM13-f1-90.bb.anno.tbl +13 -0
  74. data/ext/minigraph/tex/plots/CHM13-f1-90.bb.mini-inter-none.win.gp +269 -0
  75. data/ext/minigraph/tex/plots/CHM13-f1-90.bb.mini-inter-none.win.sh +7 -0
  76. data/ext/minigraph/tex/plots/CHM13v1.cen.bed +23 -0
  77. data/ext/minigraph/tex/plots/CHM13v1.size +23 -0
  78. data/ext/minigraph/tex/plots/anno2tbl.js +40 -0
  79. data/ext/minigraph/tex/plots/bedutils.js +367 -0
  80. data/ext/minigraph/tex/plots/chr-plot.js +130 -0
  81. data/ext/minigraph/tex/plots/gen-anno.mak +24 -0
  82. data/ext/minigraph.patch +21 -0
  83. data/lib/minigraph/ffi/constants.rb +230 -0
  84. data/lib/minigraph/ffi/functions.rb +70 -0
  85. data/lib/minigraph/ffi/mappy.rb +8 -0
  86. data/lib/minigraph/ffi.rb +27 -0
  87. data/lib/minigraph/version.rb +5 -0
  88. data/lib/minigraph.rb +72 -0
  89. metadata +159 -0
@@ -0,0 +1,42 @@
1
+ #set t pdfcairo transparent enh font "Helvetica,15"
2
+ set t po eps co so enh "Helvetica,18"
3
+
4
+ set style line 1 lt 1 lc rgb "#FF0000" lw 1;
5
+ set style line 2 lt 1 lc rgb "#00C000" lw 1;
6
+ set style line 3 lt 1 lc rgb "#0080FF" lw 1;
7
+ set style line 4 lt 1 lc rgb "#C000FF" lw 1;
8
+ set style line 5 lt 1 lc rgb "#00EEEE" lw 1;
9
+ set style line 6 lt 1 lc rgb "#FF80FF" lw 1;
10
+
11
+ set style line 1 lt 1 lc rgb "#fbb4ae" lw 1;
12
+ set style line 2 lt 1 lc rgb "#b3cde3" lw 1;
13
+ set style line 3 lt 1 lc rgb "#ccebc5" lw 1;
14
+
15
+ set out "CHM13-f1-90.bb.anno.cnt.eps"
16
+
17
+ set size 1,0.9
18
+
19
+ set style histogram rowstacked
20
+ set xtics rotate by 40 right nomirror font "Helvetica,18"
21
+ set boxwidth 0.8 relative
22
+ set style data histograms
23
+ set style fill solid 1.0 border lt -1
24
+ #set style fill pattern 7 border lt -1
25
+ set ylab "Count ({/Symbol \264}10^3)" off +0.0,0
26
+ set bmargin 5
27
+ set lmargin 8
28
+
29
+ set title "CHM13 minigraph (CHM13 +GRCh38 +44 samples)"
30
+ plot \
31
+ "<cat CHM13-f1-90.bb.anno.tbl" u ($3*1e-3):xtic(2) t '2 alleles' ls 1, \
32
+ "" u ($4*1e-3) t '3 alleles' ls 3, \
33
+ "" u ($5*1e-3) t '>3 alleles' ls 2
34
+
35
+ set out "CHM13-f1-90.bb.anno.len.eps"
36
+
37
+ set ylab "Sum of length on reference (Mbp)" off +0.0,0
38
+ set key top left
39
+ plot \
40
+ "<cat CHM13-f1-90.bb.anno.tbl" u ($6*1e-6):xtic(2) t '2 alleles' ls 1, \
41
+ "" u ($7*1e-6) t '3 alleles' ls 3, \
42
+ "" u ($8*1e-6) t '>3 alleles' ls 2
@@ -0,0 +1,13 @@
1
+ 01_Alu Alu 14298 221 89 4354652 126178 114295
2
+ 02_L1 L1 3947 143 96 7536426 703699 642792
3
+ 03_SVA SVA 1021 399 704 1240723 328180 995325
4
+ 04_ERV ERV 1656 115 127 1009356 204523 1036717
5
+ 05_Mixed-MEI Mixed-MEI 2088 251 137 4625357 1690752 2230499
6
+ 10_Satellite Satellite 3619 747 1109 4148105 3066920 45077097
7
+ 11_VNTR VNTR 5852 4010 8866 737321 838607 11642589
8
+ 12_STR STR 4449 2178 910 392351 252638 879580
9
+ 13_Other-LCR Other-LCR 3882 791 682 388838 159218 2049820
10
+ 20_Mixed-repeat Mixed-repeat 848 185 336 2145808 1171839 7487870
11
+ 21_Partial-repeat Partial-repeat 5240 613 760 13853718 6197517 26833676
12
+ 30_Non-rep-uniq Non-rep-uniq 9175 501 130 788608 73912 43045
13
+ 31_Non-rep-dup Non-rep-dup 878 177 333 441803 74941 1231962
@@ -0,0 +1,269 @@
1
+ set t po eps co so enh "Helvetica,18"
2
+ set out "chr-plot.eps"
3
+ set size 2,1.52
4
+ set multiplot layout 23,1
5
+ set lmargin screen 0.095
6
+ set border 0; unset xtics; unset ytics; set bmargin 0; set tmargin 0.02; set rmargin 0.02
7
+ set style line 1 lc rgb "#377eb8" lw 1
8
+ set style line 2 lc rgb "#e41a1c" lw 1
9
+ set style line 3 lc rgb "#4daf4a" lw 1
10
+ set yran [0:164]
11
+
12
+ set style fill solid 0.8
13
+
14
+ set origin 0,1.4447826086956521
15
+ set xran [0:248.387497]
16
+ set size 2,0.06521739130434782
17
+ set style rect fc lt -1 fs solid 0.15 noborder
18
+ unset obj; unset label
19
+ set obj rect from 116.796216, graph 0 to 147.241828, graph 1
20
+ set label "chr1" at screen 0.01, graph 0.5
21
+ set key at screen 1.95,1.32
22
+ plot \
23
+ "<awk '$1==\"chr1\"' CHM13-f1-90.bb.mini-inter-none.win" u ($2*1e-6):(0):($3) t "VNTR" w filledcu ls 1, \
24
+ "<awk '$1==\"chr1\"' CHM13-f1-90.bb.mini-inter-none.win" u ($2*1e-6):($3):($3+$4) not w filledcu ls 2, \
25
+ "<awk '$1==\"chr1\"' CHM13-f1-90.bb.mini-inter-none.win" u ($2*1e-6):($3+$4):($3+$4+$5) not w filledcu ls 3
26
+ set origin 0,1.3795652173913044
27
+ set xran [0:242.696747]
28
+ set size 1.95417845045558,0.06521739130434782
29
+ set style rect fc lt -1 fs solid 0.15 noborder
30
+ unset obj; unset label
31
+ set obj rect from 85.991672, graph 0 to 99.67301599999999, graph 1
32
+ set label "chr2" at screen 0.01, graph 0.5
33
+ set key at screen 1.95,1.28
34
+ plot \
35
+ "<awk '$1==\"chr2\"' CHM13-f1-90.bb.mini-inter-none.win" u ($2*1e-6):(0):($3) not w filledcu ls 1, \
36
+ "<awk '$1==\"chr2\"' CHM13-f1-90.bb.mini-inter-none.win" u ($2*1e-6):($3):($3+$4) t "Intersperse" w filledcu ls 2, \
37
+ "<awk '$1==\"chr2\"' CHM13-f1-90.bb.mini-inter-none.win" u ($2*1e-6):($3+$4):($3+$4+$5) not w filledcu ls 3
38
+ set origin 0,1.3143478260869565
39
+ set xran [0:201.106605]
40
+ set size 1.619297327191956,0.06521739130434782
41
+ set style rect fc lt -1 fs solid 0.15 noborder
42
+ unset obj; unset label
43
+ set obj rect from 85.80519199999999, graph 0 to 101.415517, graph 1
44
+ set label "chr3" at screen 0.01, graph 0.5
45
+ set key at screen 1.95,1.24
46
+ plot \
47
+ "<awk '$1==\"chr3\"' CHM13-f1-90.bb.mini-inter-none.win" u ($2*1e-6):(0):($3) not w filledcu ls 1, \
48
+ "<awk '$1==\"chr3\"' CHM13-f1-90.bb.mini-inter-none.win" u ($2*1e-6):($3):($3+$4) not w filledcu ls 2, \
49
+ "<awk '$1==\"chr3\"' CHM13-f1-90.bb.mini-inter-none.win" u ($2*1e-6):($3+$4):($3+$4+$5) t "Partial/non-repeat" w filledcu ls 3
50
+ set origin 0,1.2491304347826087
51
+ set xran [0:193.57542999999998]
52
+ set size 1.5586567950318369,0.06521739130434782
53
+ set style rect fc lt -1 fs solid 0.15 noborder
54
+ unset obj; unset label
55
+ set obj rect from 44.705247, graph 0 to 59.870604, graph 1
56
+ set label "chr4" at screen 0.01, graph 0.5
57
+ plot \
58
+ "<awk '$1==\"chr4\"' CHM13-f1-90.bb.mini-inter-none.win" u ($2*1e-6):(0):($3) not w filledcu ls 1, \
59
+ "<awk '$1==\"chr4\"' CHM13-f1-90.bb.mini-inter-none.win" u ($2*1e-6):($3):($3+$4) not w filledcu ls 2, \
60
+ "<awk '$1==\"chr4\"' CHM13-f1-90.bb.mini-inter-none.win" u ($2*1e-6):($3+$4):($3+$4+$5) not w filledcu ls 3
61
+ set origin 0,1.1839130434782608
62
+ set xran [0:182.045437]
63
+ set size 1.4658180399474776,0.06521739130434782
64
+ set style rect fc lt -1 fs solid 0.15 noborder
65
+ unset obj; unset label
66
+ set obj rect from 42.077197, graph 0 to 54.596619, graph 1
67
+ set label "chr5" at screen 0.01, graph 0.5
68
+ plot \
69
+ "<awk '$1==\"chr5\"' CHM13-f1-90.bb.mini-inter-none.win" u ($2*1e-6):(0):($3) not w filledcu ls 1, \
70
+ "<awk '$1==\"chr5\"' CHM13-f1-90.bb.mini-inter-none.win" u ($2*1e-6):($3):($3+$4) not w filledcu ls 2, \
71
+ "<awk '$1==\"chr5\"' CHM13-f1-90.bb.mini-inter-none.win" u ($2*1e-6):($3+$4):($3+$4+$5) not w filledcu ls 3
72
+ set origin 0,1.118695652173913
73
+ set xran [0:172.12687]
74
+ set size 1.3859543823979192,0.06521739130434782
75
+ set style rect fc lt -1 fs solid 0.15 noborder
76
+ unset obj; unset label
77
+ set obj rect from 53.286919999999995, graph 0 to 66.058622, graph 1
78
+ set label "chr6" at screen 0.01, graph 0.5
79
+ plot \
80
+ "<awk '$1==\"chr6\"' CHM13-f1-90.bb.mini-inter-none.win" u ($2*1e-6):(0):($3) not w filledcu ls 1, \
81
+ "<awk '$1==\"chr6\"' CHM13-f1-90.bb.mini-inter-none.win" u ($2*1e-6):($3):($3+$4) not w filledcu ls 2, \
82
+ "<awk '$1==\"chr6\"' CHM13-f1-90.bb.mini-inter-none.win" u ($2*1e-6):($3+$4):($3+$4+$5) not w filledcu ls 3
83
+ set origin 0,1.0534782608695652
84
+ set xran [0:160.567423]
85
+ set size 1.2928784656177763,0.06521739130434782
86
+ set style rect fc lt -1 fs solid 0.15 noborder
87
+ unset obj; unset label
88
+ set obj rect from 55.414367999999996, graph 0 to 68.714496, graph 1
89
+ set label "chr7" at screen 0.01, graph 0.5
90
+ plot \
91
+ "<awk '$1==\"chr7\"' CHM13-f1-90.bb.mini-inter-none.win" u ($2*1e-6):(0):($3) not w filledcu ls 1, \
92
+ "<awk '$1==\"chr7\"' CHM13-f1-90.bb.mini-inter-none.win" u ($2*1e-6):($3):($3+$4) not w filledcu ls 2, \
93
+ "<awk '$1==\"chr7\"' CHM13-f1-90.bb.mini-inter-none.win" u ($2*1e-6):($3+$4):($3+$4+$5) not w filledcu ls 3
94
+ set origin 0,0.9882608695652174
95
+ set xran [0:146.259322]
96
+ set size 1.1776705652780906,0.06521739130434782
97
+ set style rect fc lt -1 fs solid 0.15 noborder
98
+ unset obj; unset label
99
+ set obj rect from 39.243541, graph 0 to 51.325075999999996, graph 1
100
+ set label "chr8" at screen 0.01, graph 0.5
101
+ plot \
102
+ "<awk '$1==\"chr8\"' CHM13-f1-90.bb.mini-inter-none.win" u ($2*1e-6):(0):($3) not w filledcu ls 1, \
103
+ "<awk '$1==\"chr8\"' CHM13-f1-90.bb.mini-inter-none.win" u ($2*1e-6):($3):($3+$4) not w filledcu ls 2, \
104
+ "<awk '$1==\"chr8\"' CHM13-f1-90.bb.mini-inter-none.win" u ($2*1e-6):($3+$4):($3+$4+$5) not w filledcu ls 3
105
+ set origin 0,0.9230434782608696
106
+ set xran [0:150.61727399999998]
107
+ set size 1.2127605118545883,0.06521739130434782
108
+ set style rect fc lt -1 fs solid 0.15 noborder
109
+ unset obj; unset label
110
+ set obj rect from 39.952788999999996, graph 0 to 81.69403299999999, graph 1
111
+ set label "chr9" at screen 0.01, graph 0.5
112
+ plot \
113
+ "<awk '$1==\"chr9\"' CHM13-f1-90.bb.mini-inter-none.win" u ($2*1e-6):(0):($3) not w filledcu ls 1, \
114
+ "<awk '$1==\"chr9\"' CHM13-f1-90.bb.mini-inter-none.win" u ($2*1e-6):($3):($3+$4) not w filledcu ls 2, \
115
+ "<awk '$1==\"chr9\"' CHM13-f1-90.bb.mini-inter-none.win" u ($2*1e-6):($3+$4):($3+$4+$5) not w filledcu ls 3
116
+ set origin 0,0.8578260869565217
117
+ set xran [0:134.758122]
118
+ set size 1.0850636495604287,0.06521739130434782
119
+ set style rect fc lt -1 fs solid 0.15 noborder
120
+ unset obj; unset label
121
+ set obj rect from 34.633784, graph 0 to 46.66458, graph 1
122
+ set label "chr10" at screen 0.01, graph 0.5
123
+ plot \
124
+ "<awk '$1==\"chr10\"' CHM13-f1-90.bb.mini-inter-none.win" u ($2*1e-6):(0):($3) not w filledcu ls 1, \
125
+ "<awk '$1==\"chr10\"' CHM13-f1-90.bb.mini-inter-none.win" u ($2*1e-6):($3):($3+$4) not w filledcu ls 2, \
126
+ "<awk '$1==\"chr10\"' CHM13-f1-90.bb.mini-inter-none.win" u ($2*1e-6):($3+$4):($3+$4+$5) not w filledcu ls 3
127
+ set origin 0,0.792608695652174
128
+ set xran [0:135.127772]
129
+ set size 1.0880400473619651,0.06521739130434782
130
+ set style rect fc lt -1 fs solid 0.15 noborder
131
+ unset obj; unset label
132
+ set obj rect from 46.061948, graph 0 to 59.413484999999994, graph 1
133
+ set label "chr11" at screen 0.01, graph 0.5
134
+ plot \
135
+ "<awk '$1==\"chr11\"' CHM13-f1-90.bb.mini-inter-none.win" u ($2*1e-6):(0):($3) not w filledcu ls 1, \
136
+ "<awk '$1==\"chr11\"' CHM13-f1-90.bb.mini-inter-none.win" u ($2*1e-6):($3):($3+$4) not w filledcu ls 2, \
137
+ "<awk '$1==\"chr11\"' CHM13-f1-90.bb.mini-inter-none.win" u ($2*1e-6):($3+$4):($3+$4+$5) not w filledcu ls 3
138
+ set origin 0,0.7273913043478262
139
+ set xran [0:133.324781]
140
+ set size 1.0735224808839714,0.06521739130434782
141
+ set style rect fc lt -1 fs solid 0.15 noborder
142
+ unset obj; unset label
143
+ set obj rect from 29.62049, graph 0 to 42.202481999999996, graph 1
144
+ set label "chr12" at screen 0.01, graph 0.5
145
+ plot \
146
+ "<awk '$1==\"chr12\"' CHM13-f1-90.bb.mini-inter-none.win" u ($2*1e-6):(0):($3) not w filledcu ls 1, \
147
+ "<awk '$1==\"chr12\"' CHM13-f1-90.bb.mini-inter-none.win" u ($2*1e-6):($3):($3+$4) not w filledcu ls 2, \
148
+ "<awk '$1==\"chr12\"' CHM13-f1-90.bb.mini-inter-none.win" u ($2*1e-6):($3+$4):($3+$4+$5) not w filledcu ls 3
149
+ set origin 0,0.6621739130434783
150
+ set xran [0:114.240146]
151
+ set size 0.9198542388790205,0.06521739130434782
152
+ set style rect fc lt -1 fs solid 0.15 noborder
153
+ unset obj; unset label
154
+ set obj rect from 0, graph 0 to 23.171058, graph 1
155
+ set label "chr13" at screen 0.01, graph 0.5
156
+ plot \
157
+ "<awk '$1==\"chr13\"' CHM13-f1-90.bb.mini-inter-none.win" u ($2*1e-6):(0):($3) not w filledcu ls 1, \
158
+ "<awk '$1==\"chr13\"' CHM13-f1-90.bb.mini-inter-none.win" u ($2*1e-6):($3):($3+$4) not w filledcu ls 2, \
159
+ "<awk '$1==\"chr13\"' CHM13-f1-90.bb.mini-inter-none.win" u ($2*1e-6):($3+$4):($3+$4+$5) not w filledcu ls 3
160
+ set origin 0,0.5969565217391305
161
+ set xran [0:101.219177]
162
+ set size 0.8150102418399908,0.06521739130434782
163
+ set style rect fc lt -1 fs solid 0.15 noborder
164
+ unset obj; unset label
165
+ set obj rect from 0, graph 0 to 17.765925, graph 1
166
+ set label "chr14" at screen 0.01, graph 0.5
167
+ plot \
168
+ "<awk '$1==\"chr14\"' CHM13-f1-90.bb.mini-inter-none.win" u ($2*1e-6):(0):($3) not w filledcu ls 1, \
169
+ "<awk '$1==\"chr14\"' CHM13-f1-90.bb.mini-inter-none.win" u ($2*1e-6):($3):($3+$4) not w filledcu ls 2, \
170
+ "<awk '$1==\"chr14\"' CHM13-f1-90.bb.mini-inter-none.win" u ($2*1e-6):($3+$4):($3+$4+$5) not w filledcu ls 3
171
+ set origin 0,0.5317391304347826
172
+ set xran [0:100.338308]
173
+ set size 0.8079175418398777,0.06521739130434782
174
+ set style rect fc lt -1 fs solid 0.15 noborder
175
+ unset obj; unset label
176
+ set obj rect from 0, graph 0 to 23.279251, graph 1
177
+ set label "chr15" at screen 0.01, graph 0.5
178
+ plot \
179
+ "<awk '$1==\"chr15\"' CHM13-f1-90.bb.mini-inter-none.win" u ($2*1e-6):(0):($3) not w filledcu ls 1, \
180
+ "<awk '$1==\"chr15\"' CHM13-f1-90.bb.mini-inter-none.win" u ($2*1e-6):($3):($3+$4) not w filledcu ls 2, \
181
+ "<awk '$1==\"chr15\"' CHM13-f1-90.bb.mini-inter-none.win" u ($2*1e-6):($3+$4):($3+$4+$5) not w filledcu ls 3
182
+ set origin 0,0.4665217391304348
183
+ set xran [0:96.33049299999999]
184
+ set size 0.7756468756557421,0.06521739130434782
185
+ set style rect fc lt -1 fs solid 0.15 noborder
186
+ unset obj; unset label
187
+ set obj rect from 30.848291, graph 0 to 57.219476, graph 1
188
+ set label "chr16" at screen 0.01, graph 0.5
189
+ plot \
190
+ "<awk '$1==\"chr16\"' CHM13-f1-90.bb.mini-inter-none.win" u ($2*1e-6):(0):($3) not w filledcu ls 1, \
191
+ "<awk '$1==\"chr16\"' CHM13-f1-90.bb.mini-inter-none.win" u ($2*1e-6):($3):($3+$4) not w filledcu ls 2, \
192
+ "<awk '$1==\"chr16\"' CHM13-f1-90.bb.mini-inter-none.win" u ($2*1e-6):($3+$4):($3+$4+$5) not w filledcu ls 3
193
+ set origin 0,0.4013043478260869
194
+ set xran [0:84.277185]
195
+ set size 0.6785944221661044,0.06521739130434782
196
+ set style rect fc lt -1 fs solid 0.15 noborder
197
+ unset obj; unset label
198
+ set obj rect from 18.892709999999997, graph 0 to 32.48723, graph 1
199
+ set label "chr17" at screen 0.01, graph 0.5
200
+ plot \
201
+ "<awk '$1==\"chr17\"' CHM13-f1-90.bb.mini-inter-none.win" u ($2*1e-6):(0):($3) not w filledcu ls 1, \
202
+ "<awk '$1==\"chr17\"' CHM13-f1-90.bb.mini-inter-none.win" u ($2*1e-6):($3):($3+$4) not w filledcu ls 2, \
203
+ "<awk '$1==\"chr17\"' CHM13-f1-90.bb.mini-inter-none.win" u ($2*1e-6):($3+$4):($3+$4+$5) not w filledcu ls 3
204
+ set origin 0,0.33608695652173926
205
+ set xran [0:80.542536]
206
+ set size 0.6485232708794517,0.06521739130434782
207
+ set style rect fc lt -1 fs solid 0.15 noborder
208
+ unset obj; unset label
209
+ set obj rect from 10.965698, graph 0 to 25.93355, graph 1
210
+ set label "chr18" at screen 0.01, graph 0.5
211
+ plot \
212
+ "<awk '$1==\"chr18\"' CHM13-f1-90.bb.mini-inter-none.win" u ($2*1e-6):(0):($3) not w filledcu ls 1, \
213
+ "<awk '$1==\"chr18\"' CHM13-f1-90.bb.mini-inter-none.win" u ($2*1e-6):($3):($3+$4) not w filledcu ls 2, \
214
+ "<awk '$1==\"chr18\"' CHM13-f1-90.bb.mini-inter-none.win" u ($2*1e-6):($3+$4):($3+$4+$5) not w filledcu ls 3
215
+ set origin 0,0.27086956521739136
216
+ set xran [0:61.707359]
217
+ set size 0.4968636484951576,0.06521739130434782
218
+ set style rect fc lt -1 fs solid 0.15 noborder
219
+ unset obj; unset label
220
+ set obj rect from 19.655572, graph 0 to 34.768167999999996, graph 1
221
+ set label "chr19" at screen 0.01, graph 0.5
222
+ plot \
223
+ "<awk '$1==\"chr19\"' CHM13-f1-90.bb.mini-inter-none.win" u ($2*1e-6):(0):($3) not w filledcu ls 1, \
224
+ "<awk '$1==\"chr19\"' CHM13-f1-90.bb.mini-inter-none.win" u ($2*1e-6):($3):($3+$4) not w filledcu ls 2, \
225
+ "<awk '$1==\"chr19\"' CHM13-f1-90.bb.mini-inter-none.win" u ($2*1e-6):($3+$4):($3+$4+$5) not w filledcu ls 3
226
+ set origin 0,0.20565217391304347
227
+ set xran [0:66.210247]
228
+ set size 0.5331206103341023,0.06521739130434782
229
+ set style rect fc lt -1 fs solid 0.15 noborder
230
+ unset obj; unset label
231
+ set obj rect from 21.383653, graph 0 to 37.969530999999996, graph 1
232
+ set label "chr20" at screen 0.01, graph 0.5
233
+ plot \
234
+ "<awk '$1==\"chr20\"' CHM13-f1-90.bb.mini-inter-none.win" u ($2*1e-6):(0):($3) not w filledcu ls 1, \
235
+ "<awk '$1==\"chr20\"' CHM13-f1-90.bb.mini-inter-none.win" u ($2*1e-6):($3):($3+$4) not w filledcu ls 2, \
236
+ "<awk '$1==\"chr20\"' CHM13-f1-90.bb.mini-inter-none.win" u ($2*1e-6):($3+$4):($3+$4+$5) not w filledcu ls 3
237
+ set origin 0,0.1404347826086958
238
+ set xran [0:45.827690999999994]
239
+ set size 0.3690015927009402,0.06521739130434782
240
+ set style rect fc lt -1 fs solid 0.15 noborder
241
+ unset obj; unset label
242
+ set obj rect from 0, graph 0 to 17.078862, graph 1
243
+ set label "chr21" at screen 0.01, graph 0.5
244
+ plot \
245
+ "<awk '$1==\"chr21\"' CHM13-f1-90.bb.mini-inter-none.win" u ($2*1e-6):(0):($3) not w filledcu ls 1, \
246
+ "<awk '$1==\"chr21\"' CHM13-f1-90.bb.mini-inter-none.win" u ($2*1e-6):($3):($3+$4) not w filledcu ls 2, \
247
+ "<awk '$1==\"chr21\"' CHM13-f1-90.bb.mini-inter-none.win" u ($2*1e-6):($3+$4):($3+$4+$5) not w filledcu ls 3
248
+ set origin 0,0.07521739130434789
249
+ set xran [0:51.353905999999995]
250
+ set size 0.41349831710732204,0.06521739130434782
251
+ set style rect fc lt -1 fs solid 0.15 noborder
252
+ unset obj; unset label
253
+ set obj rect from 0, graph 0 to 20.739832999999997, graph 1
254
+ set label "chr22" at screen 0.01, graph 0.5
255
+ plot \
256
+ "<awk '$1==\"chr22\"' CHM13-f1-90.bb.mini-inter-none.win" u ($2*1e-6):(0):($3) not w filledcu ls 1, \
257
+ "<awk '$1==\"chr22\"' CHM13-f1-90.bb.mini-inter-none.win" u ($2*1e-6):($3):($3+$4) not w filledcu ls 2, \
258
+ "<awk '$1==\"chr22\"' CHM13-f1-90.bb.mini-inter-none.win" u ($2*1e-6):($3+$4):($3+$4+$5) not w filledcu ls 3
259
+ set origin 0,0.01
260
+ set xran [0:154.259625]
261
+ set size 1.2420884856374232,0.06521739130434782
262
+ set style rect fc lt -1 fs solid 0.15 noborder
263
+ unset obj; unset label
264
+ set obj rect from 52.820107, graph 0 to 65.927026, graph 1
265
+ set label "chrX" at screen 0.01, graph 0.5
266
+ plot \
267
+ "<awk '$1==\"chrX\"' CHM13-f1-90.bb.mini-inter-none.win" u ($2*1e-6):(0):($3) not w filledcu ls 1, \
268
+ "<awk '$1==\"chrX\"' CHM13-f1-90.bb.mini-inter-none.win" u ($2*1e-6):($3):($3+$4) not w filledcu ls 2, \
269
+ "<awk '$1==\"chrX\"' CHM13-f1-90.bb.mini-inter-none.win" u ($2*1e-6):($3+$4):($3+$4+$5) not w filledcu ls 3
@@ -0,0 +1,7 @@
1
+ gzip -dc CHM13-f1-90.bb.anno.gz | awk '$12~/mini/' | ./bedutils.js window -l CHM13v1.size -w500000 -s100000 -c /dev/stdin > CHM13-f1-90.bb.mini-win
2
+ gzip -dc CHM13-f1-90.bb.anno.gz | awk '$12~/inter|SINE|LINE|SVA|DNA|ERV/' | ./bedutils.js window -l CHM13v1.size -w500000 -s100000 -c /dev/stdin > CHM13-f1-90.bb.inter-win
3
+ gzip -dc CHM13-f1-90.bb.anno.gz | awk '$12~/none|partial|self/' | ./bedutils.js window -l CHM13v1.size -w500000 -s100000 -c /dev/stdin > CHM13-f1-90.bb.none-win
4
+
5
+ paste CHM13-f1-90.bb.mini-win CHM13-f1-90.bb.inter-win CHM13-f1-90.bb.none-win | awk '$1~/^chr([0-9]+|X)$/' | cut -f1-3,6,9 > CHM13-f1-90.bb.mini-inter-none.win
6
+
7
+ ./chr-plot.js -n3 CHM13v1.cen.bed CHM13-f1-90.bb.mini-inter-none.win|gnuplot
@@ -0,0 +1,23 @@
1
+ chr1 116796216 147241828 248387497
2
+ chr2 85991672 99673016 242696747
3
+ chr3 85805192 101415517 201106605
4
+ chr4 44705247 59870604 193575430
5
+ chr5 42077197 54596619 182045437
6
+ chr6 53286920 66058622 172126870
7
+ chr7 55414368 68714496 160567423
8
+ chr8 39243541 51325076 146259322
9
+ chr9 39952789 81694033 150617274
10
+ chr10 34633784 46664580 134758122
11
+ chr11 46061948 59413485 135127772
12
+ chr12 29620490 42202482 133324781
13
+ chr13 0 23171058 114240146
14
+ chr14 0 17765925 101219177
15
+ chr15 0 23279251 100338308
16
+ chr16 30848291 57219476 96330493
17
+ chr17 18892710 32487230 84277185
18
+ chr18 10965698 25933550 80542536
19
+ chr19 19655572 34768168 61707359
20
+ chr20 21383653 37969531 66210247
21
+ chr21 0 17078862 45827691
22
+ chr22 0 20739833 51353906
23
+ chrX 52820107 65927026 154259625
@@ -0,0 +1,23 @@
1
+ chr1 248387497
2
+ chr2 242696747
3
+ chr3 201106605
4
+ chr4 193575430
5
+ chr5 182045437
6
+ chr6 172126870
7
+ chr7 160567423
8
+ chr8 146259322
9
+ chr9 150617274
10
+ chr10 134758122
11
+ chr11 135127772
12
+ chr12 133324781
13
+ chr13 114240146
14
+ chr14 101219177
15
+ chr15 100338308
16
+ chr16 96330493
17
+ chr17 84277185
18
+ chr18 80542536
19
+ chr19 61707359
20
+ chr20 66210247
21
+ chr21 45827691
22
+ chr22 51353906
23
+ chrX 154259625
@@ -0,0 +1,40 @@
1
+ #!/usr/bin/env k8
2
+
3
+ var buf = new Bytes();
4
+ var file = arguments.length == 0? new File() : new File(arguments[0]);
5
+
6
+ var h = {};
7
+ while (file.readline(buf) >= 0) {
8
+ var t = buf.toString().split("\t");
9
+ for (var i = 1; i <= 7; ++i) t[i] = parseInt(t[i]);
10
+ if (t[5]) continue;
11
+ if (t[11] == "gap") continue;
12
+ if (/chrUn|_random/.test(t[0])) continue;
13
+ var na = t[4] < 4? t[4] : 4;
14
+ var type = null;
15
+ if (t[11] == "mini") type = "11_VNTR";
16
+ else if (t[11] == "micro") type = "12_STR";
17
+ else if (t[11] == "micro" || t[11] == "lcr") type = "13_Other-LCR";
18
+ else if (t[11] == "LINE/L1") type = "02_L1";
19
+ else if (t[11] == "SINE/Alu") type = "01_Alu";
20
+ else if (t[11] == "Retroposon/SVA") type = "03_SVA";
21
+ else if (t[11] == "LTR/ERV") type = "04_ERV";
22
+ else if (t[11] == "inter" || /^(DNA|LINE|SINE|LTR)/.test(t[11])) type = "05_Mixed-MEI";
23
+ else if (/^Satellite/.test(t[11]) || t[11] == "alpha" || t[11] == "hsat2/3") type = "10_Satellite";
24
+ else if (t[11] == "self") type = "31_Non-rep-dup";
25
+ else if (t[11] == "none") type = "30_Non-rep-uniq";
26
+ else if (t[11] == "mixed") type = "20_Mixed-repeat";
27
+ else type = "21_Partial-repeat";
28
+ var key = type;
29
+ if (h[key] == null) h[key] = [0, null, 0, 0, 0, 0, 0, 0];
30
+ ++h[key][na];
31
+ h[key][na+3] += t[7];
32
+ }
33
+
34
+ file.close();
35
+ buf.destroy();
36
+
37
+ for (var key in h) {
38
+ var label = key.replace(/^[0-9]+_/, "");
39
+ print(key, label, h[key][2], h[key][3], h[key][4], h[key][5], h[key][6], h[key][7]);
40
+ }