-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
1447 lines (1359 loc) · 73.4 KB
/
index.html
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
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>C-State v0.2.3</title>
<!-- CSS links -->
<link href="scripts/require/bootstrap-3.3.7-dist/css/bootstrap.min.css" rel="stylesheet">
<link href="scripts/require/animate.min.css" rel="stylesheet">
<link href="scripts/require/tipsy/tipsy.css" rel="stylesheet">
<link href="styles/main.css" rel="stylesheet">
<link href="styles/modals.css" rel="stylesheet">
</head>
<body>
<div class="container-fluid">
<!--C-State Logo-->
<div style="position: absolute; top: 0; left: 0; width: 200px; height: 65px">
<a href="http://ccmb.res.in/rakeshmishra/c-state/" target="_blank"> <img style="margin-left: 5px; margin-top: 5px;" width="100%" src="images/c-state_logo.png" alt="C-State Logo"></a>
<br><span style="position:absolute; margin-top: -15px; margin-left: 160px; font-weight: bold">v0.2.3</span>
</div>
<div id="screenalert" v-cloak class="alert alert-warning fade in alert-dismissable" v-if="screen.width > 2000" style="position: absolute; top: 10; left: 0; right: 0; width: 50vw; margin: auto">
<a href="#" class="close" data-dismiss="alert" aria-label="close">×</a>
Greater than Full HD screen resolution detected! Please adjust your browser zoom settings if layout breaks.
</div>
<!--CCMB Logo-->
<div style="position: absolute; top: 0; right: 0; ">
<a href="http://ccmb.res.in/" target="_blank"> <img style="float: right; margin-right: 20px; margin-top: 12px; width: 70%" src="images/ccmb_logo_new.png" alt="CSIR Logo">
</div>
<div class="panel-group" id="main">
<div id="files" class="panel panel-default active" href="#files">
<div class="panel-heading">
<h4 class="panel-title">
<a href="#files">Files</a>
</h4>
</div>
<div id="files-body" class="panel-collapse collapse in">
<div class="panel-body" v-cloak id="main-file">
<div class="row">
<div class="container-fluid col-md-9" style="border-right: 1px dotted #666666">
<table style="width: 60%; margin: auto; text-align: center">
<col style="width: 15%">
<col style="width: 20%">
<col style="width: 20%">
<tr>
<th></th>
<th>Select Species</th>
<th>Select Build</th>
</tr>
<tr>
<td>
<label class="text-center main-button btn btn-default btn-file" data-toggle="tooltip" data-placement="top" title="A list of gene names or identifiers in a txt file, one entry per line. See example data on C-State website. Or, you can upload previously downloaded JSON file of C-State.">Load Gene List/C-State Data
<input type="file" style="display: none" @change="onFileUpload" name="file">
</label>
</td>
<td>
<select @change="onGenomeSelect" :disabled="typeSelected === 'plotdata'" class="form-control" v-model="genomeSelected">
<option v-for="option in genomes.species">
{{ option.name }}
</option>
</select>
</td>
<td>
<select @change="onVersionSelect" :disabled="typeSelected === 'plotdata'" class="form-control" v-model="versionSelected">
<option v-for="option in versionOptions">
{{ option }}
</option>
</select>
</td>
</tr>
</table><br>
<table style="width: 80%; margin: auto">
<col style="width: 15%">
<col style="width: 20%">
<col style="width: 20%">
<col style="width: 10%">
<col style="width: 15%">
<col style="width: 15%">
<tr>
<th>File Selected</th>
<th>Select File Type</th>
<th>Select Identifier</th>
<th></th>
<th>Upstream Flank <br>(in KB)</th>
<th>Downstream Flank <br>(in KB)</th>
</tr>
<tr>
<td style="text-align:center">
<span v-if="inputFile">{{ inputFile.name }}</span>
<span v-else>No File Selected</span>
</td>
<td>
<select @change="onTypeSelect" class="form-control" v-model="typeSelected">
<option v-for="option in typeOptions" :value="option.value">
{{ option.name }}
</option>
</select>
</td>
<td>
<select @change="onIDSelect" :disabled="typeSelected === 'plotdata'" class="form-control" v-model="idSelected">
<option v-for="option in idOptions" :value="option.value">
{{ option.name }}
</option>
</select>
</td>
<td>
</td>
<td>
<input type="number" min="0" style="text-align:right" :disabled="typeSelected === 'plotdata'" class="form-control" v-model="flankUp">
</td>
<td>
<input type="number" min="0" style="text-align:right" :disabled="typeSelected === 'plotdata'" class="form-control" v-model="flankDown">
</td>
</tr>
</table>
</div>
<div class="container-fluid col-md-3" style="text-align:center">
<span style="font-size: 20px; font-weight: bold;">OR</span><br><br>
<button onclick="exampleScope()" id="example-button" class="text-center main-button btn btn-default btn-file" data-toggle="tooltip" data-placement="top" title="Don't have data? Try C-State with pre-loaded datasets">Load Example Data</button><br>
<span style="margin-left: 6px; display: inline-block; margin-top: 20px;">of
<input id="example-number" type="number" size="1" min="1" max="6" value="4" style="margin-left: 6px; width:50px;text-align: right;"/>
Cell Types</span><br>
</div>
</div>
<!--Main File Div Ends Here-->
</div>
<div class="panel-body" id="feature-files" v-cloak v-if="showDiv">
<div class="row">
<div class="container-fluid col-md-9">
<table style="width: 80%; margin: auto">
<!--<col style="width: 2%">
<col style="width: 10%">
<col style="width: 1%">
<col style="width: 10%">
<col style="width: 10%">-->
<tr>
<td>
<label :disabled="!showFeatureButton" title="Select all your feature data files in BED format (see example data on C-State website), ideally named as CellTypeName_FeatureName. Selected files are shown below. Edit file details manually in case they are missing or erroneous." style="width: 180px" class="text-center live-tipsy main-button btn btn-default btn-file">Load Feature Files
<input :disabled="!showFeatureButton" @change="onFileUpload" type="file" style="display: none" name="files[]" multiple>
</label>
</td>
<td>
<label :disabled="inputFiles.length === 0" title="" style="width: 180px" class="text-center live-tipsy main-button btn btn-default btn-file">Load Expression Data
<input :disabled="!showFeatureButton" @change="onExpFileUpload" type="file" style="display: none" name="files[]" multiple>
</label>
</td>
<td>
<button :disabled="inputFiles.length === 0" @click="getFileData" style="width: 180px" type="button" class="btn btn-success">Process All Files</button>
</td>
<td>
<button type="button" class="btn btn-primary" :disabled="!showPlotButton" style="width: 180px" onclick="formatPlotScope()">
View Data
</button>
</td>
</tr>
</table><br>
</div>
</div>
<div class="row"><br>
<div v-if="expFiles.length > 0" style="text-align: justify; margin-left: 2.5vw; font-weight: bold; font-size:14px">Expression Data Files Selected: {{ expFiles.length }} </div>
<table v-if="expFiles.length > 0" style="margin: 20px 2.5vw; width: 60%" class="table table-hover">
<tr>
<th>File Name</th>
<th>CellType Name</th>
<th>
<button :disabled="expFiles.length === 0" @click="expFiles.splice(0)" type="button" class="btn btn-danger">Clear All Files</button>
</th>
</tr>
<tr is="expfilerow" :file="file" @expadd="addExpData" @expremove="expFiles.splice(index, 1)" :key="file.name" v-for="(file, index) in expFiles">
</tr>
</table><br>
<div v-if="inputFiles.length > 0" style="text-align: justify; margin-left: 2.5vw; font-weight: bold; font-size:14px">Feature Files Selected: {{ inputFiles.length }} </div>
<table style="margin-top:20px; width:95%; margin-left: auto; margin-right: auto" class="table table-hover">
<tr v-if="inputFiles.length > 0">
<th>File Name</th>
<th>CellType Name
<span class="glyphicon glyphicon-info-sign" title="This name is used to group the features of a given cell/tissue type, experimental condition or developmental stage"></span>
</th>
<th>Feature Name
<span class="glyphicon glyphicon-info-sign" title="Feature names must be consistent across cell types"></span>
</th>
<th>File Format</th>
<!--<th>Color</th>-->
<th><button :disabled="inputFiles.length === 0" @click="inputFiles.splice(0)" type="button" title="Removes all files from C-State. However, the view pane stays populated with the last gene set till 'Process All Files' button is pressed again. Individual files can be removed using the close button provided next to each entry." class="btn btn-danger my-tipsy-class">Clear All Files</button></th>
</tr>
<tr is="filerow" :file="file" @add="addData" @remove="inputFiles.splice(index, 1)" :key="file.name" v-for="(file, index) in inputFiles">
</tr>
</table>
</div>
<!--Feature Files Div Ends Here-->
</div>
<!--Files Div Ends Here-->
</div>
<!--File Accordion Ends Here-->
</div>
<!--View Accordion-->
<div id="view" class="panel panel-default viewClass" href="#view-body" v-cloak>
<div class="panel-heading">
<h4 class="panel-title">
<a href="#view-body">View - Showing {{numFilteredGenes}} of {{genes.length}} genes</a>
<a style="float: right" v-if="activeFilters > 0">{{activeFilters}} Active Filter(s)</a>
<a style="float: right" v-if="activeCutOff">Feature cut-offs active<span v-if="activeFilters > 0" style="margin-left: 3px; margin-right: 3px;">|</span></a>
<!--<p style="text-align:center"> </p>-->
</h4>
</div>
<div id="view-body" class="panel-collapse collapse">
<div class="row">
<div class="container-fluid col-md-10" v-if="numFilteredGenes > 0">
<my-legend loc='mainpanel' style="margin: 5px 20px 0px 20px">
</my-legend>
</div>
<div class="container-fluid col-md-2" v-if="numFilteredGenes > 0" style="height: 50px; text-align: right">
<span style="height: 50px; display: block; margin-top: 20px; margin-right: 15px; font-weight: bold">Scale in KB</span>
</div>
<div class="container-fluid" style="margin-left:10px; margin-right:10px;">
<table id="header-table" style="width:100%; table-layout: fixed; margin-bottom: 0px;" class="table table-condensed">
<!--<thead><tr style="display: block; position: relative">-->
<th style="text-align: center" v-for="type in info.celltypes"> {{ type.name }}</th>
<!--</tr></thead>-->
</table>
</div>
<div class="container-fluid dragscroll" style="margin-left:10px; margin-right:10px; height: 85vh; overflow:auto" id='plotarea'>
<table id="gene-table" style="width:100%;" class="table table-bordered table-condensed">
<tr is="generow" :gene="gene" v-if="gene.show" v-for="gene in genes"></tr>
<!--</tbody>-->
</table>
</div>
</div>
</div>
</div>
<!--Main Div Ends Here-->
</div>
<!--Gene modal div-->
<div id='gene-modal' v-cloak>
<div id='gene-modal-body' class="modal-wrapper animated zoomIn" v-if="showModal">
<div class="modal-container">
<div class="modal-header" style="margin: 0px 20px 0px 20px">
<span style="margin-top: 0px; font-size: 24px">{{ gene.name }}</span>
<span style="margin-top: 0px; margin-left: 2vw; font-size: 18px">{{ gene.geneinfo.chrom }}:{{ gene.geneinfo.txStart }}-{{gene.geneinfo.txEnd}}({{gene.geneinfo.strand}})</span>
<span style="font-size: 14px; float: right; font-weight: bold">Scale in KB</span>
</div>
<div class="modal-body dragscroll" style="overflow: auto;">
<table class="modaltable" style="margin: 0px; table-layout: fixed">
<tr is="modalpanel" :index="index-1" :gene="gene" v-for="index in numCellTypes">
</tr>
</table>
</div>
<div class="modal-footer">
<div class="col-md-8" style="text-align: left">
<my-legend loc='geneModal' style="margin: 0px 20px 0px 20px; width: 80%"></my-legend>
</div>
<div class="col-md-4">
<button class="btn btn-info" @click="saveAsSVG()" title="Save an SVG image of the view/zoom as visible" >Download As SVG</button>
<button class="btn btn-primary" onclick="events.$emit('reset_zoom')">Reset Zoom</button>
<button class="btn btn-danger" onclick="hideGeneModal()">Close</button>
</div>
</div>
</div>
</div>
</div>
<!--Common Mask for panels-->
<div id="common-mask" onclick="hideSideDivs()" class="modal-mask"></div>
<!--Side Buttons-->
<div id='filter-button' class="side-button">
<button onclick="showFilters()" type="button" title="Filters Panel" class="btn btn-block btn-lg btn-default glyphicon glyphicon-filter"></button>
</div>
<div id='analysis-button' class="side-button">
<button onclick="showAnalysis()" type="button" title="Plots and Analysis" class="btn btn-block btn-lg btn-default glyphicon glyphicon-stats"></button>
</div>
<div id='tables-button' class="side-button">
<button onclick="showTable()" type="button" title="Table Summary" class="btn btn-block btn-lg btn-default glyphicon glyphicon-th-list"></button>
</div>
<div id='download-button' class="side-button">
<button type="button" title="Download Options" onclick="showDownloads()" class="btn btn-block btn-lg btn-default glyphicon glyphicon-download-alt"></button>
</div>
<div id='settings-button' class="side-button">
<button onclick="showSettings()" type="button" title="Settings Panel" class="btn btn-block btn-lg btn-default glyphicon glyphicon-cog"></button>
</div>
<!--Analysis Modal-->
<div id='analysis-modal' v-cloak>
<div id='analysis-body' class="modal-wrapper animated fadeIn" v-if="showAnalysisDiv">
<div class="modal-container">
<!--<div class="modal-header">
<h3 style="text-align: center">Downstream Analysis</h3><br>
</div>-->
<div class="modal-body" style="width:inherit; padding-top: 2px; overflow-y: scroll">
<div class="row" style="text-align: center">
<ul class="nav nav-pills nav-justified" style="font-size: 16px; font-weight: bold">
<li class="active"><a data-toggle="tab" href="#histograms" title="Click to plot Feature Histograms. Axes are described below the plots">Feature Histograms</a></li>
<li><a data-toggle="tab" @click="showAverage=true" title="Click to plot Average Feature Profiles. Axes are described below the plots" href="#average-profile">Average Feature Profile</a></li>
<li><a data-toggle="tab" @click="initializeExp" title="Click to plot Feature Correlations. Axes are described below the plots" href="#expression-scatter">Gene Expression Scatterplots</a></li>
</ul>
</div>
<div class="tab-content">
<div id="histograms" class="tab-pane fade in active">
<div class="row" style="padding: 15px 0px 10px 5vw; border-bottom: 1px dotted #666666">
<button class="btn btn-danger" onclick="hideAnalysis()">Close</button>
<button @click="switchHistCols" style="margin-left: 1vw;" class="btn btn-primary">Switch Rows/Columns</button>
<span style="padding-left: 10vw">Show histogram of
<select class="filter-input" @change="changeHistType" v-model="histType">
<option value="size">Feature Sizes (in bp)</option>
<option value="score">Feature Scores</option>
</select>
</span>
<span style="padding-left: 20px">Color By
<select class="filter-input" @change="changeHistType" v-model="colorHistBy">
<option value="none">None</option>
<option value="feature">Feature Name</option>
</select>
</span>
</div>
<div style="padding-top: 10px" v-if="showHist">
<table class="plot-table" style="margin: auto; width: 100%" v-if="colWiseHist">
<tr>
<th>CellType/Feature</th>
<th v-for="feature in features">{{feature.name}}</th>
</tr>
<tr v-for="(celltype, cellindex) in celltypes">
<td>{{celltype.name}}</td>
<td is="featurehistogram" v-for="(feature, featindex) in features" :type="histType" :colorby="colorHistBy" :featindex="featindex" :cellindex="cellindex" :colwise="true" :feature="feature" :celltype="celltype"></td>
</tr>
</table>
<table class="plot-table" style="margin: auto; width: 100%" v-else>
<tr>
<th>CellType/Feature</th>
<th v-for="celltype in celltypes">{{celltype.name}}</th>
</tr>
<tr v-for="(feature, featindex) in features">
<td>{{feature.name}}</td>
<td is="featurehistogram" v-for="(celltype, cellindex) in celltypes" :type="histType" :colorby="colorHistBy" :featindex="featindex" :cellindex="cellindex" :colwise="false" :feature="feature" :celltype="celltype"></td>
</tr>
</table>
</div>
<div class="modal-footer" style="text-align: justify">
<div class="row">
<div class="container-fluid col-md-9">
<div v-if="histType === 'size'"><strong>X-axis: </strong>Feature Size<br></div>
<div v-if="histType === 'score'"><strong>X-axis: </strong>Feature Score<br></div>
<div><strong>Y-axis: </strong>Frequency<br></div>
Each plot displays the distribution of features based on their sizes or scores. Features from all genes are shown irrespective of any active filters. However, feature cut-offs (applied from Settings panel) are reflected in the plots.
<div v-if="histType === 'score'"><strong>Note: </strong>The histograms cannot be plotted if the loaded feature files do not have peak score information.<br></div>
</div>
<div class="container-fluid col-md-3">
<div style="text-align: right">
<button class="btn btn-info" @click="saveAsSVG('#histograms')">Download as SVG</button>
</div>
</div>
</div>
</div>
<!--</div>-->
</div>
<div id="average-profile" class="tab-pane fade">
<div class="row" style="padding: 15px 0px 10px 5vw; border-bottom: 1px dotted #666666">
<button class="btn btn-danger" onclick="hideAnalysis()">Close</button>
<button @click="switchAvgCols" style="margin-left: 1vw" class="btn btn-primary">Switch Rows/Columns</button>
<span style="padding-left: 5vw">Show
<select class="filter-input" @change="showFiltered" v-model="filtered">
<option :value="{ boolean: false}">All</option>
<option :value="{ boolean: true}">Filtered</option>
</select>Genes
</span>
<span style="padding-left: 40px">
<input type="radio" v-model="tssonly" :value="false" @change="showFiltered" title="Display gene body along with flanks chosen in the files pane">
<span title="Display gene body along with flanks chosen in the files pane">Show Entire Regions</span>
<input style="margin-left: 20px;" type="radio" v-model="tssonly" :value="true" title="Select distance around TSS and click Plot button on the right to display average TSS profile">
<span title="Select distance around TSS and click Plot button on the right to display average TSS profile">Show TSS only</span>
<table style="width: 15%; margin: auto; display: inline-table; text-align: center">
<tr>
<td>Upstream</td>
<td>Downstream</td>
</tr>
<tr>
<td>
<input type="number" min="0" style="text-align:right; width: 40%" :disabled="!tssonly" class="filter-input" v-model.number="tssUp">KB
</td>
<td>
<input type="number" min="0" style="text-align:right; width: 40%" :disabled="!tssonly" class="filter-input" v-model.number="tssDown">KB
</td>
</tr>
</table>
<button style="margin-left: 10px" :disabled="!tssonly" class="btn btn-primary" @click="showFiltered">Plot</button>
</span>
</div>
<div style="padding-top: 10px" v-if="showAverage">
<table class="plot-table" style="margin: auto; width: 100%" v-if="colWiseAvg">
<tr>
<th>CellType/Feature</th>
<th v-for="feature in features">{{feature.name}}</th>
</tr>
<tr v-for="(celltype, cellindex) in celltypes">
<td>{{celltype.name}}</td>
<td is="avgprofile" v-for="(feature, featindex) in features" :featindex="featindex" :cellindex="cellindex" :colwise="true"
:celltype="celltype" :tssonly="tssonly" :tssup="tssUp" :tssdown="tssDown" :feature="feature" :filtered="filtered.boolean">
</td>
</tr>
</table>
<table class="plot-table" style="margin: auto; width: 100%" v-else>
<tr>
<th>CellType/Feature</th>
<th v-for="(celltype, cellindex) in celltypes">{{celltype.name}}</th>
</tr>
<tr v-for="(feature, featindex) in features">
<td>{{feature.name}}</td>
<td is="avgprofile" v-for="(celltype, cellindex) in celltypes" :featindex="featindex" :cellindex="cellindex" :colwise="false"
:celltype="celltype" :tssonly="tssonly" :tssup="tssUp" :tssdown="tssDown" :feature="feature" :filtered="filtered.boolean">
</td>
</tr>
</table>
</div>
<div class="modal-footer" style="text-align: justify">
<div class="row">
<div class="container-fluid col-md-9">
<div v-if="tssonly"><strong>X-axis </strong>represents selected region in KB around TSS of all genes</div>
<div v-else><strong>X-axis </strong>represents gene body (TSS to TES) along with upstream and downstream flanks</div>
<div><strong>Y-axis: </strong>Frequency<br></div>
<div v-if="tssonly">Plots the distribution of features(Y-axis) around TSS (X-axis), averaged across all genes. TSS is indicated by a vertical gray line within the plot</div>
<div v-else>Plots the distribution of features averaged across all genes (Y-axis) along the region specified by the user (X-axis). TSS and TES are indicated by vertical gray lines within the plots.</div>
<div v-if="!tssonly"><strong>Hint: </strong>Reduce upstream and downstream flanks from Files accordion if TSS and TES appear too close to each other.</div>
</div>
<div class="container-fluid col-md-3">
<div style="text-align: right">
<button class="btn btn-info" @click="saveAsSVG('#average-profile')">Download as SVG</button>
</div>
</div>
</div>
</div>
</div>
<!--<div id="feature-correlation" class="tab-pane fade">
<div class="row" style="padding: 15px 0px 10px 5vw; border-bottom: 1px dotted #666666">
<button class="btn btn-danger" onclick="hideAnalysis()">Close</button>
<button @click="switchCorCols" style="margin-left: 1vw;" class="btn btn-primary">Switch Rows/Columns</button>
<span style="padding-left: 10vw" v-if="colWiseCor">Center By
<select class="filter-input" v-model="corBy">
<option v-for="feature in features" :value="feature.name">{{feature.name}}</option>
</select>
</span>
<span style="padding-left: 10vw" v-else>Center By
<select class="filter-input" v-model="corBy">
<option v-for="celltype in celltypes" :value="celltype.value">{{celltype.name}}</option>
</select>
</span>
<table style="width: 30%; margin: auto; display: inline-table; text-align: center">
<tr>
<td>Upstream:
<input type="number" min="0" style="text-align:right; width: 30%" :disabled="corBy === ''" class="filter-input" v-model.number="corUp">KB
</td>
<td>Downstream:
<input type="number" min="0" style="text-align:right; width: 30%" :disabled="corBy === ''" class="filter-input" v-model.number="corDown">KB
</td>
</tr>
</table>
<button style="margin-left: 10px" v-if="corBy !== ''" class="btn btn-primary" @click="changeCorType">Plot</button>
</div>
<div style="padding-top: 10px" v-if="showCor">
<table class="plot-table" style="margin: auto; width: 100%" v-if="!colWiseCor">
<tr>
<th>CellType/Feature</th>
<th v-for="feature in features">{{feature.name}}</th>
</tr>
<tr v-for="(celltype, cellindex) in celltypes">
<td>{{celltype.name}}</td>
<td is="featurecorrelation" v-for="(feature, featindex) in features" :featindex="featindex" :cellindex="cellindex" :colwise="false"
:celltype="celltype" :flankup="corUp" :flankdown="corDown" :feature="feature" :by="corBy">
</td>
</tr>
</table>
<table class="plot-table" style="margin: auto; width: 100%" v-else>
<tr>
<th>CellType/Feature</th>
<th v-for="(celltype, cellindex) in celltypes">{{celltype.name}}</th>
</tr>
<tr v-for="(feature, featindex) in features">
<td>{{feature.name}}</td>
<td is="featurecorrelation" v-for="(celltype, cellindex) in celltypes" :featindex="featindex" :cellindex="cellindex" :colwise="true"
:celltype="celltype" :flankup="corUp" :flankdown="corDown" :feature="feature" :by="corBy">
</td>
</tr>
</table>
</div>
<div class="modal-footer" style="text-align: justify">
<div class="row">
<div class="container-fluid col-md-9">
<div><strong>X-axis: </strong>Upstream and downstream distance in KB with respect to selected cell type/feature (chosen in the dropdown above). 0 indicates the center of all peaks of the chosen cell type/feature</div>
<div><strong>Y-axis: </strong>Frequency</div>
<div>Plots the relationship of features with respect to each other, centered by the chosen cell type/feature</div>
</div>
<div class="container-fluid col-md-3">
<div style="text-align: right">
<button class="btn btn-info" @click="saveAsSVG('#feature-correlation')">Download as SVG</button>
</div>
</div>
</div>
</div>
</div>-->
<div id="expression-scatter" class="tab-pane fade">
<div class="row" style="padding: 15px 0px 10px 5vw; border-bottom: 1px dotted #666666">
<button class="btn btn-danger" onclick="hideAnalysis()">Close</button>
<span style="padding-left: 5vw">Show
<select class="filter-input" @change="showFilteredExp" v-model="filtered">
<option :value="{ boolean: false}">All</option>
<option :value="{ boolean: true}">Filtered</option>
</select>Genes
</span>
<span style="padding-left: 2vw">
<input type="checkbox" v-model="showDiagonal" @change="showFilteredExp">Show diagonal line
</span>
<span style="padding-left: 5vw">
<table style="margin: auto; padding-top: 5px; width: 25%; display: inline-table; text-align: center">
<tr>
<td>Axis min
<input type="number" min="0" step="0.01" style="text-align:right; width: 40%" class="filter-input" v-model.number="expMin">
</td>
<td>Axis max
<input type="number" min="0" step="0.01" style="text-align:right; width: 40%" class="filter-input" v-model.number="expMax">
</td>
<td>
<button class="btn btn-primary" @click="showFilteredExp">Plot</button>
</td>
</tr>
</table>
</span>
</div>
<div style="padding-top: 10px" v-if="showScatter">
<table class="plot-table" style="width: 100%">
<tr>
<th>CellType</th>
<th v-for="celltype in celltypes">{{celltype.name}}</th>
</tr>
<tr v-for="(ycell, yindex) in celltypes">
<td>{{ycell.name}}</td>
<td is="expscatter" v-for="(xcell, xindex) in celltypes" :xindex="xindex" :yindex="yindex" :xcell="xcell" :ycell="ycell" :filtered="filtered.boolean" :diagonal="showDiagonal" :axismin="expMin" :axismax="expMax">
</td>
</tr>
</table>
</div>
<div class="modal-footer" style="text-align: justify">
<div class="row">
<div class="container-fluid col-md-9">
<div><strong>X-axis: </strong>Gene expression value in celltype specified as column name</div>
<div><strong>Y-axis: </strong>Gene expression value in celltype specified as row name<br></div>
<div>Use axis min and axis max input boxes to change the scale of the plots</div>
</div>
<div class="container-fluid col-md-3">
<div style="text-align: right">
<button class="btn btn-info" @click="saveAsSVG('#expression-scatter')">Download as SVG</button>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!--<div class="modal-footer">
<button class="btn btn-danger" onclick="hideAnalysis()">Close</button>
</div>-->
</div>
</div>
</div>
<!--Filter Modal Div-->
<div id='filter-modal' v-cloak>
<div id='filter-mask' class="modal-wrapper animated slideInLeft" v-if="showFilterDiv">
<div class="modal-container">
<div class="modal-header" style="text-align: center">
<h3>Filters Panel</h3>
<h6>Show/Hide genes that match the criteria set using any combination of the filters provided below
<span class="glyphicon glyphicon-info-sign" title="No Genes or features are removed from the data. All genes can be visualized again by clearing the filters"></span>
</h6>
</div>
<div class="modal-body" style="width:inherit;">
<div class="row" style="text-align: center">
<div style="border-right: 1px solid black; height: 70vh;" class="container-fluid col-md-3">
<h4>Available Filters</h4>
<h6>Click on a filter to add it</h6><br><br>
<h5>Filter Genes By</h5>
<ol style="padding: 0">
<button :disabled="!genesLoaded" data-toggle="tooltip" data-placement="right" style="width: 100%; margin-bottom: 5px" :title="filter.title" class="btn btn-default" :class="{filtergap: filter.type === 'countsFilter'}"
v-for="(filter, index) in availableFilters" @click="addFilter(index)">
{{ filter.name }}
<span class="badge" :style="{ backgroundColor: colors[index] }"> {{ _.filter(activeFilters, ['type', filter.type]).length }}</span>
</button>
</ol>
</div>
<div class="container-fluid col-md-8 dragscroll" style="height: 70vh; overflow-y: auto">
<h4>Active Filters</h4>
<h6 v-if="activeFilters.length > 0">All active filters will be chained and applied sequentially once you click "Apply Filters" below</h6>
<ul style="padding: 0">
<span :key="filter.id" v-for="(filter, index) in activeFilters">
<table style="width: 100%">
<tr>
<td style="width: 85%">
<component :style="{ borderColor: getColor(filter.type) }" :is="filter.type">
</component>
</td>
<td>
<button style="margin-top: 10px; margin-left: 0px;" class="btn btn-default glyphicon glyphicon-remove" @click="activeFilters.splice(index, 1)">
</button>
</td>
</tr>
</table>
</span>
</ul>
</div>
</div>
</div>
<div class="modal-footer">
<button class="btn btn-success" @click="applyFilters">Apply Filters</button>
<button class="btn btn-primary" @click="clearFilters">Clear All Filters</button>
<button class="btn btn-danger" onclick="hideFilterDiv()">Close</button>
</div>
</div>
</div>
</div>
<!--Table Summary Div-->
<div id="table-summary" v-cloak>
<div id='table-body' class="modal-wrapper animated fadeIn" v-if="showTableDiv">
<div class="modal-container">
<div class="modal-body" style="width:inherit; padding-top: 10px; overflow-y: scroll; ">
<div style="text-align: center; font-size: 16px">Showing {{tableData.length}} of {{totalGenes}} genes</div>
<v-client-table v-if="showTableDiv" :data="tableData" :columns="columns" :options="options"></v-client-table>
</div>
<div class="modal-footer">
<div style="float: left; font-size: 16px">
<input type="checkbox" v-model="showFiltered">Show Filtered Genes Only
</div>
<button class="btn btn-primary" @click="copyNames" title="Copy displayed gene names for pasting into other applications">Copy Names to Clipboard</button>
<button class="btn btn-success" @click="exportToExcel">Export Table as Excel</button>
<button class="btn btn-danger" onclick="hideTable()">Close</button>
</div>
</div>
</div>
</div>
<!--Settings Modal Div-->
<div id='settings-modal' v-cloak>
<div id='settings-body' class="modal-wrapper animated slideInLeft" v-if="showSettingsDiv">
<div class="modal-container">
<div class="modal-header">
<div style="text-align: center; font-size: 24px">Settings Panel</div>
<div style="text-align: center;">This panel controls global settings</div>
</div>
<div class="modal-body" style="width:inherit; height: 75vh; overflow-y: auto">
<div class="row" style="text-align: center">
<div class="col-md-4" style="border-right: 1px solid black; height: 70vh;">
<ul class="nav nav-pills nav-stacked">
<li class="active"><a data-toggle="tab" href="#feature-settings">Feature Tracks</a></li>
<li><a data-toggle="tab" href="#mainpanel-settings">View Panels</a></li>
<li><a data-toggle="tab" href="#genemodal-settings">Gene Modal</a></li>
</ul>
</div>
<div class="col-md-8">
<div class="tab-content">
<div id="mainpanel-settings" class="tab-pane fade">
<h4>View Panel Settings</h4>
<ul style="text-align: left; padding-left: 10%; padding-right: 20%">
<li>
<input type="checkbox" v-model="scope.settings.mainPanel.showExons">Show exons
</li>
<li>
<input type="checkbox" v-model="scope.settings.mainPanel.showNeighbors">Show neighboring genes
</li>
<li>
<input type="checkbox" v-model="scope.settings.mainPanel.colorByExp">Plot gene expression data
<span class="glyphicon glyphicon-info-sign" title="This setting toggles the display of expression data on view panels. Expression filters and expression counts on mouse-over will work irrespective of this setting. The setting is not applicable if expression data is not loaded for any cell type."></span>
</li>
</ul>
<div v-if="scope.settings.mainPanel.colorByExp" style="text-align: left; width: 80%; margin: auto"><strong>Expression Data</strong></div>
<table v-if="scope.settings.mainPanel.colorByExp" style="width: 80%; margin: auto; text-align: left">
<tr style="text-align: center">
<td></td>
<td>Min</td>
<td>Max</td>
</tr>
<tr>
<td>
Expression range <span class="glyphicon glyphicon-info-sign" title="By default, C-State uses 5th and 95th percentile values from the whole-genome expression data as minimum and maximum values respectively. This is to avoid the effect of outliers on introducing a bias."></span>
</td>
<td style="text-align: center">
<input class="filter-input" style="text-align:right; width: 70%" v-model.number="scope.info.expRange.five">
</td>
<td style="text-align: center">
<input class="filter-input" style="text-align:right; width: 70%" v-model.number="scope.info.expRange.nineFive">
</td>
</tr>
<tr>
<td style="padding-top: 10px">
Color palette <span class="glyphicon glyphicon-info-sign" title="The expression color palette of view panels and gene modal is linked: changing one will change the other too."></span>
</td>
<td style="padding-top: 10px; text-align: center">
<select class="filter-input" style="width: 70%" v-model="scope.settings.mainPanel.expColors">
<option v-for="(option, name) in colorbrewer" :value="name">
{{name}}
</option>
</select>
</td>
<td style="padding-top: 10px; text-align: center">
<input type="checkbox" v-model="scope.settings.mainPanel.expColReverse">Reverse
<span class="glyphicon glyphicon-info-sign" title="Reverse the color palette"></span>
</td>
</tr>
<tr>
<td style="padding-top: 15px">Plot style: </td>
<td style="padding-top: 15px">
<div>
<input type="radio" v-model.number="scope.settings.mainPanel.expStyle" :value="1">
<span>Color scale bar on the left</span>
</div>
<div>
<input type="radio" v-model.number="scope.settings.mainPanel.expStyle" :value="2">
<span>Color the gene body bar</span>
</div>
</td>
</tr>
</table>
<br>
<div style="text-align: left; width: 80%; margin: auto"><strong>Bar Height</strong></div>
<table style="width: 80%; margin: auto; text-align: left">
<tr>
<td>Genes</td>
<td>
<input class="filter-input" style="text-align:right; width: 20%" v-model.number="scope.settings.mainPanel.geneBarHeight">pixels
</td>
</tr>
<tr>
<td>Regions</td>
<td>
<input class="filter-input" style="text-align:right; width: 20%" v-model.number="scope.settings.mainPanel.regionBarHeight">pixels
</td>
</tr>
<tr>
<td>Features</td>
<td>
<input class="filter-input" style="text-align:right; width: 20%" v-model.number="scope.settings.mainPanel.featureBarHeight">pixels
</td>
</tr>
<tr>
<td>Neighbors</td>
<td>
<input class="filter-input" style="text-align:right; width: 20%" v-model.number="scope.settings.mainPanel.neighborBarHeight">pixels
</td>
</tr>
</table><br><br>
<div style="text-align: left; width: 80%; margin: auto"><strong>Bar Color</strong></div>
<table style="width: 80%; margin: auto; text-align: left">
<!--<col style="width: 40%">-->
<tr>
<td>Genes</td>
<td>
<input class="filter-input" type="color" v-model="scope.settings.mainPanel.geneBarColor">{{scope.settings.mainPanel.geneBarColor}}
</td>
</tr>
<tr>
<td>Regions</td>
<td>
<input class="filter-input" type="color" v-model="scope.settings.mainPanel.regionBarColor">{{scope.settings.mainPanel.regionBarColor}}
</td>
</tr>
<tr>
<td>Neighbors</td>
<td>
<input class="filter-input" type="color" v-model="scope.settings.mainPanel.neighborBarColor">{{scope.settings.mainPanel.neighborBarColor}}
</td>
</tr>
</table>
</div>
<div id="genemodal-settings" class="tab-pane fade">
<h4>Gene Modal Settings</h4>
<ul style="text-align: left; padding-left: 10%; padding-right: 20%">
<li>
<input type="checkbox" v-model="scope.settings.geneModal.showExons">Show exons
</li>
<li>
<input type="checkbox" v-model="scope.settings.geneModal.showNeighbors">Show neighboring genes
</li>
<li>
<input type="checkbox" v-model="scope.settings.geneModal.colorByExp">Plot gene expression data
<span class="glyphicon glyphicon-info-sign" title="This setting toggles the display of expression data in gene modal view. Expression filters and expression counts on mouse-over will work irrespective of this setting. The setting is not applicable if expression data is not loaded for any cell type."></span>
</li>
</ul>
<div v-if="scope.settings.geneModal.colorByExp" style="text-align: left; width: 80%; margin: auto"><strong>Expression Data</strong></div>
<table v-if="scope.settings.geneModal.colorByExp" style="width: 80%; margin: auto; text-align: left">
<tr>
<td> <span class="glyphicon glyphicon-info-sign" title="The expression color palette of view panels and gene modal is linked: changing one will change the other too."></span> Color palette: </td>
<td>
<select class="filter-input" v-model="scope.settings.mainPanel.expColors">
<option v-for="(option, name) in colorbrewer" :value="name">
{{name}}
</option>
</select>
</td>
<td>
<input type="checkbox" v-model="scope.settings.mainPanel.expColReverse">Reverse
<span class="glyphicon glyphicon-info-sign" title="Reverse the color palette"></span>
</td>
</tr>
<tr>
<td style="padding-top: 10px">Plot style: </td>
<td style="padding-top: 10px">
<div>
<input type="radio" v-model.number="scope.settings.geneModal.expStyle" :value="1">
<span>Color scale bar on the left</span>
</div>
<div>
<input type="radio" v-model.number="scope.settings.geneModal.expStyle" :value="2">
<span>Color the gene body bar</span>
</div>
</td>
</tr>
</table>
<br>
<div style="text-align: left; width: 80%; margin: auto"><strong>Bar Height</strong></div>
<table style="width: 80%; margin: auto; text-align: left">
<tr>
<td>Genes</td>
<td>
<input class="filter-input" style="text-align:right; width: 20%" v-model.number="scope.settings.geneModal.geneBarHeight">pixels
</td>
</tr>
<tr>
<td>Regions</td>
<td>
<input class="filter-input" style="text-align:right; width: 20%" v-model.number="scope.settings.geneModal.regionBarHeight">pixels
</td>
</tr>
<tr>
<td>Features</td>
<td>
<input class="filter-input" style="text-align:right; width: 20%" v-model.number="scope.settings.geneModal.featureBarHeight">pixels
</td>
</tr>
<tr>
<td>Neighbors</td>
<td>
<input class="filter-input" style="text-align:right; width: 20%" v-model.number="scope.settings.geneModal.neighborBarHeight">pixels
</td>
</tr>
</table><br><br>
<div style="text-align: left; width: 80%; margin: auto"><strong>Bar Color</strong></div>
<ul style="text-align: left">
<li>
<input type="checkbox" v-model="scope.settings.geneModal.sameColors">Use same colors as View panel
</li>
</ul>
<table style="width: 80%; margin: auto; text-align: left" v-if="!scope.settings.geneModal.sameColors">
<!--<col style="width: 40%">-->
<tr>
<td>Genes</td>
<td>
<input class="filter-input" :disabled="scope.settings.geneModal.sameColors" type="color" v-model="scope.settings.geneModal.geneBarColor">{{scope.settings.geneModal.geneBarColor}}
</td>
</tr>
<tr>
<td>Regions</td>
<td>
<input class="filter-input" :disabled="scope.settings.geneModal.sameColors" type="color" v-model="scope.settings.geneModal.regionBarColor">{{scope.settings.geneModal.regionBarColor}}
</td>
</tr>
<tr>
<td>Neighbors</td>
<td>
<input class="filter-input" :disabled="scope.settings.geneModal.sameColors" type="color" v-model="scope.settings.geneModal.neighborBarColor">{{scope.settings.geneModal.neighborBarColor}}
</td>
</tr>
</table>
</div>
<div id="feature-settings" class="tab-pane fade in active">
<h4>Feature Track Settings</h4><br>
<div class="container-fluid row">
<span>Feature size cut-off (in bp)</span>
</div>
<div class="container-fluid row">
<table style="width: 60%; margin: auto">
<tr>
<td>Min</td>
<td>Max</td>
</tr>
<tr>
<td>
<input class="filter-input" style="text-align:right; width: 50%" v-model.number="scope.settings.featureTracks.minSize">
</td>
<td>
<input class="filter-input" style="text-align:right; width: 50%" v-model.number="scope.settings.featureTracks.maxSize">
</td>
</tr>
</table>
</div><br>
<div class="container-fluid row">
<span>Feature score cut-off</span>
</div>
<div class="container-fluid row">
<table style="width: 60%; margin: auto">
<tr>
<td>Min</td>
<td>Max</td>
</tr>
<tr>
<td>
<input class="filter-input" style="text-align:right; width: 50%" v-model.number="scope.settings.featureTracks.minScore">
</td>
<td>
<input class="filter-input" style="text-align:right; width: 50%" v-model.number="scope.settings.featureTracks.maxScore">
</td>
</tr>
</table>
</div><br>
<h5>Selected Track Colors ({{scope.settings.general.colors.length}} colors)</h5>
<table style="width: 80%; margin: auto">
<tr>
<td>
<input type="color" style="width: 10%" v-model="scope.settings.general.colors[index]" v-for="(color, index) in scope.settings.general.colors">
</td>
</tr>
</table><br>
<h5>Available Color Schemes</h5>
<div class="row" v-for="(scheme, key) in availableSchemes">
<a :id="key" @click="changeColorScheme(key)" style="font-size: 18px">{{key | formatName}} ({{scheme.length}} colors)</a>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="modal-footer">
<button class="btn btn-success" @click="applySettings">Apply Settings</button>
<button class="btn btn-danger" onclick="hideSettingsDiv()">Close</button>
</div>
</div>
</div>
</div>
<!--Downloads Panel-->
<div id='downloads-panel' v-cloak>
<div id='downloads-body' style="position: fixed; left: 0px; top: 390px; height:70px; width: 900px; z-index: 3000" class="modal-wrapper animated slideInLeft" v-if="showDiv">
<div class="modal-container">
<div class="modal-body" style="padding: 15px 20px; background-color: white; border-radius: 1px 7px 7px 1px;">
<button class="btn btn-lg btn-success download-btn" title="Export a txt file containing summary of the gene names, feature track settings, and active filters (if any)" @click="exportSummary">Export C-State Summary</button>
<button class="btn btn-lg btn-primary download-btn" title="Download all the gene panels in the View accordion as a single SVG file" @click="downloadPlots">Download View panels as SVG</button>
<button class="btn btn-lg btn-info download-btn" title='Download the entire session info and plot data as a JSON file. This file can be uploaded as "Previous C-State Data" from the Files accordion' @click="exportJSONtoFile">Download C-State JSON File</button>
</div>
</div>
</div>
</div>
<!--Spinner for loading screen-->
<div id='spinner' v-if="loading">
<div class="loading-overlay"></div>