Skip to content

Instantly share code, notes, and snippets.

@nimezhu
Created April 18, 2014 02:04
Show Gist options
  • Save nimezhu/11021250 to your computer and use it in GitHub Desktop.
Save nimezhu/11021250 to your computer and use it in GitHub Desktop.
bam2x aggregation plot render V0.1

bam2x aggregation plot render

pos_to_tts aggregation_mean gini_coefficient
-500 19.8451103398 0.968160340506
-499 20.2092475241 0.968717385255
-498 20.8113874471 0.969570277967
-497 21.37655638 0.970216706113
-496 21.82495303 0.970704370853
-495 22.1755246314 0.970976615057
-494 22.2932840811 0.97099735751
-493 22.3475782569 0.970898064501
-492 22.1542209343 0.97062654212
-491 22.1706206413 0.970652919049
-490 22.2401999809 0.970706353659
-489 22.404451804 0.970773647209
-488 22.381110085 0.970537873833
-487 22.4032735726 0.970486470591
-486 21.6373594879 0.969320707454
-485 21.6568480718 0.969150454956
-484 21.7332102028 0.969136130149
-483 21.7163009904 0.968991561848
-482 21.6865586091 0.968743300419
-481 21.7080852148 0.968602723876
-480 21.6212463777 0.968365951017
-479 21.5648823361 0.968175142502
-478 21.6145272745 0.968174178556
-477 21.5243448078 0.967968574843
-476 21.4094194822 0.967734549845
-475 20.8649173646 0.966865214195
-474 20.0637837149 0.965438574261
-473 19.7992230042 0.964873493304
-472 19.9115052702 0.964789928566
-471 19.945260007 0.964914981171
-470 19.7528898513 0.964603644789
-469 21.6580899914 0.967623856485
-468 21.7637168423 0.967646060655
-467 21.9030028978 0.967736344272
-466 19.1859058052 0.963220711191
-465 19.0783364647 0.963013534422
-464 19.0180874439 0.962810698853
-463 19.0142343088 0.962689450232
-462 18.6416902844 0.961979588904
-461 18.1053720982 0.96085947142
-460 18.2908957743 0.961133599272
-459 18.5281342547 0.961555961856
-458 18.6597777282 0.961684292344
-457 18.8140305066 0.961787924914
-456 18.9802566634 0.962162397863
-455 19.0573512085 0.962169209817
-454 19.1520555361 0.962174177469
-453 19.3079323632 0.96234161105
-452 19.476992644 0.962427619301
-451 19.4493838168 0.96225692257
-450 19.3528962201 0.962055941089
-449 19.4296723243 0.962147026912
-448 19.4304365825 0.96210495474
-447 19.5019584116 0.962115539833
-446 19.6556698405 0.962253672299
-445 19.6924179219 0.96209035993
-444 19.9014743814 0.962287997494
-443 20.077062701 0.962529133798
-442 20.2787631755 0.962840117951
-441 20.4600197433 0.962993408556
-440 19.7285609655 0.961557682043
-439 19.9094990924 0.9617857687
-438 19.9533165621 0.961796672082
-437 20.1448906155 0.961995827188
-436 20.4116485686 0.962140157179
-435 20.5267012706 0.962143630408
-434 20.7111104035 0.962189750265
-433 20.8469572971 0.962208610559
-432 21.1644428876 0.962454042882
-431 21.2499761169 0.962298943446
-430 21.3377702767 0.962256030162
-429 21.2007451517 0.962009723349
-428 21.4756870363 0.962280962018
-427 21.5539598128 0.962055949996
-426 21.6512116677 0.962074022195
-425 21.6874820877 0.961836598435
-424 21.6684393211 0.961510153689
-423 21.8108779416 0.961563698428
-422 21.9240199981 0.961595280633
-421 22.0458873356 0.961503937476
-420 22.070088845 0.961477913389
-419 22.1173136325 0.961422465358
-418 22.2360920931 0.961220824133
-417 22.0168136802 0.960702734785
-416 22.3059580295 0.960784333983
-415 22.4125402032 0.960603137848
-414 22.6716555743 0.960653514053
-413 22.7719326179 0.960655133635
-412 22.7706588542 0.960561760729
-411 22.533484062 0.959968458963
-410 22.4342260294 0.959613953628
-409 22.4971499538 0.959548170034
-408 22.5555838614 0.95957869402
-407 22.7044868325 0.959572544838
-406 22.6692672675 0.959376305895
-405 22.6786294303 0.95924958206
-404 22.7504060122 0.959198534276
-403 22.699455466 0.958964664362
-402 22.7183071681 0.958694176253
-401 22.8054007579 0.958733199369
-400 22.7803713021 0.958471976237
-399 23.027545139 0.958504838506
-398 22.8467025443 0.957991223011
-397 23.0226411489 0.957985627015
-396 23.0894818966 0.95796380271
-395 23.2497532083 0.957866374066
-394 23.3267522211 0.957734495092
-393 24.1960959144 0.959144202822
-392 25.6013756647 0.961135104777
-391 26.9308346336 0.962772823609
-390 28.2665032003 0.964184525804
-389 29.2077190077 0.965130680485
-388 29.686208324 0.965574226634
-387 29.5730662676 0.96537178003
-386 29.0144890616 0.964564436875
-385 29.128299844 0.964555506913
-384 29.2560901825 0.96460457114
-383 29.1944400217 0.96433552563
-382 29.1972741458 0.964141335529
-381 29.1057860714 0.963880680096
-380 29.7317772187 0.964207759594
-379 29.7899882177 0.964080879674
-378 29.704327612 0.963897959554
-377 30.1063911091 0.964122268744
-376 30.1209438589 0.964128246596
-375 30.3669713085 0.964199792824
-374 30.6304493201 0.9644323112
-373 31.0326720377 0.964979508637
-372 31.5541508773 0.965564710262
-371 33.7476355762 0.967635395186
-370 34.23777983 0.968049569708
-369 34.9427124797 0.968513379495
-368 35.3862688278 0.968742074505
-367 35.932012865 0.969058251582
-366 36.2209024615 0.969043170592
-365 36.38286151 0.968963863045
-364 35.7045186766 0.968186740265
-363 35.7908480082 0.968110530799
-362 35.8819539534 0.96798005232
-361 35.7931726268 0.967724774607
-360 35.9061554629 0.967598787219
-359 29.9722319524 0.961047598742
-358 30.0969971022 0.960895081928
-357 30.037639716 0.96060841516
-356 30.0810113683 0.960335520007
-355 30.2072095023 0.960211837282
-354 30.237111104 0.960154087039
-353 30.0909148807 0.959689320816
-352 30.2982517594 0.959737817354
-351 30.4311689966 0.959594034557
-350 30.6503518772 0.959376689381
-349 30.8015157787 0.959201357366
-348 30.8998821769 0.958990707184
-347 30.2746234436 0.957989531067
-346 29.6406075853 0.956690606236
-345 29.7153138235 0.956359227825
-344 29.5800082795 0.955883301405
-343 29.5972359329 0.955473436331
-342 29.7881094163 0.955440676799
-341 28.5809636022 0.953295812404
-340 28.2260293603 0.952458568948
-339 28.4739674553 0.952430239248
-338 28.9753845174 0.952881692607
-337 28.8446326784 0.952443232507
-336 28.7342610579 0.951812737778
-335 27.3278030761 0.94874410582
-334 27.4434608158 0.948579577948
-333 27.3146196223 0.947997039772
-332 27.1897270961 0.947411180754
-331 26.9698118014 0.946446669766
-330 27.229436678 0.946418387025
-329 27.4402764067 0.946516927685
-328 27.3928287106 0.946093493521
-327 27.6036684393 0.946057043043
-326 27.5996879279 0.945556191779
-325 27.6926726746 0.945222007564
-324 25.9837913575 0.941448383437
-323 26.7772505812 0.942893367677
-322 27.9415979365 0.944748979183
-321 29.5015125943 0.947254669498
-320 31.1606534408 0.949755483151
-319 32.7948603637 0.951937649171
-318 33.9979938222 0.95320685717
-317 34.5228162914 0.953624019498
-316 34.719676464 0.953751309128
-315 34.9642072413 0.953526016999
-314 35.2976467217 0.953502575454
-313 35.6222335446 0.9534121294
-312 35.9957965799 0.953424366003
-311 36.4922141197 0.953555373887
-310 36.5077540362 0.953312562647
-309 36.7305034551 0.953274015825
-308 37.0511097666 0.953010048652
-307 37.2551348597 0.952856730742
-306 37.7160462376 0.952972372131
-305 38.2174632997 0.953026447521
-304 38.1259752253 0.952410855055
-303 38.5293443302 0.952403169512
-302 38.4555615706 0.951758484638
-301 38.4823106073 0.951316209556
-300 38.6558927491 0.951126847949
-299 38.9007419673 0.950978188966
-298 39.2248511289 0.950899711868
-297 39.2674585231 0.950579365016
-296 39.459542082 0.950367625606
-295 39.8389644301 0.950318352244
-294 40.1373117218 0.950254787009
-293 40.5650097124 0.950292966061
-292 40.7126707639 0.950070190828
-291 41.0952775213 0.95006724906
-290 40.5416998376 0.94888373689
-289 36.4240359201 0.942595430091
-288 36.8994363596 0.942587370655
-287 33.0698977805 0.935465223438
-286 33.3666210235 0.935391711491
-285 33.6569754482 0.935400521116
-284 34.1067732382 0.935266967857
-283 34.3129000414 0.935077483718
-282 34.5827150272 0.935028150215
-281 34.7971212941 0.93491530811
-280 35.5143139191 0.935382820109
-279 35.0831130784 0.934016789547
-278 35.4038467662 0.933990855433
-277 35.625163201 0.933764346481
-276 35.531382352 0.932936117458
-275 35.8209725185 0.932687602799
-274 35.7232111582 0.931786237044
-273 35.0215266057 0.929535394702
-272 35.3159570742 0.929238388354
-271 35.5035187721 0.92905075898
-270 35.5707098048 0.928740771859
-269 35.0344234627 0.927060455452
-268 35.3273254148 0.926895180791
-267 35.5873005764 0.926698065346
-266 34.9514696048 0.924869621538
-265 34.9291150527 0.923877315568
-264 35.2142152024 0.923346134761
-263 35.570072923 0.923334917924
-262 35.9824539057 0.923431009767
-261 39.7878228195 0.929936884214
-260 40.1789637933 0.929721920563
-259 40.5157150591 0.929382613975
-258 40.792535745 0.92882347297
-257 40.6876413082 0.927773379059
-256 41.210234691 0.927844121103
-255 41.8439639525 0.927942682361
-254 42.7376046875 0.928737023035
-253 43.8901378849 0.929687211278
-252 44.1838677833 0.929415280297
-251 45.0040760437 0.929898589883
-250 45.5870458236 0.929998906648
-249 45.9702576187 0.929542585046
-248 46.3152565042 0.929061752376
-247 46.7642263478 0.928686414992
-246 47.5120529886 0.929022567856
-245 48.0659491131 0.928831177094
-244 48.5923000987 0.928637379145
-243 49.2775531 0.928613734527
-242 49.58367035 0.928074761148
-241 50.046364997 0.92790870283
-240 50.6714008216 0.92771256146
-239 50.3672579053 0.926143742625
-238 50.9417890011 0.926163338147
-237 50.7638123746 0.924977514129
-236 51.0392000764 0.924368557559
-235 51.2649746839 0.923671476001
-234 51.2964048021 0.922670853956
-233 51.6313091106 0.922174192647
-232 52.0465879056 0.921660755338
-231 52.6327739388 0.921364371165
-230 53.0809158361 0.920866153935
-229 52.6789478712 0.919280767809
-228 52.9218227558 0.918606748402
-227 53.2714390345 0.918074111325
-226 53.6605101423 0.917421970779
-225 54.1463872878 0.916902772689
-224 54.0394866732 0.915894183686
-223 54.4544470274 0.915536168999
-222 54.5476546827 0.914687158476
-221 54.8930993854 0.914141936346
-220 53.2907683979 0.910411462946
-219 53.9297200904 0.910191125862
-218 54.4284622488 0.909783877829
-217 55.0652803872 0.909498812512
-216 55.685507754 0.909199083456
-215 56.4115848804 0.908955321975
-214 57.641562908 0.909461335765
-213 57.2547527306 0.907750792584
-212 57.4065216699 0.906796196134
-211 57.9591121867 0.906528456087
-210 58.9735694042 0.90680117283
-209 59.7104416775 0.906539786865
-208 60.3346177117 0.906111953637
-207 60.7919307073 0.905531658755
-206 61.1198930039 0.904870102985
-205 61.7164920549 0.904350154694
-204 63.1090023246 0.905418154967
-203 64.1598891826 0.905644033452
-202 65.3129318855 0.905798678619
-201 66.4302136739 0.905904892627
-200 67.6064707194 0.906264999265
-199 68.605292488 0.906391688351
-198 69.5688946916 0.906449958313
-197 70.9436041143 0.90670589805
-196 72.1509091488 0.906941705093
-195 72.8367034997 0.906498326373
-194 73.6521988345 0.906262488161
-193 74.3847721555 0.90605256433
-192 75.5971085565 0.906318795988
-191 75.4366461803 0.904814429141
-190 76.5988281374 0.904837464057
-189 77.6185714741 0.904801851277
-188 79.3095564118 0.905335492673
-187 80.732223036 0.905662642131
-186 81.9602904181 0.905631256275
-185 82.1151163902 0.9043299669
-184 83.1660987804 0.903619560351
-183 83.8790879852 0.902870614452
-182 84.9942999077 0.902504125592
-181 86.4081775627 0.902428208169
-180 87.6860809477 0.902446695133
-179 88.5359679012 0.902208546127
-178 89.2885711556 0.901707186608
-177 90.4142597841 0.901564257518
-176 91.6472630004 0.90144364668
-175 94.2859599401 0.902637398667
-174 95.5623666529 0.902622883591
-173 96.7669967837 0.902383845287
-172 97.916313728 0.901952102865
-171 99.1868611279 0.901745857985
-170 100.948667325 0.901738821928
-169 102.615450753 0.901606916664
-168 104.10056364 0.901606535688
-167 105.540489762 0.901392111575
-166 106.172849728 0.900436817713
-165 107.352609623 0.9001326121
-164 108.463363373 0.899782508762
-163 110.019424896 0.899881895413
-162 111.322134828 0.899690086582
-161 111.9148489 0.898757293489
-160 113.752189281 0.898833250291
-159 116.197083081 0.899489918177
-158 118.400439448 0.899983661325
-157 120.99929943 0.900771915905
-156 122.430245518 0.900749693229
-155 121.687386555 0.898822763195
-154 123.792280992 0.899255081969
-153 125.240932395 0.899130408324
-152 126.526287297 0.898881982638
-151 127.807566156 0.898384902938
-150 128.770308569 0.897885665165
-149 129.92940165 0.89756599546
-148 131.207878228 0.897299587483
-147 133.194917683 0.89759355976
-146 134.951915422 0.897816005653
-145 136.59331911 0.89767919803
-144 139.149571697 0.898050819046
-143 140.274814508 0.897641326318
-142 142.444416139 0.897983140427
-141 143.612170812 0.897480656755
-140 145.218896284 0.897321562528
-139 146.978823679 0.897210147673
-138 148.511447951 0.897014333375
-137 150.265898163 0.896821486626
-136 152.394516447 0.897068627805
-135 154.48676878 0.897135264706
-134 158.326561157 0.897944887726
-133 162.213833073 0.89920981608
-132 165.714454033 0.900175981338
-131 166.892271439 0.899836725075
-130 168.642486387 0.899919548963
-129 171.845842754 0.900590215028
-128 173.710282457 0.900399547657
-127 175.490080566 0.900298029486
-126 178.400248384 0.900856246476
-125 180.410502181 0.9008535653
-124 182.351622456 0.900872571963
-123 183.758367035 0.900640720409
-122 186.39671369 0.901057823444
-121 189.288539312 0.901486662651
-120 190.777600866 0.901421709052
-119 193.048625927 0.901679591898
-118 194.208769863 0.901621108868
-117 197.554978824 0.902613429235
-116 199.848899787 0.902918204511
-115 202.555838614 0.903558020073
-114 205.727637487 0.904540084378
-113 207.395758367 0.904912423922
-112 208.937012387 0.905171771207
-111 209.399452282 0.905008374003
-110 211.079833137 0.905593576823
-109 212.673438843 0.906092793622
-108 211.823934019 0.905649771116
-107 213.39337006 0.906229431874
-106 211.331656211 0.905301945298
-105 211.180078336 0.905396885834
-104 211.068942458 0.905424780188
-103 210.537082444 0.905388952653
-102 210.237142948 0.905591626469
-101 209.080310798 0.905633143153
-100 208.161513231 0.905784224347
-99 206.702098526 0.905705705641
-98 205.325765054 0.905677295488
-97 203.874725345 0.905826368321
-96 202.066172022 0.905624806128
-95 199.666051014 0.905339585437
-94 197.182657708 0.905158736136
-93 195.872846543 0.905554662343
-92 193.454160431 0.905557852143
-91 189.917396427 0.904944311568
-90 187.325924275 0.904758388711
-89 183.901888355 0.904380311385
-88 181.28946279 0.904362504354
-87 177.799286692 0.904007971139
-86 175.868038086 0.904377703646
-85 172.909021431 0.904406558328
-84 169.891634557 0.904622712896
-83 166.432824889 0.904278948273
-82 163.493296819 0.904372048889
-81 160.866382193 0.90486685108
-80 158.3918097 0.905423128895
-79 155.996337929 0.906043953212
-78 154.103302232 0.906950755457
-77 151.32713435 0.907415937942
-76 148.085787982 0.907662692483
-75 144.913224851 0.908035024113
-74 140.699232557 0.907630364776
-73 136.953985288 0.907562292561
-72 132.951437761 0.90734120206
-71 129.362831577 0.907485533699
-70 125.926185396 0.907525473458
-69 122.479858612 0.907508317214
-68 119.013692959 0.90738460618
-67 115.565359997 0.907484579206
-66 113.734579499 0.908468911672
-65 109.583065312 0.907584045851
-64 106.541890902 0.907762862557
-63 105.541285864 0.909456980919
-62 103.164570264 0.909809042256
-61 100.725981594 0.910024066022
-60 98.5016081266 0.910181145222
-59 96.7600229277 0.910563746027
-58 94.7263318791 0.910566194127
-57 93.1217081171 0.910955730205
-56 91.8318950419 0.911354694242
-55 90.7175429099 0.911805264785
-54 89.6622615674 0.912204142383
-53 88.6870044263 0.912389783735
-52 88.5749132249 0.913352784141
-51 88.6769416935 0.9141089577
-50 88.1624048658 0.914351525051
-49 89.400280228 0.915821430098
-48 92.5552017323 0.91860489713
-47 95.7039454829 0.921022092975
-46 100.386587269 0.923761456097
-45 102.469127153 0.923793387967
-44 108.163965226 0.925009559729
-43 120.122408687 0.928723284992
-42 130.443842945 0.929753432714
-41 143.887431137 0.930868765779
-40 160.18765723 0.931377436473
-39 182.863802821 0.931064393103
-38 209.617393243 0.929842494848
-37 242.106422953 0.927483619999
-36 274.936152597 0.925333311837
-35 314.038308442 0.922857890357
-34 363.667006337 0.918985519142
-33 419.950482438 0.91528797797
-32 476.775690221 0.913092472675
-31 526.688469255 0.91168476507
-30 565.561888991 0.911078224213
-29 589.89749387 0.910853426714
-28 602.270674776 0.91067783418
-27 609.169315034 0.910705879692
-26 612.50412381 0.91058237372
-25 614.880712034 0.910705443959
-24 616.462344362 0.911081998099
-23 617.585676528 0.911414346881
-22 616.88013884 0.911648084988
-21 616.001337452 0.911940909352
-20 613.954590326 0.912378622667
-19 611.719549088 0.912740188749
-18 609.253383435 0.913087434649
-17 606.573894214 0.913407214873
-16 603.796134127 0.913828072007
-15 594.56475496 0.913514790673
-14 587.528006878 0.913656079325
-13 584.107155367 0.914172044693
-12 576.600356654 0.914458463999
-11 570.900455371 0.915063420042
-10 563.001592205 0.915509143036
-9 547.374295449 0.915366474342
-8 538.678374678 0.91640806574
-7 518.287583989 0.916824189029
-6 494.303092061 0.918910687456
-5 457.573129956 0.918682797292
-4 430.164570264 0.919120947237
-3 406.396108652 0.92146569014
-2 380.338948508 0.923804342585
-1 292.754482056 0.93320820537
0 205.919147852 0.943412956626
1 131.753303824 0.947097272558
2 108.34815145 0.952355596172
3 87.0468745024 0.962412266248
4 70.403082508 0.972134984151
5 63.2505174665 0.976967595693
6 53.8544088144 0.980740880352
7 48.6210553132 0.983146613559
8 42.4566761137 0.984327179843
9 39.0247747031 0.985573651111
10 35.0547718371 0.986208236815
11 32.4052479063 0.986744451862
12 30.6642995892 0.987349823466
13 29.6335063529 0.987877603977
14 29.2452631914 0.988465184231
15 28.9570423208 0.988877796966
16 28.5749450689 0.989253465175
17 28.2472693692 0.989629542159
18 27.9364073496 0.989916205335
19 27.5448205585 0.990134588149
20 27.2202018915 0.990323650355
21 26.9629016336 0.990454607521
22 26.6016304175 0.990552186721
23 26.2289908607 0.990620550264
24 25.6714645098 0.990653019284
25 25.0232780308 0.990666300557
26 24.1874343216 0.990556003203
27 21.6564659427 0.989711296855
28 20.5074355953 0.989415001049
29 18.9666273923 0.988842418008
30 17.152023692 0.988118756601
31 14.1416106741 0.98598773066
32 11.787313314 0.983723951691
33 11.3151609719 0.983478496419
34 10.9845874598 0.983402662949
35 10.4546380919 0.983056907588
36 10.2494666115 0.983037969275
37 10.0185332612 0.982993386562
38 9.9526159921 0.983112810466
39 9.81686463077 0.983212642474
40 9.72502627138 0.983180500681
41 9.79463745502 0.983554327177
42 9.84514218387 0.983858833817
43 9.85737031494 0.984021167518
44 9.79903193962 0.984018698697
45 9.85692449766 0.98423435577
46 9.61080151578 0.984180552898
47 9.65028818903 0.984244621136
48 9.68464796357 0.984396446869
49 9.73620354743 0.984609815423
50 10.4348629112 0.985542708098
51 10.8917300895 0.986096703519
52 10.9848740566 0.986246214801
53 11.1184281757 0.986410253117
54 11.4301499857 0.986700612427
55 11.7284972773 0.986938182301
56 11.8159729962 0.987000514887
57 11.9164411044 0.98704412526
58 12.1671814795 0.987226650774
59 12.3290131516 0.987331894439
60 12.4167436232 0.987387186005
61 12.6887876954 0.987488966657
62 12.7550234054 0.987527499599
63 12.8501098621 0.987643723159
64 13.0371620546 0.987638874273
65 13.2631595707 0.987784730409
66 13.6326784065 0.987990351008
67 13.9766582811 0.988187114984
68 13.903767156 0.988009157223
69 14.2457090087 0.988177878496
70 14.3611756839 0.988241223004
71 14.3779893641 0.988225282744
72 14.3387892876 0.988128267013
73 14.3603477375 0.988050397783
74 14.2610260166 0.987991258243
75 14.3866191128 0.987963105532
76 14.5271789319 0.987959941914
77 14.7132121135 0.988015424307
78 14.8691844728 0.988135818188
79 14.8764449256 0.988071101823
80 15.5835111295 0.988447324046
81 15.4296723243 0.988284488887
82 15.5461898545 0.988214839334
83 17.8868260994 0.98960386591
84 17.8745342802 0.989570062583
85 17.8231697609 0.989543252886
86 18.1154348311 0.989781935176
87 19.502436073 0.990479675329
88 20.0710441678 0.990720675156
89 20.641562908 0.99091664311
90 20.6551284909 0.990914120467
91 20.3335031685 0.990753107351
92 20.4444798268 0.990717009856
93 22.0769671687 0.991301663743
94 22.0500270675 0.991302944422
95 22.0593573862 0.991269708541
96 22.0798649811 0.991247041225
97 22.5748176926 0.9914029953
98 22.530331497 0.991476287501
99 22.9698754896 0.991451943021
100 22.9632519186 0.991409905614
101 23.9155494698 0.991800395462
102 24.6686303856 0.992068454993
103 25.2362513136 0.992317414447
104 25.4255962806 0.992400440787
105 25.4868961564 0.992439430984
106 25.9994586504 0.992603620158
107 25.9886316594 0.992666718403
108 25.8950100309 0.992676124538
109 26.0316530268 0.992680388996
110 27.6543005445 0.993070224862
111 27.5298538356 0.993061123436
112 27.451517371 0.993107458543
113 27.2556443652 0.9931110932
114 27.0586568162 0.993132020544
115 26.5816641722 0.993077731607
116 25.9950323218 0.993019158616
117 24.9398783556 0.992837055915
118 24.6214692864 0.992777821799
119 24.4324427602 0.992618160764
120 24.0413017865 0.992515781369
121 23.6268509378 0.992401939997
122 23.4241951406 0.992320919564
123 23.4018087444 0.992323722849
124 23.3328344426 0.992266892405
125 23.1748240614 0.992196582752
126 22.4377607235 0.992003028853
127 22.1255930962 0.992015380431
128 22.7523485017 0.992220594455
129 22.777537178 0.992240786202
130 23.065216699 0.992319793915
131 25.8581664172 0.993168353311
132 25.6169155813 0.993139632672
133 25.1708753941 0.993104271181
134 25.0780817119 0.993119643133
135 24.7335286438 0.993056656325
136 24.5743718753 0.993045527115
137 24.3058306531 0.993001305077
138 24.7603732128 0.993155234715
139 24.2993026144 0.993076692103
140 24.3596153234 0.99306698631
141 24.1785498201 0.993007267014
142 24.1005636404 0.99297828012
143 23.996528994 0.9929341382
144 23.86262459 0.992897755994
145 23.7034359775 0.992865804788
146 23.013597427 0.99271831978
147 22.6904117441 0.992689808736
148 22.5378785466 0.992683388883
149 21.292201382 0.992339748785
150 20.8260675732 0.992201897863
151 20.9546221699 0.992233347309
152 20.8736744897 0.992278739231
153 21.1166767506 0.992339793999
154 20.9310893864 0.992282533871
155 20.8687068115 0.99228402419
156 20.5815049518 0.99233148321
157 20.6850937808 0.992363191034
158 20.6763366557 0.992369644358
159 20.9032258065 0.992482687011
160 19.9745247269 0.992147326376
161 20.1248925262 0.992266865216
162 19.6425819189 0.992127140711
163 19.5063528962 0.992029275439
164 18.473489794 0.991659856426
165 18.2496258319 0.991552845977
166 18.4495430373 0.991691674907
167 18.4637136579 0.991769144551
168 18.3600611407 0.991711573851
169 18.428175652 0.991707177694
170 18.5562207432 0.99176923399
171 18.6739483489 0.991882416893
172 18.3708244435 0.991638320784
173 18.4141642518 0.991679129354
174 18.2697194536 0.991662264061
175 18.5580677005 0.991776124283
176 18.4048339331 0.991798805401
177 18.4907811356 0.991841111833
178 18.6506703181 0.991996334335
179 18.5880329905 0.992130035383
180 18.5645638952 0.992153415552
181 18.51463236 0.992216925345
182 18.2756742986 0.992187741377
183 18.0503773525 0.992156318675
184 17.969302296 0.992147321117
185 17.8955513804 0.99216278513
186 17.7647995414 0.992153382729
187 17.6675476865 0.992182776588
188 17.6543323886 0.992234668939
189 17.7260771264 0.992321521141
190 17.834729166 0.992427053378
191 17.8574658472 0.992506813273
192 17.8889278094 0.99248843276
193 17.8332961819 0.992450537451
194 15.0892271439 0.991189475665
195 14.9990765214 0.991137878679
196 14.9751297647 0.991087543862
197 14.7320956597 0.990950918768
198 14.0241378212 0.99044243388
199 13.724198325 0.990213287563
200 13.706429322 0.990270418956
201 13.7234340668 0.990316374736
202 13.9459287329 0.990509304797
203 13.2069229055 0.99015830262
204 13.334362959 0.990250854924
205 13.4417412349 0.990381661091
206 13.5416361494 0.990495108752
207 13.41562908 0.990455649152
208 13.3109893959 0.990402426121
209 13.2178772729 0.99040037837
210 12.886316594 0.990373189331
211 12.8638983537 0.990410647789
212 12.9940133108 0.990528638912
213 13.2466324873 0.990686616059
214 13.3173582142 0.990738389338
215 13.831226316 0.991078351063
216 13.8236792663 0.991031148667
217 14.1555902302 0.991079115301
218 14.2501990256 0.991118084336
219 14.2759927395 0.991133799092
220 14.3438206541 0.991192318424
221 14.3948348884 0.991200096369
222 14.3018182976 0.991212751758
223 14.1122504219 0.991200543233
224 14.0731458778 0.99119086155
225 14.0598987358 0.991241548105
226 13.9878992453 0.991321208992
227 13.9227462344 0.991313001719
228 13.9124287488 0.991347121914
229 14.040792281 0.991443024744
230 14.2111263255 0.991627345592
231 14.5372735089 0.991816219897
232 14.9040219087 0.992070045213
233 13.2526510206 0.991291326494
234 13.4170620641 0.991491948771
235 13.5383243639 0.991648178926
236 13.6514027322 0.991787896541
237 13.5280705665 0.991828390534
238 13.4608795338 0.991837848304
239 13.1723083782 0.991751348309
240 13.0351240327 0.991663114794
241 12.8694073815 0.991610475268
242 12.7961341273 0.99159005811
243 12.7619017291 0.991627419053
244 12.7404069675 0.991664657172
245 12.6106741394 0.991637274972
246 12.4426010254 0.991586512022
247 12.2527465529 0.991506757944
248 12.0570327676 0.991422972087
249 11.8462567271 0.991313001941
250 11.7583033468 0.991297407048
251 11.6907938732 0.991245496133
252 12.7561697927 0.991965725948
253 12.7041365475 0.992000080966
254 12.5648186479 0.99194831981
255 12.2417603414 0.991743444935
256 12.0612680317 0.991619519459
257 12.0111135879 0.991608935583
258 11.9957328918 0.991648329252
259 11.9456739802 0.991657725476
260 11.9917842244 0.991649735415
261 11.8788969207 0.991551635026
262 11.7464891889 0.99144273656
263 11.569053912 0.991337393994
264 9.79900009553 0.989741187105
265 9.6606693628 0.989617787899
266 9.45935101742 0.989427163286
267 9.41394134318 0.989361515206
268 9.12365060663 0.989006197525
269 9.81613221667 0.989749601502
270 10.0098398242 0.989854584992
271 9.86243352546 0.989724790523
272 9.8905518581 0.989680747976
273 9.98694392256 0.989776140018
274 9.91965735758 0.989665318271
275 9.89450052543 0.9896472188
276 9.89243065949 0.989645746278
277 10.6678661274 0.99027003577
278 10.731172181 0.990276221582
279 10.9090532752 0.99043593345
280 11.0049676782 0.990478848528
281 11.0398051142 0.990535582292
282 11.0719039582 0.990522493619
283 11.1540298698 0.990631816346
284 11.2114447664 0.990683736407
285 11.2662166035 0.990760913217
286 11.2987294208 0.990796817797
287 11.3130911059 0.990857024333
288 11.3289176193 0.990872102937
289 11.3905677801 0.99092747489
290 11.0706938828 0.990795631802
291 10.9695252046 0.990721865371
292 10.9335095373 0.990660625645
293 10.8795974907 0.9907109688
294 10.79498774 0.9907297677
295 10.7507881413 0.99068071797
296 10.925739579 0.990800913412
297 10.9781867974 0.99081889054
298 10.9388911887 0.990819794009
299 10.8593764927 0.990762218919
300 10.7453428016 0.990711670566
301 11.3461134287 0.99110766615
302 11.2708021527 0.991091365938
303 11.2089290832 0.991124504037
304 11.0211126326 0.991130001412
305 10.9723593287 0.99110316475
306 10.6682801006 0.990944790024
307 10.6921950132 0.991058338163
308 10.438970799 0.990912352616
309 10.0748017705 0.990645521204
310 9.21112632551 0.989901052285
311 9.10986211508 0.989798566346
312 8.97220010827 0.989723053877
313 8.84390026431 0.989654072525
314 8.76320733688 0.989631260987
315 10.7535585772 0.991546734019
316 10.7575072445 0.991548488347
317 10.6927682069 0.991511425884
318 10.634939337 0.99151722728
319 12.7757220648 0.99297853375
320 12.6899977709 0.992952389988
321 12.5859312805 0.992903802925
322 12.4447345795 0.992911076273
323 12.4603063402 0.992892703038
324 12.3792312836 0.992918985431
325 12.3333121039 0.992942149261
326 12.346941375 0.992906758326
327 12.6177435277 0.993049550794
328 12.6870044263 0.99311837413
329 12.5603604751 0.993090924188
330 12.51673407 0.993088440826
331 12.4344170939 0.993047458316
332 12.3841352737 0.993015592106
333 12.4181766073 0.992996492431
334 12.3576091456 0.992971968851
335 12.2989523294 0.992946688941
336 12.2355507436 0.992891784415
337 12.2401362927 0.992893010335
338 12.1962232908 0.992860268342
339 12.1095755183 0.992799704831
340 12.0648982581 0.992797849481
341 12.0559500685 0.992796510042
342 12.1885488648 0.992877136677
343 12.2244371557 0.992933935461
344 12.3096201 0.992940932167
345 12.3883068497 0.993064372788
346 12.514282075 0.993120996584
347 13.1559086711 0.993393813202
348 13.6835971086 0.993714429193
349 14.0470018788 0.993903518818
350 14.208865395 0.993997986092
351 14.1567047734 0.993966325139
352 14.0147119702 0.993948398097
353 13.5803585645 0.993799154567
354 13.4702735407 0.993757689139
355 13.2326847753 0.993637557051
356 13.1204980416 0.993603586582
357 13.1281406235 0.993614011648
358 13.1513549661 0.993643953544
359 12.9607362354 0.993583951462
360 12.9183835939 0.99357914461
361 12.8257172882 0.993565794635
362 12.6936598414 0.993512008466
363 12.9071744738 0.993649391422
364 12.8374996019 0.993632938019
365 12.6486959845 0.993535858704
366 12.9317899564 0.993649661246
367 13.0604082413 0.993677800777
368 13.003821291 0.993666004374
369 13.4186542687 0.993854000597
370 13.5402668535 0.99391765873
371 13.6044326975 0.993917786159
372 13.5474636181 0.993903496017
373 13.5839251027 0.993852896265
374 13.5141546986 0.993841279652
375 13.5182307423 0.993828379289
376 13.4056937235 0.993757805074
377 13.4141005636 0.993824906414
378 13.3285036461 0.993767692006
379 13.1737413623 0.993709985536
380 13.1062637328 0.993667328433
381 10.7761997261 0.992333844862
382 10.4434608158 0.992157415212
383 10.4534917046 0.99221039723
384 10.4526000701 0.992262975078
385 10.564850492 0.992452700607
386 10.6026812725 0.992485004473
387 10.2766933096 0.992311422113
388 10.4116804127 0.992397636783
389 10.4936471038 0.992503432882
390 10.4872464414 0.992508998609
391 11.3357004108 0.99312560509
392 12.557876636 0.993769116218
393 13.6263732764 0.994300169603
394 14.9957328918 0.994810790445
395 15.9415342483 0.995119137377
396 16.8551412285 0.995339447438
397 17.1261026017 0.995382895823
398 17.2408687068 0.99540833894
399 17.3488520205 0.995418652142
400 30.0279272681 0.997239563787
401 30.1943444894 0.997230411177
402 30.2312199471 0.997228674762
403 30.2450721269 0.997219008142
404 30.2476196542 0.997224250101
405 30.4003439162 0.997232082997
406 30.4039104544 0.997225546613
407 30.4176671019 0.997235269018
408 30.5605515397 0.997251422261
409 30.3172308378 0.99722406389
410 30.1470878578 0.997213153689
411 30.2213801229 0.997180112067
412 30.3693277712 0.997192569683
413 30.3704104703 0.997176755969
414 30.3439480304 0.99718218933
415 29.8487087221 0.997154313955
416 30.4875648823 0.997227576445
417 30.5371142884 0.997222216074
418 30.7030856924 0.997223124683
419 30.8729102315 0.997206993521
420 31.0748336146 0.997225116847
421 31.6821322804 0.997268725814
422 32.2247874407 0.997286959351
423 32.4213291724 0.99730754526
424 32.6078081712 0.997316096896
425 22.8489634748 0.996316388493
426 22.8170556953 0.996364551332
427 22.62414419 0.996339490627
428 22.2082285132 0.99628781838
429 21.1188103047 0.996138436464
430 18.9260580199 0.995734628216
431 16.4098652995 0.995121373471
432 13.7924083686 0.994193333028
433 11.4720568099 0.993092297631
434 9.39324268382 0.991634719486
435 9.41604305321 0.991653481144
436 9.37375409993 0.991625532328
437 9.42015094099 0.991657135165
438 9.29946183486 0.991493907268
439 9.38232016049 0.991538213368
440 9.35076266599 0.991512053224
441 8.98965067032 0.991209141142
442 9.30522561539 0.991483472942
443 9.31942808012 0.991482818804
444 9.3881794733 0.991618710707
445 9.39980256663 0.991465825381
446 9.65582906092 0.991678092799
447 9.0011145432 0.991110168226
448 8.90717447378 0.991023722708
449 8.83469732191 0.990957638205
450 8.88880043308 0.990917383289
451 8.7385281661 0.990851192422
452 8.62551348597 0.990758079169
453 8.53071362609 0.990701389582
454 8.63442983154 0.990686046102
455 8.68407476993 0.990749726907
456 8.6632487342 0.990847307576
457 8.79702576187 0.990956488664
458 8.81845683533 0.990993577803
459 8.89125242811 0.991098681638
460 8.97178613508 0.991192786456
461 9.12037066522 0.991332466224
462 9.12492437028 0.991327824985
463 9.13084737127 0.991322910906
464 9.15855173073 0.991326509719
465 9.16300990351 0.991341364633
466 9.10123236633 0.991299402197
467 9.1285227526 0.991342728938
468 9.63318791198 0.991784103066
469 9.69837276693 0.991817838075
470 9.71002770436 0.991795958724
471 9.70209852562 0.991858728062
472 9.68697258224 0.9919659223
473 9.65815367958 0.992022419962
474 9.84017450562 0.992107463126
475 9.82533515906 0.992153803837
476 9.76330286915 0.992163490549
477 9.89950004777 0.992264224992
478 9.83125816005 0.992226977172
479 9.90354424736 0.992379246163
480 9.99863070407 0.99247322006
481 10.2915963443 0.992727134872
482 11.3728624654 0.993406549918
483 11.5918542814 0.993536177485
484 11.8496958889 0.993673387162
485 11.879693023 0.993707620938
486 12.1730407923 0.993891017091
487 12.3492978378 0.993980481046
488 12.6789160271 0.994104472096
489 10.9767538133 0.993235154342
490 10.9727414578 0.993219753102
491 10.9312804509 0.993216600005
492 10.8905837022 0.993195612663
493 10.9189886317 0.993146932354
494 10.9724230169 0.993183042461
495 10.986402573 0.993107224291
496 11.1444129542 0.993166083916
497 11.1289367258 0.993157768649
498 11.1360698022 0.993120463359
499 11.1542527784 0.993081627449
<html lang="en">
<head>
<meta charset="utf-8">
<title>plot data with d3js and html5</title>
<link rel="stylesheet" href="mydiv.css">
<link rel="stylesheet" href="http://nvd3.org/assets/css/nv.d3.css">
<link rel="stylesheet" href="http://www.jeasyui.com/easyui/themes/default/easyui.css">
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script src="http://d3js.org/d3.v3.min.js" charset="utf-8"></script>
<!--
<script src="../lib/jquery-ui.min.js"></script>
-->
<script src="http://eligrey.com/demos/FileSaver.js/FileSaver.js"></script>
<script src="http://www.jeasyui.com/easyui/jquery.easyui.min.js"></script>
<script src="http://nvd3.org/assets/js/nv.d3.js"></script>
<link rel="stylesheet" href="http://nvd3.org/assets/css/nv.d3.css">
<style>
body {
font:10px sans-serif;
}
</style>
<script>
$(function() {
$("#chart").resizable();
});
</script>
</head>
<body>
<div class="easyui-layout" fit="true" style="width:100%;height:100%;min-width:960px;margin:0 auto">
<div style="width:210px; background-color: aliceblue" region="west" title="DATA SOURCE" >
<div class="easyui-accordion" >
<div id="url" class="myDiv" title="render url">
<label>google sheet data url: <input type="text" id="data-url" placeholder="#TODO" style="width:100%;"/></label>
<button id="url-button" value="render" onclick="renderUrl()">render</button>
</div>
<div id="input" class="mydiv" title="render local file">
<input type="file" id="File" name="File"/>
<a href="bam2x.aggregation.out">Example Data</a>
</div>
<div title="input text" id="text-data" class="myDiv">
<textArea id="input-text" style="height:50%;width:100%">
</textArea>
<button id="render-input-text-button" onclick="renderInputText()">render</button>
<button id="clear-input-text-button" onclick="clearInputText()">clear</button>
</div>
</div>
</div>
<div id="FIGURE" style=" height:100% ; background-color: white" region="center" class="myDiv" title="FIGURE" align="center">
<div id="chart" class="easyui-resizable" style="padding:20px height:98%;width:98%;border:1px solid">
<svg id="svg"></svg>
</div>
</div>
<div id="right" region="east" style="background-color: aliceblue; width:210px; text-align:center" title="CONTROL PANEL">
<div id="controls" class="myDiv" style="height:30%">
<form id="svg-options">
<label>Filename: <input type="text" class="filename" id="svg-filename" placeholder="demo.aggregation"/>.svg</label>
<input type="submit" value="Save"/>
</form>
Fitting the Canvas<br>
<button id="replot-button" value="replot" onclick="replot()">replot figure</button><br>
Clear the Canvas<br>
<button id="aggregation-clear-button" value="clear" onclick="clearSVG()">clear figure</button>
</div>
<script>
var svg_options_form = document.getElementById("svg-options");
var svg_filename = document.getElementById("svg-filename");
svg_options_form.addEventListener("submit", function(event) {
event.preventDefault();
var BB = Blob;
var svg = document.getElementById("svg");
var svg_xml = (new XMLSerializer).serializeToString(svg);
saveAs(
new BB(
[svg_xml]
, {type: "text/plain;charset=" + document.characterSet}
)
, (svg_filename.value || svg_filename.placeholder) + ".svg"
);
}, false);
</script>
<script>
function replot()
{
chart.update();
}
function clearSVG()
{
d3.select('#svg').text('')
}
function aggregationHandleFileSelect(evt) {
var files = evt.target.files; // FileList object
// Only process image files.
var file=files[0]
var reader = new FileReader();
reader.onloadend = (function(evt) {
render(parseCSV(evt.target.result,"\n","\t"));
});
reader.readAsText(file)
}
function httpGet(theUrl)
{
var xmlHttp = null;
xmlHttp = new XMLHttpRequest();
xmlHttp.open( "GET", theUrl, false );
xmlHttp.send( null );
return xmlHttp.responseText;
}
var width = nv.utils.windowSize().width - 40,
height = nv.utils.windowSize().height - 40;
var chart = nv.models.lineChart()
.margin({top: 20, right: 20, bottom: 20, left: 20})
.transitionDuration(350)
.useInteractiveGuideline(true)
.showLegend(true)
.showYAxis(true)
.showXAxis(true)
chart.xAxis //Chart x-axis settings
.axisLabel('Pos to TSS')
.tickFormat(d3.format(',r'));
chart.yAxis //Chart y-axis settings
.axisLabel('Mean Coverage or Gini')
.tickFormat(d3.format('.02f'));
function render(myData)
{
d3.select('#svg')
.datum(myData)
.call(chart);
nv.utils.windowResize(function() { chart.update() });
return chart;
}
function parseCSV(text, lineTerminator, cellTerminator) {
//break the lines apart
var lines = text.split(lineTerminator);
var aggregation=[],gini=[]
for(var j = 1; j<lines.length; j++){
if(lines[j] != ""){
var d = lines[j].split(cellTerminator);
aggregation.push({x: parseInt(d[0]), y: parseFloat(d[1])});
gini.push({x: parseInt(d[0]), y: parseFloat(d[2])});
}}
return [
{
values: aggregation,
key: "Aggregation",
color: "#ff7f0e"
},
{
values: gini,
key: "Gini",
color: "#2ca02c"
},
];
}
function renderUrl()
{
var url=document.getElementById("data-url").value || document.getElementById("data-url").placeholder;;
render(parseCSV(httpGet(url),"\n",","));
}
function renderInputText()
{
render(parseCSV(document.getElementById("input-text").value,"\n",","));
}
function clearInputText()
{
document.getElementById("input-text").value=""
}
document.getElementById('File').addEventListener('change', aggregationHandleFileSelect, false);
</script>
</body>
html,body{margin:5;padding:5;}
body {
font: 10px sans-serif;
}
/*.myDiv { width: 250px; height: 240px; padding: 0.5em; } */
input { size:200;}
svg {margin: 0 auto;}
.myDiv {
border:0px solid black;
margin-bottom: 1cm;
/*
-webkit-border-top-left-radius:6px;
-webkit-border-top-right-radius:6px;
-moz-border-radius-topleft:6px;
-moz-border-radius-topright:6px;
border-top-left-radius:6px;
border-top-right-radius:6px;
/*width:300px; */
font-size:8pt; /* or whatever */
/* background-color: aliceblue */
}
.myDiv h2 {
padding:4px;
color:#fff;
margin:0;
background-color:black;
font-size: 10pt; /* or whatever */
font-family:Arial;
}
.myDiv p {
font-family:Arial;
/*padding:4px; */
}
.middle h2 {
padding:4px;
color:#fff;
margin:0;
background-color:navy;
font-size: 10pt; /* or whatever */
font-family:Arial;
}
textarea {
width: 60%;
height: 60%;
border: 3px solid #cccccc;
padding: 3px;
font-family: Tahoma, sans-serif;
background-image: url(bg.gif);
background-position: bottom right;
background-repeat: no-repeat;
}
li:hover {
background-color: #FFFFCC;
}
td:hover {
background-color: #FFFFCC;
}
table {width:100px}
td {white-space:nowrap;overflow:hidden;width:100px}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment