-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.php
626 lines (540 loc) · 24.9 KB
/
index.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
<!DOCTYPE html>
<html>
<head>
<title>GeMo</title>
<meta charset="utf-8">
<!--Bootstrap 4.4-->
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js" integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js" integrity="sha384-wfSDF2E50Y2D1uUdj0O3uMBJnjuUD4Ih7YwaYd1iqfktj0Uod8GCExl3Og8ifwB6" crossorigin="anonymous"></script>
<!-- <link href="https://stackpath.bootstrapcdn.com/bootswatch/4.4.1/sandstone/bootstrap.min.css" rel="stylesheet" integrity="sha384-ABdnjefqVzESm+f9z9hcqx2cvwvDNjfrwfW5Le9138qHCMGlNmWawyn/tt4jR4ba" crossorigin="anonymous"> -->
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/d3/4.1.1/d3.min.js"></script>
<!-- <script src="https://cdn.jsdelivr.net/npm/ideogram@1.16.0/dist/js/ideogram.min.js"></script> -->
<!-- <script src="https://cdn.jsdelivr.net/npm/ideogram@1.20.0/dist/js/ideogram.min.js"></script> -->
<!-- Ideogram -->
<!-- <script src="dist/ideogram/dist/js/ideogram.min.js"></script> -->
<script src="https://cdn.jsdelivr.net/npm/ideogram@1.31.0/dist/js/ideogram.min.js"></script>
<!--Tooltipster-->
<link rel="stylesheet" type="text/css" href="dist/tooltipster/dist/css/tooltipster.bundle.min.css" />
<link rel="stylesheet" type="text/css" href="dist/tooltipster/dist/css/plugins/tooltipster/sideTip/themes/tooltipster-sideTip-noir.min.css" />
<script type="text/javascript" src="dist/tooltipster/dist/js/tooltipster.bundle.min.js"></script>
<!--select2-->
<link href="https://cdn.jsdelivr.net/npm/select2@4.1.0-rc.0/dist/css/select2.min.css" rel="stylesheet" />
<script src="https://cdn.jsdelivr.net/npm/select2@4.1.0-rc.0/dist/js/select2.min.js"></script>
<!--gemo-->
<script type="module" src="src/main.js" defer></script>
<link rel="stylesheet" type="text/css" href="src/css/gemo.css">
<link rel="shortcut icon" href="/gemo/public/img/favicon.ico">
<!--chrompaint-->
<!-- <script type="module" src="src/chrompaint/main.js" defer></script> -->
<link href="src/css/chrompaint.css" rel="stylesheet">
<!--libs-->
<script type="text/javascript" src="src/html2canvas.js"></script>
<script type="text/javascript" src="src/canvas2image.js"></script>
<script type="module" src="https://cdn.jsdelivr.net/gh/zerodevx/zero-md@2/dist/zero-md.min.js"></script>
<script type="text/javascript" src="dist/jszip/jszip.min.js"></script>
<script type="text/javascript" src="dist/file-saver/FileSaver.min.js"></script>
<script src="https://d3js.org/colorbrewer.v1.min.js"></script>
<!--d3-->
<script src="https://d3js.org/d3-axis.v2.min.js"></script>
<!--SocketIO-->
<script src="node_modules/socket.io/client-dist/socket.io.js"></script>
<script>
// var socket = io('http://195.221.173.169:9070');
var socket = io('http://195.221.175.11:9070');
</script>
</head>
<body>
<!--JUMBOTRON-->
<div id="banner" class="jumbotron jumbo-bg">
<div class="row">
<div class="col col-home">
<p class="lead">
<img src="./public/img/GeMo_full.png"></img>
Genetic mosaicism painting
</p>
</div>
<div class="col col-icon" >
<div class="row">
<span class="helper"></span>
<p class="icon-legend">
<a href="https://github.com/SouthGreenPlatform/GeMo" target="_blank">
<img class="ghimg" src="./public/img/GitHub-Mark-Light-120px-plus.png"></img>
</a>
</p>
</div>
<div class="row">
<p class="icon-legend" >Github</p>
</div>
</div>
<div class="col col-icon" ">
<div class="row">
<span class="helper"></span>
<p class="icon-legend">
<a href="https://gemo.readthedocs.io/en/latest/" target="_blank">
<img class="ghimg" src="./public/img/logo-light.svg"></img>
</a>
</p>
</div>
<div class="row">
<p class="icon-legend" >Read The Docs</p>
</div>
</div>
</div>
</div>
<!-- END OF JUMBOTRON-->
<div id="loader" class="triple-spinner" style="display:none;"></div>
<?php
//echo json_encode(file_get_contents($_POST["data"]));
//echo $_POST["select"];
if(isset($_FILES["data"])){
$data = json_encode(file_get_contents($_FILES["data"]["tmp_name"]));
$ploidyPost = $_POST["select"];
echo "<script>
config.ploidy = $ploidyPost;
$(\"#selectorploidy\").val('$ploidyPost');
var datajs = {$data};
datajs = datajs.substring(0, datajs.length-1);
console.log(datajs);
load_post_file(datajs);
</script>";
if(!empty($_FILES["annot"])){
$annot = json_encode(file_get_contents($_FILES["annot"]["tmp_name"]));
echo "<script>
var annotjs = {$annot};
annotjs = annotjs.substring(0, annotjs.length-1);
console.log(annotjs);
annotationParser(annotjs);
//</script>";
}
echo "<script> load_ideogram()</script>";
}
elseif(isset($_POST["data"])){
$data = json_encode(file_get_contents($_POST["data"]));
$ploidyPost = $_POST["select"];
echo "<script>
config.ploidy = $ploidyPost;
$(\"#selectorploidy\").val('$ploidyPost');
var datajs = {$data};
datajs = datajs.substring(0, datajs.length-1);
$(\"#editorChr\").text(datajs);
</script>";
if(!empty($_POST["annot"])){
$annot = json_encode(file_get_contents($_POST["annot"]));
echo "<script>
var annotjs = {$annot};
annotjs = annotjs.substring(0, annotjs.length-1);
console.log(annotjs);
$(\"#editorAnnot\").text(annotjs);
//</script>";
}
echo "<script> load_ideogram()</script>";
}
?>
<!--SIDEBAR-->
<div id="wrapper">
<div id="sidebar-wrapper">
<aside id="sidebar">
<ul id="sidemenu" class="sidebar-nav">
<!--HOME-->
<li id="homebutton">
<a class="accordion-toggle collapsed toggle-switch" data-toggle="collapse" href="#submenu-1">
<span class="sidebar-icon"><i class="fa fa-dashboard"></i></span>
<span class="sidebar-title">Home</span>
<b class="caret"></b>
</a>
<!-- <ul id="submenu-1" class="panel-collapse collapse panel-switch" role="menu">
</ul> -->
</li>
<!--ACCESSION-->
<li id="accession">
<a class="accordion-toggle toggle-switch" data-toggle="collapse" href="#submenu-2">
<span class="sidebar-icon"><i class="fa fa-dashboard"></i></span>
<span class="sidebar-title">Chromosome Painting</span>
<b class="caret"></b>
</a>
<ul id="submenu-2" class="panel-collapse collapse panel-switch show" role="menu">
<!-- Menu-->
<li>
<div class="form-group">
<!-- bloc or curve -->
<!-- <p class="menu_title">
Choose your visualization type
<svg xmlns="http://www.w3.org/2000/svg" cursor="pointer" width="16" height="16" fill="currentColor" class="bi bi-question-circle blocOrCurve" viewBox="0 0 16 16">
<path d="M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14zm0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16z"/>
<path d="M5.255 5.786a.237.237 0 0 0 .241.247h.825c.138 0 .248-.113.266-.25.09-.656.54-1.134 1.342-1.134.686 0 1.314.343 1.314 1.168 0 .635-.374.927-.965 1.371-.673.489-1.206 1.06-1.168 1.987l.003.217a.25.25 0 0 0 .25.246h.811a.25.25 0 0 0 .25-.25v-.105c0-.718.273-.927 1.01-1.486.609-.463 1.244-.977 1.244-2.056 0-1.511-1.276-2.241-2.673-2.241-1.267 0-2.655.59-2.75 2.286zm1.557 5.763c0 .533.425.927 1.01.927.609 0 1.028-.394 1.028-.927 0-.552-.42-.94-1.029-.94-.584 0-1.009.388-1.009.94z"/>
</svg>
</p>
<div class="btn-group btn-group-toggle" id="radio_form" data-toggle="buttons">
<label class="myradiobtn btn btn-sm btn-outline-dark active">
<input type="radio" name="formchoice" id="radioblock" value="block" autocomplete="off" checked> Mosaïc blocks (ideogram)
</label>
<label class="myradiobtn btn btn-sm btn-outline-dark">
<input type="radio" name="formchoice" id="radiocurve" value="curve" autocomplete="off"> Data curation (graph)
</label>
</div> -->
<!--Pre-loaded data-->
<div class="menu_division">
<p class="menu_title">
Pre-loaded examples
<svg xmlns="http://www.w3.org/2000/svg" cursor="pointer" width="16" height="16" fill="currentColor" class="bi bi-question-circle preloaded" viewBox="0 0 16 16">
<path d="M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14zm0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16z"/>
<path d="M5.255 5.786a.237.237 0 0 0 .241.247h.825c.138 0 .248-.113.266-.25.09-.656.54-1.134 1.342-1.134.686 0 1.314.343 1.314 1.168 0 .635-.374.927-.965 1.371-.673.489-1.206 1.06-1.168 1.987l.003.217a.25.25 0 0 0 .25.246h.811a.25.25 0 0 0 .25-.25v-.105c0-.718.273-.927 1.01-1.486.609-.463 1.244-.977 1.244-2.056 0-1.511-1.276-2.241-2.673-2.241-1.267 0-2.655.59-2.75 2.286zm1.557 5.763c0 .533.425.927 1.01.927.609 0 1.028-.394 1.028-.927 0-.552-.42-.94-1.029-.94-.584 0-1.009.388-1.009.94z"/>
</svg>
</p>
<select class="custom-select custom-select-sm" id="organism">
<option value="Organism">--Organism--</option>
</select>
<select class="custom-select custom-select-sm chosen-select" id="sample">
<option value="Sample">Sample</option>
</select>
</div>
<!--Custom data-->
<p class="menu_title">
With your own data
<svg xmlns="http://www.w3.org/2000/svg" cursor="pointer" width="16" height="16" fill="currentColor" class="bi bi-question-circle yourdata" viewBox="0 0 16 16">
<path d="M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14zm0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16z"/>
<path d="M5.255 5.786a.237.237 0 0 0 .241.247h.825c.138 0 .248-.113.266-.25.09-.656.54-1.134 1.342-1.134.686 0 1.314.343 1.314 1.168 0 .635-.374.927-.965 1.371-.673.489-1.206 1.06-1.168 1.987l.003.217a.25.25 0 0 0 .25.246h.811a.25.25 0 0 0 .25-.25v-.105c0-.718.273-.927 1.01-1.486.609-.463 1.244-.977 1.244-2.056 0-1.511-1.276-2.241-2.673-2.241-1.267 0-2.655.59-2.75 2.286zm1.557 5.763c0 .533.425.927 1.01.927.609 0 1.028-.394 1.028-.927 0-.552-.42-.94-1.029-.94-.584 0-1.009.388-1.009.94z"/>
</svg>
</p>
<!--type of data-->
<div class="menu_division">
<p class="menu_title">
<a id="title_form" data-toggle="collapse" href="#collapseInput" aria-expanded="false" aria-controls="collapseExample">
Input files
</a>
<svg xmlns="http://www.w3.org/2000/svg" cursor="pointer" width="16" height="16" fill="currentColor" class="bi bi-question-circle input" viewBox="0 0 16 16">
<path d="M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14zm0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16z"/>
<path d="M5.255 5.786a.237.237 0 0 0 .241.247h.825c.138 0 .248-.113.266-.25.09-.656.54-1.134 1.342-1.134.686 0 1.314.343 1.314 1.168 0 .635-.374.927-.965 1.371-.673.489-1.206 1.06-1.168 1.987l.003.217a.25.25 0 0 0 .25.246h.811a.25.25 0 0 0 .25-.25v-.105c0-.718.273-.927 1.01-1.486.609-.463 1.244-.977 1.244-2.056 0-1.511-1.276-2.241-2.673-2.241-1.267 0-2.655.59-2.75 2.286zm1.557 5.763c0 .533.425.927 1.01.927.609 0 1.028-.394 1.028-.927 0-.552-.42-.94-1.029-.94-.584 0-1.009.388-1.009.94z"/>
</svg>
</p>
<div id="switch" style="display: none;" class="custom-control custom-switch">
<input type="checkbox" class="custom-control-input" id="Switch">
<label class="custom-control-label" for="Switch">Curve based mode</label>
</div>
<div id="smooth" class="custom-control custom-switch">
<input type="checkbox" class="custom-control-input" id="Smooth">
<label class="custom-control-label" for="Smooth">Smooth mode</label>
</div> -->
<!-- data-->
<div class="collapse" id="collapseInput">
<form class="my-form">
<textarea id="editorAnnot" rows="3" class="form-control" placeholder="Insert values here" ></textarea>
<div class="custom-file" style="width:90%;">
<input type="file" class="custom-file-input" id="dataFile" accept=".txt, .csv, .tab, .tsv">
<label class="custom-file-label" for="dataFile">Choose file</label>
</div>
</form>
</div>
</div>
<div class="menu_division">
<!--Chrom length data-->
<div>
<form class="my-form">
<p class="menu_title">
<a id="title_form" data-toggle="collapse" href="#collapseChr" aria-expanded="false" aria-controls="collapseExample">
Chromosomes size and labels
</a>
<svg xmlns="http://www.w3.org/2000/svg" cursor="pointer" width="16" height="16" fill="currentColor" class="bi bi-question-circle chrom" viewBox="0 0 16 16">
<path d="M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14zm0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16z"/>
<path d="M5.255 5.786a.237.237 0 0 0 .241.247h.825c.138 0 .248-.113.266-.25.09-.656.54-1.134 1.342-1.134.686 0 1.314.343 1.314 1.168 0 .635-.374.927-.965 1.371-.673.489-1.206 1.06-1.168 1.987l.003.217a.25.25 0 0 0 .25.246h.811a.25.25 0 0 0 .25-.25v-.105c0-.718.273-.927 1.01-1.486.609-.463 1.244-.977 1.244-2.056 0-1.511-1.276-2.241-2.673-2.241-1.267 0-2.655.59-2.75 2.286zm1.557 5.763c0 .533.425.927 1.01.927.609 0 1.028-.394 1.028-.927 0-.552-.42-.94-1.029-.94-.584 0-1.009.388-1.009.94z"/>
</svg>
</p>
<div class="collapse" id="collapseChr">
<select class="custom-select custom-select-sm select_chrom" id="chromosomes">
<option value="Chrom">Choose organism</option>
</select>
<br/><br/>
or upload your own
<textarea id="editorChr" rows="3" class="form-control" placeholder="Insert values here" ></textarea>
<div class="custom-file" style="width:90%;">
<input type="file" class="custom-file-input" id="lenFile" accept=".txt, .csv, .tab, .tsv">
<label class="custom-file-label" for="lenFile">Choose file</label>
</div>
<!--Ploidy-->
<br/>
<br/>
<label for="selectorploidy">Global ploidy</label>
<select name="select" id="selectorploidy" class="custom-select-sm">
<option value="1">1</option>
<option value="2" selected>2</option>
<option value="3">3</option>
<option value="4">4</option>
</select>
<!--Letters show / hide-->
<div class="custom-control custom-switch">
<input type="checkbox" class="custom-control-input" id="SwitchLetters" checked ">
<label class="custom-control-label" for="SwitchLetters">Show Labels</label>
</div>
</div>
</form>
</div>
</div>
<!--Colors data-->
<div class="menu_division">
<form class="my-form">
<p class="menu_title">
<a id="title_form" data-toggle="collapse" href="#collapseColor" aria-expanded="false" aria-controls="collapseExample">
Colors (optional)
</a>
<svg xmlns="http://www.w3.org/2000/svg" cursor="pointer" width="16" height="16" fill="currentColor" class="bi bi-question-circle colors" viewBox="0 0 16 16">
<path d="M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14zm0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16z"/>
<path d="M5.255 5.786a.237.237 0 0 0 .241.247h.825c.138 0 .248-.113.266-.25.09-.656.54-1.134 1.342-1.134.686 0 1.314.343 1.314 1.168 0 .635-.374.927-.965 1.371-.673.489-1.206 1.06-1.168 1.987l.003.217a.25.25 0 0 0 .25.246h.811a.25.25 0 0 0 .25-.25v-.105c0-.718.273-.927 1.01-1.486.609-.463 1.244-.977 1.244-2.056 0-1.511-1.276-2.241-2.673-2.241-1.267 0-2.655.59-2.75 2.286zm1.557 5.763c0 .533.425.927 1.01.927.609 0 1.028-.394 1.028-.927 0-.552-.42-.94-1.029-.94-.584 0-1.009.388-1.009.94z"/>
</svg>
</p>
<div class="collapse" id="collapseColor">
<p class="menu_title">
<a class="btn btn-sm btn-outline-dark" id="title_form_2" data-toggle="collapse" href="#palette" aria-expanded="false" aria-controls="palette">
Choose existing palette
</a>
</p>
<br/><br/>
<div class="collapse" id="palette">
</div>
or enter your own color data
<textarea id="editorColor" rows="3" class="form-control" placeholder="Insert values here" ></textarea>
<div class="custom-file" style="width:90%;">
<input type="file" class="custom-file-input" id="colorFile" accept=".txt, .conf, .csv, .tab, .tsv">
<label class="custom-file-label" for="colorFile">Choose file</label>
</div>
</div>
</form>
</div>
<!--Bed data-->
<div class="menu_division">
<form class="my-form">
<p class="menu_title">
<a id="title_form" data-toggle="collapse" href="#collapseAnnot" aria-expanded="false" aria-controls="collapseExample">
Annotations (optional)
</a>
<svg xmlns="https://www.w3.org/2000/svg" cursor="pointer" width="16" height="16" fill="currentColor" class="bi bi-question-circle bed" viewBox="0 0 16 16">
<path d="M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14zm0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16z"/>
<path d="M5.255 5.786a.237.237 0 0 0 .241.247h.825c.138 0 .248-.113.266-.25.09-.656.54-1.134 1.342-1.134.686 0 1.314.343 1.314 1.168 0 .635-.374.927-.965 1.371-.673.489-1.206 1.06-1.168 1.987l.003.217a.25.25 0 0 0 .25.246h.811a.25.25 0 0 0 .25-.25v-.105c0-.718.273-.927 1.01-1.486.609-.463 1.244-.977 1.244-2.056 0-1.511-1.276-2.241-2.673-2.241-1.267 0-2.655.59-2.75 2.286zm1.557 5.763c0 .533.425.927 1.01.927.609 0 1.028-.394 1.028-.927 0-.552-.42-.94-1.029-.94-.584 0-1.009.388-1.009.94z"/>
</svg>
</p>
<div class="collapse" id="collapseAnnot">
<textarea id="editorBed" rows="3" class="form-control" placeholder="Insert values here" ></textarea>
<div class="custom-file" style="width:90%;">
<input type="file" class="custom-file-input" id="bedFile" >
<label class="custom-file-label" for="bedFile" id="bedLabel" >Choose file</label>
</div>
</div>
</form>
</div>
<!--Genome browser link data-->
<div class="menu_division">
<form class="my-form">
<p class="menu_title">
<a id="title_form" data-toggle="collapse" href="#collapseGB" aria-expanded="false" aria-controls="collapseExample">
Genome browser (optional)
</a>
<svg xmlns="http://www.w3.org/2000/svg" cursor="pointer" width="16" height="16" fill="currentColor" class="bi bi-question-circle gb" viewBox="0 0 16 16">
<path d="M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14zm0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16z"/>
<path d="M5.255 5.786a.237.237 0 0 0 .241.247h.825c.138 0 .248-.113.266-.25.09-.656.54-1.134 1.342-1.134.686 0 1.314.343 1.314 1.168 0 .635-.374.927-.965 1.371-.673.489-1.206 1.06-1.168 1.987l.003.217a.25.25 0 0 0 .25.246h.811a.25.25 0 0 0 .25-.25v-.105c0-.718.273-.927 1.01-1.486.609-.463 1.244-.977 1.244-2.056 0-1.511-1.276-2.241-2.673-2.241-1.267 0-2.655.59-2.75 2.286zm1.557 5.763c0 .533.425.927 1.01.927.609 0 1.028-.394 1.028-.927 0-.552-.42-.94-1.029-.94-.584 0-1.009.388-1.009.94z"/>
</svg>
</p>
<div class="collapse" id="collapseGB">
<select class="custom-select custom-select-sm select_gb" id="gb">
<option value="gb">Choose genome browser</option>
</select>
<br/><br/>
or enter your own
<input id="editorGB" type="text" class="form-control" placeholder="Insert values here">
</div>
</form>
</div>
<!--Button-->
<div class="button_div">
<button id="submit" class="btn btn-sm btn-outline-success my-btn">Submit</button>
<!--Clear-->
<button class="btn btn-sm btn-outline-danger" onclick="location.reload(true);" id="clear">Clear</button>
<!-- Update -->
<button class="btn btn-sm btn-outline-primary" id="reload">Update image</button>
<div>
<!--Download image-->
<button id="download" style="display: none;" class="btn btn-sm btn-outline-dark" id="reload">Download data and image</button>
</div>
<div >
<!--Save as url-->
<button id="saveasurl" class="btn btn-sm btn-outline-dark">Save as url</button>
<!-- The text field -->
</div>
<div class="saveAsURL" style="display: none;">
<input id="url" type="text" class="form-control form-control-sm" >
<!-- The button used to copy the text -->
<button id="copy" class="btn btn-sm btn-outline-dark">Copy</button>
</div>
</div>
</div>
</li>
</ul>
</li>
</ul>
</aside>
</div>
<!-- fin de la sidebar -->
<!-- legende flottante -->
<div id=floating_legend>
<button type="button" class="btn btn-dark btn-sm" style="display: none" id="legend_button" data-toggle="collapse" data-target="#legend_div" aria-expanded="false" aria-controls="legend_div">
Legend
</button>
<div class="collapse" id="legend_div" >
</div>
</div>
<!-- fin legende flottante -->
<div id="home" class="container">
<div id="welcome">
<!--JUMBOTRON-->
<div class="jumbotron jb_welcome">
<h1 class="display-2">Welcome to GeMo</h1><br/>
</div>
</div> <!--fin du jumbotron-->
<div id="help-container"></div>
</div><!--fin du home-->
<div id="page-content-wrapper" role="main" class="ideo_container">
<!-- The ideogram goes here. -->
</div>
<div id="chrompaint" style="display: none">
<div id="box3">
<div id="graph"></div>
<div id="selector">
<div id="floorContainer">
</div>
</div>
</div>
<div id="box4">
</div>
<!-- fin chrompaint -->
</div>
</div>
<div class="tooltip_templates" >
<span class="help_content" id="tooltip_blocOrCurve">
<pre>
Mosaic visualization shows colored blocs on the chromosomes:
<img class="tooltip_img" src="./public/img/bloc.png"></img>
Data curation displays the ancestral components along the chromosomes
on an interactive graph to help the mosaïc construction:
<img class="tooltip_img" src="./public/img/curve.png"></img>
<pre>
</span>
</div>
<div class="tooltip_templates" >
<span class="help_content" id="tooltip_preloaded">
<pre>
Preloaded data from published studies or generated with VCFHunter or TraceAncestor.
<pre>
</span>
</div>
<div class="tooltip_templates" >
<span class="help_content" id="tooltip_your_data">
<pre>
Generate a visualization with your custom chromosomes data.
<pre>
</span>
</div>
<div class="tooltip_templates" >
<span class="help_content" id="tooltip_help">
<pre>
Chromosome data format, each column tab separated
chr, len, centromereInf (optional), centromereSup (optional), label (optional)
example :
chr len centromereInf centromereSup label
chr01 37945898 AB
chr02 34728925 11000000 AB
chr03 40528553 15000000 AB
chr04 44598304 13000000 22000000 AB
chr05 46248384 23000000 26000000 AB
chr06 42818424 23000000 27000000 AB
chr07 38870123 20000000 23000000 AB
chr08 50124231 21000000 25000000 AB
chr09 47435180 25000000 29000000 AB
chr10 39038070 12000000 16000000 AB
chr11 34441343 15000000 20000000 AB
<pre>
</span>
</div>
<div class="tooltip_templates" >
<div class="help_content" id="tooltip_input">
<span class="help_content" ">
<pre>
Enter a block file to display the mosaïc visualization :
chr haplotype start end ancestral_group
01 0 1 29070452 g4
01 1 1 29070452 g4
02 0 1 29511734 g4
02 1 1 29511734 g4
<img class="tooltip_img" src="./public/img/bloc.png"></img>
Enter a file containing the ancestral components along the chromosomes to display an interactive graph
and generate a new mosaïc visualisation :
chr start end V T S
chr01 1145 189582 0.001671983513048138 0.014082301923852172 0.0016386866759508464
chr01 189593 356965 0.0012441961973068657 0.012867234592909085 0.0018101312755326665
chr01 356968 488069 0.0011179557674005532 0.010035172902205201 0.000759432489203596
chr01 488097 633373 0.002678217164025965 0.010470727908771585 0.003896031529700906
<img class="tooltip_img" src="./public/img/curve.png"></img>
Generating datasets
In order to generate ready-to-use datasets, analyses can be conducted with the following software:
* VCFHunter
VCFHunter is a suite of python scripts enabling chromosome painting of indivisual based on the contribution
of ancestral groups using VCF files.
Please look at the tutorial:
https://github.com/SouthGreenPlatform/VcfHunter/blob/master/turorial_painting_GEMO_visualization.md
* TraceAncestor
TraceAncestor permits to estimate the allelic dosage of ancestral alleles in hybrid individuals and then
to perform chromosom painting.
Please look at the tutorial:
https://github.com/SouthGreenPlatform/TraceAncestor_gemo
<pre>
</span>
</div>
</div>
<div class="tooltip_templates" >
<div class="help_content" id="tooltip_colors">
<span class="help_content" ">
<pre>
group name hex
un undef_group #b4b4b4
g6 group6 #c00000
g5 group5 #9a029a
g3 group3 #1440cd
g2 group2 #ffc000
g1 group1 #000000
g4 group4 #00b009
g7 group7 #b4b4b4
g0 group0 #000000
<pre>
</span>
</div>
</div>
<div class="tooltip_templates" >
<div class="help_content" id="tooltip_bed">
<span class="help_content" id="tooltip_bed">
<pre>
bed file example :
chr01 5287838 5289224 gene 0 -
chr01 15485703 15486813 gene 0 +
chr01 15490016 15492587 gene 0 +
chr02 2276353 2277821 gene 0 +
chr02 15358393 15361764 gene 0 +
<pre>
</span>
</div>
</div>
<div class="tooltip_templates" >
<div class="help_content" id="tooltip_gb">
<span class="help_content" id="tooltip_gb">
<pre>
Jbrowse link example :
https://banana-genome-hub.southgreen.fr/content/m-acuminata-dh-pahang-version-2/
GeMo will generate tooltips when hovering over each chromosomal block.
A link is displayed to explore a chromosome block directly on jbrowse.
<img class="tooltip_img" src="./public/img/tooltip.png"></img>
The mosaic data are sent as tracks to be viewed in jbrowse.
<img class="tooltip_img" src="./public/img/jbrowse.png"></img>
<pre>
</span>
</div>
</div>
</body>
</html>