forked from mobidic/knotAnnotSV
-
Notifications
You must be signed in to change notification settings - Fork 0
/
knotAnnotSV.pl
1748 lines (1387 loc) · 61 KB
/
knotAnnotSV.pl
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
#!/usr/bin/perl
##############################################################################################
# knotAnnotSV 1.1 #
# #
# knotAnnotSV: Creation of a customizable html file to visualize, filter #
# and analyze an AnnotSV output #
# #
# Author: Thomas Guignard 2020-2024 #
# #
# Copyright (C) 2020-2024 Thomas Guignard ([email protected]) #
# #
# This is part of knotAnnotSV source code. #
# #
# This program is free software; you can redistribute it and/or #
# modify it under the terms of the GNU General Public License #
# as published by the Free Software Foundation; either version 3 #
# of the License, or (at your option) any later version. #
# #
# This program is distributed in the hope that it will be useful, #
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
# GNU General Public License for more details. #
# #
# You should have received a copy of the GNU General Public License #
# along with this program; If not, see <http://www.gnu.org/licenses/>. #
##############################################################################################
use strict;
use warnings;
use Getopt::Long;
use YAML::XS 'LoadFile';
use Sort::Key::Natural qw(rnatkeysort);
use File::Basename;
#use Switch;
#use Data::Dumper;
#parameters
my $man = "USAGE : \nperl knotAnnotSV.pl
\n--configFile <YAML config file for customizing output>
\n--annotSVfile <AnnotSV annotated file>
\n--outDir <output directory (default = current dir)>
\n--outPrefix <output file prefix (default = \"\")>
\n--genomeBuild <Genome Assembly reference (default = hg19)>
\n--LOEUFcolorRange <Number to define which color to use for LOEUF bin: 1 (red-to-green), 2 (red-shades-only). (default = 1)>
\n--datatableDir <Local Path to DataTables directory containing css and js files (default = \"\", requires web connection)>";
my $configFile = ".";
my $help;
my $current_line;
my $incfile = "";
my $outDir = ".";
my $outPrefix = "";
my $annotSVranking = "";
my $datatableDir = "";
my $LOEUFcolorRange = "";
#vcf parsing and output
my @line;
my $variantID;
my $count = 0;
my @finalSortData;
my %hashFinalSortData;
my $config;
my %columnHash;
my %InColHash;
my %OutColHash;
my %NameColHash;
my %dataHash;
my %dataCommentHash;
my %dataColorHash;
my $scorePenalty;
my $fullSplitScore;
my %SV_ID;
my $SV_type;
my $fullRowColor;
my $url2UCSC="";
my $url2OMIM="";
my $url2DECIPHER="";
my $url2ensembl="";
my @criteria;
my @OMIM_ID_array;
my @OMIM_phen_array;
my @GeneName_array;
my @RE_gene_array;
my %debugHash;
my $genomeBuild="";
#style alignment for tooltiptext
my $alignTooltiptext="";
GetOptions( "annotSVfile=s" => \$incfile,
"configFile=s" => \$config,
"outDir=s" => \$outDir,
"outPrefix:s" => \$outPrefix,
"datatableDir=s" => \$datatableDir,
"genomeBuild=s" => \$genomeBuild,
"LOEUFcolorRange=s" => \$LOEUFcolorRange,
"help|h" => \$help);
#check mandatory arguments
if(defined $help || $incfile eq ""){
die($man."\n");
}
#add underscore to output prefix
if($outPrefix ne ""){
$outPrefix .= "_";
}
#check datatable pathname
if ($datatableDir ne "" && ! -d $datatableDir){
print "\nError with datatableDir argument: ".$datatableDir." is not an existing directory.\n\n";
exit 1;
}
#check if genomeBuild exists (hg19 grch37 hg38, mm etc..) and put hg19 as default build
if($genomeBuild eq ""){
$genomeBuild = "hg19";
}
#open( CONFIG, "<$config" ) or die ("Cannot open vcf file $config") ;
#CONFIG FILE PARSING
print STDERR "Parsing config file....\n";
my %configHash;
my $configHash;
my $OutColCounter = 0;
my $outPOSITION = 0;
$configHash = LoadFile($config);
#print Dumper($configHash);
foreach my $item (keys %{$configHash}){
#print $item."\n";
my $field = $item;
#print $configHash->{$field}->{POSITION}."\n";
if ($configHash->{$field}->{POSITION} != 0 && defined $OutColHash{$configHash->{$field}->{POSITION}}){
print "\nError in config file: 'POSITION : ".$configHash->{$field}->{POSITION}."' is assigned twice.\nPlease correct config file to avoid 2 identical positions.\n\n";
exit 1;
}else {
if ($configHash->{$field}->{POSITION} != 0){
#$OutColHash{$configHash->{$field}->{POSITION}} = $field;
$outPOSITION = $configHash->{$field}->{POSITION};
$OutColHash{$outPOSITION}{'field'} = $field;
#$OutColHash{$configHash->{$field}->{POSITION}}{'field'} = $field;
$OutColCounter ++;
}
$NameColHash{$field} = $configHash->{$field}->{POSITION};
#TODO $NameColHash{$field}{'POSITION'} = $configHash->{$field}->{POSITION};
if (defined $configHash->{$field}->{COMMENTLIST}){
$dataCommentHash{$field}{'commentFieldList'}=$configHash->{$field}->{COMMENTLIST} ;
}
#get custom name for column
if (defined $configHash->{$field}->{RENAME}){
#$NameColHash{$field}{'RENAME'} = $configHash->{$field}->{RENAME};
$OutColHash{$configHash->{$field}->{POSITION}}{'RENAME'} = $configHash->{$field}->{RENAME};
}else{
#$NameColHash{$field}{'RENAME'} = $field;
$OutColHash{$configHash->{$field}->{POSITION}}{'RENAME'} = $field;
}
#get custom string for column header tooltip
if (defined $configHash->{$field}->{HEADERTIPS}){
#$NameColHash{$field}{'HEADERTIPS'} = $configHash->{$field}->{HEADERTIPS};
$OutColHash{$configHash->{$field}->{POSITION}}{'HEADERTIPS'} = $configHash->{$field}->{HEADERTIPS};
}
}
#print Dump($field)."\n";
}
#ANNOTSV RANKING PARSING to get ranking decision
my @SVrankLine;
my %SVrankHash;
if ($annotSVranking ne ""){
open( SVRANK , "<$annotSVranking" )or die("Cannot open ranking file ".$annotSVranking."\n") ;
while( <SVRANK> ){
chomp $_;
@SVrankLine = split( /\t/, $_ );
if (defined $SVrankHash{$SVrankLine[0]."_".$SVrankLine[2]}){
print "Doublon detected in ranking file : ".$_."\n\n";
}else{
$SVrankHash{$SVrankLine[0]."_".$SVrankLine[2]} = $SVrankLine[4];
}
}
#add comment with rank to AnnotSV ranking column
if (! defined $dataCommentHash{'ACMG_class'}{'commentFieldList'}){
$dataCommentHash{'ACMG_class'}{'SVrank'} = "OK";
}
}
#Hash of ACMG incidentalome genes => grey color #808080
my %ACMGgene = ("ACTA2" =>1,"ACTC1" =>1,"APC" =>1,"APOB" =>1,"ATP7B" =>1,"BMPR1A" =>1,"BRCA1" =>1,"BRCA2" =>1,"CACNA1S" =>1,"COL3A1" =>1,"DSC2" =>1,"DSG2" =>1,"DSP" =>1,"FBN1" =>1,"GLA" =>1,"KCNH2" =>1,"KCNQ1" =>1,"LDLR" =>1,"LMNA" =>1,"MEN1" =>1,"MLH1" =>1,"MSH2" =>1,"MSH6" =>1,"MUTYH" =>1,"MYBPC3" =>1,"MYH11" =>1,"MYH7" =>1,"MYL2" =>1,"MYL3" =>1,"NF2" =>1,"OTC" =>1,"PCSK9" =>1,"PKP2" =>1,"PMS2" =>1,"PRKAG2" =>1,"PTEN" =>1,"RB1" =>1,"RET" =>1,"RYR1" =>1,"RYR2" =>1,"SCN5A" =>1,"SDHAF2" =>1,"SDHB" =>1,"SDHC" =>1,"SDHD" =>1,"SMAD3" =>1,"SMAD4" =>1,"STK11" =>1,"TGFBR1" =>1,"TGFBR2" =>1,"TMEM43" =>1,"TNNI3" =>1,"TNNT2" =>1,"TP53" =>1,"TPM1" =>1,"TSC1" =>1,"TSC2" =>1,"VHL" =>1,"WT1"=>1);
#initialize gene colore according to pLI/LOEUF
#my %pLI_ColorHash;
#my $pLI_Color;
#$pLI_ColorHash{'0.9'} = '#FF0000';
#$pLI_ColorHash{'0.8'} = '#FF3300';
#$pLI_ColorHash{'0.7'} = '#FF6600';
#$pLI_ColorHash{'0.6'} = '#FF9900';
#$pLI_ColorHash{'0.5'} = '#FFCC00';
#$pLI_ColorHash{'0.4'} = '#FFFF00';
#$pLI_ColorHash{'0.3'} = '#BFFF00';
#$pLI_ColorHash{'0.2'} = '#7FFF00';
#$pLI_ColorHash{'0.1'} = '#3FFF00';
#$pLI_ColorHash{'0.0'} = '#00FF00';
#Select and initialize color Range for LOEUF bin
my %LOEUF_ColorHash;
my $LOEUF_Color;
if($LOEUFcolorRange eq "" ||$LOEUFcolorRange == 1 ){
$LOEUF_ColorHash{'0.0'} = '#FF0000';
$LOEUF_ColorHash{'1.0'} = '#FF3300';
$LOEUF_ColorHash{'2.0'} = '#FF6600';
$LOEUF_ColorHash{'3.0'} = '#FF9900';
$LOEUF_ColorHash{'4.0'} = '#FFCC00';
$LOEUF_ColorHash{'5.0'} = '#FFFF00';
$LOEUF_ColorHash{'6.0'} = '#BFFF00';
$LOEUF_ColorHash{'7.0'} = '#7FFF00';
$LOEUF_ColorHash{'8.0'} = '#3FFF00';
$LOEUF_ColorHash{'9.0'} = '#00FF00';
}elsif($LOEUFcolorRange == 2){
$LOEUF_ColorHash{'0.0'} = '#FF0606';
$LOEUF_ColorHash{'1.0'} = '#FF3737';
$LOEUF_ColorHash{'2.0'} = '#FF5050';
$LOEUF_ColorHash{'3.0'} = '#FF6363';
$LOEUF_ColorHash{'4.0'} = '#FF6F6F';
$LOEUF_ColorHash{'5.0'} = '#FF8888';
$LOEUF_ColorHash{'6.0'} = '#FF9B9B';
$LOEUF_ColorHash{'7.0'} = '#FFB4B4';
$LOEUF_ColorHash{'8.0'} = '#FFD9D9';
$LOEUF_ColorHash{'9.0'} = '#FFF2F2';
}else{
die("LOEUFcolorRange argument is unacceptable: ".$LOEUFcolorRange."\n") ;
}
### Initialize column Name Mode Hash
my %colNameMode = (
"AnnotSV_ID"=>"fullsplit",
"SV_chrom"=>"fullsplit",
"SV_start"=>"fullsplit",
"SV_end"=>"fullsplit",
"SV_length"=>"fullsplit",
"SV_type"=>"fullsplit",
"Samples_ID"=>"fullsplit",
"REF"=>"fullsplit",
"ALT"=>"fullsplit",
"FORMAT"=>"fullsplit",
"Annotation_mode"=>"fullsplit",
"Gene_name"=>"fullsplit",
"Closest_left"=>"full",
"Closest_right"=>"full",
"NCBI_gene_ID"=>"split",
"Tx_version"=>"split",
"PhenoGenius_specificity"=>"split",
"PhenoGenius_phenotype"=>"split",
"PhenoGenius_score"=>"split",
"Gene_count"=>"full",
"Tx"=>"split",
"Tx_start"=>"split",
"Tx_end"=>"split",
"Overlapped_tx_length"=>"split",
"Overlapped_CDS_length"=>"split",
"Overlapped_CDS_percent"=>"split",
"Frameshift"=>"split",
"Exon_count"=>"split",
"Location"=>"split",
"Location2"=>"split",
"Dist_nearest_SS"=>"split",
"Nearest_SS_type"=>"split",
"Intersect_start"=>"split",
"Intersect_end"=>"split",
"RE_gene"=>"full",
"B_gain_source"=>"fullsplit",
"B_gain_coord"=>"fullsplit",
"B_loss_source"=>"fullsplit",
"B_loss_coord"=>"fullsplit",
"B_ins_source"=>"fullsplit",
"B_ins_coord"=>"fullsplit",
"B_inv_source"=>"fullsplit",
"B_inv_coord"=>"fullsplit",
"P_gain_phen"=>"fullsplit",
"P_gain_hpo"=>"fullsplit",
"P_gain_source"=>"fullsplit",
"P_gain_coord"=>"fullsplit",
"P_loss_phen"=>"fullsplit",
"P_loss_hpo"=>"fullsplit",
"P_loss_source"=>"fullsplit",
"P_loss_coord"=>"fullsplit",
"P_ins_phen"=>"fullsplit",
"P_ins_hpo"=>"fullsplit",
"P_ins_source"=>"fullsplit",
"P_ins_coord"=>"fullsplit",
"P_snvindel_nb"=>"fullsplit",
"P_snvindel_phen"=>"fullsplit",
"Cosmic_ID"=>"fullsplit",
"Cosmic_mut_typ"=>"fullsplit",
"TAD_coordinate"=>"full",
"ENCODE_experiment"=>"full",
"GC_content_left"=>"full",
"GC_content_right"=>"full",
"Repeat_coord_left"=>"full",
"Repeat_type_left"=>"full",
"Repeat_coord_right"=>"full",
"Repeat_type_right"=>"full",
"Gap_left"=>"full",
"Gap_right"=>"full",
"ENCODE_blacklist_left"=>"full",
"ENCODE_blacklist_characteristics_left"=>"full",
"ENCODE_blacklist_right"=>"full",
"ENCODE_blacklist_characteristics_right"=>"full",
"SegDup_left"=>"full",
"SegDup_right"=>"full",
"ACMG"=>"split",
"HI"=>"fullsplit",
"TS"=>"fullsplit",
"DDD_mode"=>"split",
"DDD_consequence"=>"split",
"DDD_disease"=>"split",
"DDD_pmid"=>"split",
"DDD_HI_percent"=>"fullsplit",
"ExAC_synZ"=>"fullsplit",
"ExAC_misZ"=>"fullsplit",
"ExAC_delZ"=>"fullsplit",
"ExAC_dupZ"=>"fullsplit",
"ExAC_cnvZ"=>"fullsplit",
"LOEUF_bin"=>"fullsplit",
"GnomAD_pLI"=>"fullsplit",
"ExAC_pLI"=>"fullsplit",
"OMIM_morbid"=>"fullsplit",
"OMIM_morbid_candidate"=>"fullsplit",
"OMIM_ID"=>"fullsplit",
"OMIM_phenotype"=>"split",
"OMIM_inheritance"=>"split",
"Exomiser_gene_pheno_score"=>"fullsplit",
"Human_pheno_evidence"=>"split",
"Mouse_pheno_evidence"=>"split",
"Fish_pheno_evidence"=>"split",
"Compound_htz(sample)"=>"fullsplit",
"Count_hom(sample)"=>"fullsplit",
"Count_htz(sample)"=>"fullsplit",
"Count_htz/allHom(sample)"=>"fullsplit",
"Count_htz/total(cohort) "=>"fullsplit",
"Count_total(cohort)"=>"fullsplit",
"AnnotSV_ranking_score"=>"full",
"AnnotSV_ranking_criteria"=>"full",
"ACMG_class"=>"full",
"CytoBand"=>"fullsplit",
"GenCC_disease"=>"split",
"GenCC_moi"=>"split",
"GenCC_classification"=>"split",
"GenCC_pmid"=>"split",
"B_gain_AFmax"=>"fullsplit",
"B_ins_AFmax"=>"fullsplit",
"B_inv_AFmax"=>"fullsplit",
"B_loss_AFmax"=>"fullsplit",
"po_P_gain_phen"=>"full",
"po_P_gain_hpo"=>"full",
"po_P_gain_source"=>"full",
"po_P_gain_coord"=>"full",
"po_P_gain_percent"=>"full",
"po_P_loss_phen"=>"full",
"po_P_loss_hpo"=>"full",
"po_P_loss_source"=>"full",
"po_P_loss_coord"=>"full",
"po_P_loss_percent"=>"full",
"po_B_gain_allG_source"=>"full",
"po_B_gain_allG_coord"=>"full",
"po_B_gain_someG_source"=>"full",
"po_B_gain_someG_coord"=>"full",
"po_B_loss_allG_source"=>"full",
"po_B_loss_allG_coord"=>"full",
"po_B_loss_someG_source"=>"full",
"po_B_loss_someG_coord"=>"full");
# Initialisation of ACMG criteria
my %gainRankCriteria = (
"1A"=>"Contains protein-coding or other known functionally important elements. ",
"1B"=>"Does NOT contain protein-coding or any known functionally important elements.",
"2A"=>"Complete overlap; the known pathogenic gain SV is fully contained within the observed copy-number gain.",
"2B"=>"Partial overlap of a known pathogenic gain SV. The observed CNV does NOT contain the TS gene or critical region for this known pathogenic Gain SV OR Unclear if the known causative gene or critical region is affected OR No specific causative gene or critical region has been established for this known pathogenic SV.",
"2C"=>"Identical in gene content to the established benign copy-number gain.",
"2D"=>"Smaller than established benign copy-number gain, breakpoint(s) does not interrupt protein-coding genes.",
"2E"=>"Smaller than established benign copy-number gain, breakpoint(s) potentially interrupts protein-coding gene.",
"2F"=>"Larger than known benign copy-number gain, does not include additional protein-coding genes.",
"2G"=>"Overlaps a benign copy-number gain but includes additional genomic material.",
"2H-1"=>"HI gene / morbid gene fully contained within observed copy-number gain and patient's phenotype is highly specific and consistent with what is expected for LOF of that gene (Exomiser_gene_pheno_score >= 0.7).",
"2H-2"=>"HI gene / morbid gene fully contained within observed copy-number gain and patient's phenotype is nonspecific with what is expected for LOF of that gene (Exomiser_gene_pheno_score < 0.7).",
"2I"=>"Both breakpoints are within the same HI gene / morbid gene (gene-level sequence variant, possibly resulting in loss of function [LOF]) and disrupts the reading frame.",
"2J"=>"One breakpoint is within an established HI gene / morbid gene, patient’s phenotype is either inconsistent with what is expected for LOF of that gene OR unknown.",
"2K"=>"One breakpoint is within an established HI gene / morbid gene, patient’s phenotype is highly specific and consistent with what is expected for LOF of that gene (Exomiser_gene_pheno_score > 0.7).",
"2L"=>"One or both breakpoints are within gene(s) of no established clinical significance.",
"3A"=>"0–34 genes wholly or partially included",
"3B"=>"35–49 genes wholly or partially included",
"3C"=>"50 or more genes wholly or partially included",
"5F"=>"Inheritance information is unavailable or uninformative.",
"5G"=>"The patient phenotype is nonspecific, but is consistent with what has been described in similar cases (EXOMISER_GENE_PHENO_SCORE > 0.5).",
"5H"=>"The patient phenotype is highly specific and consistent with what has been described in similar cases (EXOMISER_GENE_PHENO_SCORE > 0.7).");
my %lossRankCriteria = (
"1A"=>"Contains protein-coding or other known functionally important elements. ",
"1B"=>"Does NOT contain protein-coding or any known functionally important elements.",
"2A"=>"Complete overlap of a known pathogenic Loss SV.",
"2B"=>"Partial overlap of a known pathogenic Loss SV. The observed CNV does NOT contain a HI gene OR Unclear if known causative gene or critical region is affected OR No specific causative gene or critical region has been established for this known pathogenic Loss SV",
"2C-1"=>"Partial overlap with the 5' end of an established HI gene / morbid gene (3' end of the gene not involved) and coding sequence is involved",
"2C-2"=>"Partial overlap with the 5' end of an established HI gene / morbid gene (3' end of the gene not involved) and only the 5' UTR is involved",
"2D"=>"Partial overlap with the 3' end of an established HI gene / morbid gene (5' end of the gene not involved)...",
"2D-1"=>"Partial overlap with the 3' end of an established HI gene / morbid gene (5' end of the gene not involved) and only the 3' untranslated region is involved.",
"2D-2"=>"Partial overlap with the 3' end of an established HI gene / morbid gene (5' end of the gene not involved) and only the last exon is involved. Other established pathogenic snv/indel have been reported in the observed CNV",
"2D-3"=>"Partial overlap with the 3' end of an established HI gene / morbid gene (5' end of the gene not involved) and only the last exon is involved. No other established pathogenic variants have been reported in the observed CNV.",
"2D-4"=>"Partial overlap with the 3' end of an established HI gene / morbid gene (5' end of the gene not involved) and it includes other exons in addition to the last exon. Nonsense-mediated decay is expected to occur.",
"2E"=>"Both breakpoints are within the same HI gene / morbid gene (intragenic CNV; gene-level sequence variant)...",
"2E-1"=>"Both breakpoints are within the same HI gene / morbid gene (intragenic CNV; gene-level sequence variant) and disrupts the reading frame",
"2E-2"=>"Both breakpoints are within the same HI gene / morbid gene (intragenic CNV; gene-level sequence variant) and >=1 exon deleted AND other established pathogenic snv/indel have been reported in the observed CNV AND variant removes >= 10% of protein",
"2E-3"=>"Both breakpoints are within the same HI gene / morbid gene (intragenic CNV; gene-level sequence variant) and >=1 exon deleted AND other established pathogenic snv/indel have been reported in the observed CNV AND variant removes < 10% of protein",
"2E-4"=>"Both breakpoints are within the same HI gene / morbid gene (intragenic CNV; gene-level sequence variant) and >=1 exon deleted AND no established pathogenic snv/indel have been reported in the observed CNV AND variant removes > 10% of protein",
"2F"=>"Completely contained within an established benign CNV region.",
"2G"=>"Overlaps an established benign CNV, but includes additional genomic material.",
"2H"=>"Two or more HI predictors suggest that AT LEAST ONE gene in the interval is HI (gnomAD pLI >=0.9 and DECIPHER HI index <=10%)",
"3A"=>"0–24 genes wholly or partially included",
"3B"=>"25–34 genes wholly or partially included",
"3C"=>"35+ genes wholly or partially included",
"5F"=>"Inheritance information is unavailable or uninformative.",
"5G"=>"The patient phenotype is nonspecific, but is consistent with what has been described in similar cases (EXOMISER_GENE_PHENO_SCORE > 0.5).",
"5H"=>"The patient phenotype is highly specific and consistent with what has been described in similar cases (EXOMISER_GENE_PHENO_SCORE > 0.7).");
####################################################################
#############################################
################## Start parsing VCF
open( VCF , "<$incfile" )or die("Cannot open annotSV file ".$incfile."\n") ;
my ($outBasename,$dir,$ext) = fileparse($incfile,'\.tsv$');
while( <VCF> ){
$current_line = $_;
$count++;
chomp $current_line;
@line = split( /\t/, $current_line );
#############################################
############## Treatment for First line to create header of the output
if ( $line[0] eq "AnnotSV_ID" ) {
#TODO check if header contains required INFO
print STDERR "Parsing AnnotSV header in order to get column names ... \n";
#initialize column order
for( my $fieldNbr = 0 ; $fieldNbr < scalar @line; $fieldNbr++){
#print STDERR "Field found: ".$line[$fieldNbr]."\n";
$InColHash{$fieldNbr} = $line[$fieldNbr];
$dataHash{$line[$fieldNbr]} = ".";
}
foreach my $field (keys %NameColHash){
if (! defined $dataHash{$field}){
$dataHash{$field} = "NA";
}
}
next;
#############################################
##############################
########## start to compute variant lines
}else {
#initialise final printable string
@finalSortData = ("");
#$pLI_Color=".";
$LOEUF_Color=".";
#fill nbr of SV_ID;
if (defined $SV_ID{$line[0]} ){
$SV_ID{$line[0]}{'nbr'}++;
}else{
$SV_ID{$line[0]}{'nbr'} = 1;
}
#reinitialize Comment Values
foreach my $field (keys %dataCommentHash){
delete $dataCommentHash{$field}{'values'};
}
#reinitialize dataHash Values
foreach my $field (keys %dataHash){
unless($dataHash{$field} eq "NA" ){$dataHash{$field} = ".";}
}
#fill printable string
for( my $fieldNbr = 0 ; $fieldNbr < scalar @line; $fieldNbr++){
if($line[$fieldNbr] ne ""){
$line[$fieldNbr] =~ s/;/; /g ;
#$line[$fieldNbr] =~ s/\//\/ /g ;
$line[$fieldNbr] =~ s/</</g ;
$line[$fieldNbr] =~ s/>/>/g ;
$dataHash{$InColHash{$fieldNbr}} = $line[$fieldNbr] ;
}else{
$dataHash{$InColHash{$fieldNbr}} = ".";
}
}
#remove "-" sign for SV length
if (defined $dataHash{'SV_length'}){
$dataHash{'SV_length'} =~ s/^\-//;
}
##### attribute URL to genes and OMIM
my $GeneName_link_string="";
my $OMIM_ID_link_string="";
my $OMIM_phen_link_string="";
@OMIM_ID_array = "";
@OMIM_phen_array = "";
@GeneName_array = "";
@RE_gene_array = "";
my %GeneName_hash ;
my %RE_gene_hash ;
my $tempString;
#add url to OMIM_ID
if ($dataHash{"OMIM_ID"} ne "."){
$tempString = "";
@OMIM_ID_array = split(/; /, $dataHash{"OMIM_ID"} );
for( my $ID = 0 ; $ID < scalar @OMIM_ID_array; $ID++){
$tempString .= "<a href=\"https://www.omim.org/entry/".$OMIM_ID_array[$ID]."\" target=\"_blank\" rel=\"noopener noreferrer\" style=\"color:#00FFFF\">".$OMIM_ID_array[$ID]."; </a>";
if($ID < 5){
$OMIM_ID_link_string .= "<a href=\"https://www.omim.org/entry/".$OMIM_ID_array[$ID]."\" target=\"_blank\" rel=\"noopener noreferrer\" >".$OMIM_ID_array[$ID]."; </a>";
}
}
$dataHash{"OMIM_ID"} = $tempString;
}else{
$OMIM_ID_link_string = ".";
}
if ($dataHash{"OMIM_phenotype"} ne "."){
$tempString = "";
@OMIM_phen_array = split(/; /, $dataHash{"OMIM_phenotype"} );
if(@OMIM_phen_array){
for ( my $ID = 0 ; $ID < scalar @OMIM_phen_array ; $ID++){
if( $OMIM_phen_array[$ID] =~ m/^(.+?)(\d{6})(.+?)$/){
$tempString .= $1."<a href=\"https://www.omim.org/entry/".$2."\" target=\"_blank\" rel=\"noopener noreferrer\" style=\"color:#00FFFF\">".$2."</a>".$3.";<br>";
#DEBUG TODO not sure
if ( $ID == 0 ){
if ( scalar @OMIM_phen_array > 1){
$OMIM_phen_link_string = $1."<a href=\"https://www.omim.org/entry/".$2."\" target=\"_blank\" rel=\"noopener noreferrer\" >".$2."</a>".$3."; [...".scalar @OMIM_phen_array." pheno]";
}else{
$OMIM_phen_link_string = $1."<a href=\"https://www.omim.org/entry/".$2."\" target=\"_blank\" rel=\"noopener noreferrer\" >".$2."</a>".$3;
}
}
}else{
$tempString .= $OMIM_phen_array[$ID].";<br>";
}
}
$tempString =~ s/<br>$//;
$dataHash{"OMIM_phenotype"} = $tempString ;
if ($OMIM_phen_link_string eq ""){
$OMIM_phen_link_string = $dataHash{"OMIM_phenotype"};
}
}else{
$dataHash{"OMIM_phenotype"} =~ s/; /;<br>/g ;
$OMIM_phen_link_string = ".";
}
}else{
if ($dataHash{"OMIM_morbid"} eq "yes"){
$OMIM_phen_link_string = "yes";
}else{
$OMIM_phen_link_string = ".";
}
}
#URL for gene name
if ($dataHash{"Gene_name"} ne "."){
$tempString = "";
@GeneName_array = split(/; /, $dataHash{"Gene_name"} );
for( my $ID = 0 ; $ID < scalar @GeneName_array; $ID++){
$GeneName_hash{$GeneName_array[$ID]} = 1;
$tempString .= "<a href=\"https://www.genecards.org/cgi-bin/carddisp.pl?gene=".$GeneName_array[$ID]."\" target=\"_blank\" rel=\"noopener noreferrer\" style=\"color:#00FFFF\">".$GeneName_array[$ID]."; </a>";
if($ID < 5){
$GeneName_link_string .= "<a href=\"https://www.genecards.org/cgi-bin/carddisp.pl?gene=".$GeneName_array[$ID]."\" target=\"_blank\" rel=\"noopener noreferrer\" >".$GeneName_array[$ID]."</a>; ";
}
}
$dataHash{"Gene_name"} = $tempString ;
if (scalar @GeneName_array > 1){
$GeneName_link_string .= " [...".$dataHash{"Gene_count"}."genes]";
}else{
$GeneName_link_string =~ s/; $//;
}
}else{
$GeneName_link_string = ".";
}
#Classify RE_Gene elements according to Gene name list to highlight missing elements
if ($dataHash{"RE_gene"} ne "."){
$tempString = "";
my $splicebool = 0;
$dataHash{"RE_gene"} =~ s/; morbid/\/morbid/g;
@RE_gene_array = split(/; /, $dataHash{"RE_gene"} );
for ( my $ID = 0 ; $ID < scalar @RE_gene_array ; $ID++){
if( $RE_gene_array[$ID] =~ m/^(\S+)\s?/ ){
#print $RE_gene_array[$ID]."__ge__".$1."\n";
if (defined $GeneName_hash{$1}){
$RE_gene_hash{$RE_gene_array[$ID]} = 0;
}else{
$RE_gene_hash{$RE_gene_array[$ID]} = 1000;
if ($RE_gene_array[$ID] =~ /morbid/){
$RE_gene_hash{$RE_gene_array[$ID]} += 10;
}
if ($RE_gene_array[$ID] =~ m/EX=(\d\.\d{4})/){
$RE_gene_hash{$RE_gene_array[$ID]} += 20 * $1;
#print $RE_gene_array[$ID]."__ex__".$1."\n";
}
}
}
}
foreach my $ReGene (sort {$RE_gene_hash{$b} <=> $RE_gene_hash{$a}} keys %RE_gene_hash){
if ($splicebool == 0 && $RE_gene_hash{$ReGene} == 0 && $tempString ne ""){
$splicebool =1;
$tempString .= "<br>------<br>";
}
$tempString .= $ReGene."; ";
}
$dataHash{"RE_gene"} = $tempString;
}
#get SVtype
$SV_type = $dataHash{'SV_type'};
#check what type among different writting allowed
if ($SV_type =~ /DUP|GAIN|CN[3-9]/i){
$SV_type = "DUP";
$fullRowColor = "#DFE9FF";
}elsif ($SV_type =~ /DEL|LOSS|CN[0-1]/i){
$SV_type = "DEL";
$fullRowColor = "#F7D8DD";
}elsif ($SV_type =~ /INV/i){
$SV_type = "INV";
$fullRowColor = "#FEE7CD";
}elsif ($SV_type =~ /INS/i){
$SV_type = "INS";
$fullRowColor = "#FFCCEF";
}elsif ($SV_type =~ /CPX/i){
$SV_type = "CPX";
$fullRowColor = "#D4F7DC";
}elsif ($SV_type =~ /BND/i){
$SV_type = "BND";
$fullRowColor = "#FFFF99";
}else{
$fullRowColor = "#E0CCFF";
}
#hash to avoid duplicated comments for P_ and B_ loss and gain
my %commentDuplicate;
my $correctFieldCom;
#get all comments values
foreach my $field (keys %dataCommentHash){
#print $field."\n";
#if (defined $dataCommentHash{$field})
# foreach my $fieldCom (@{$dataCommentHash{$field}{'commentFieldList'}})
if (defined $dataCommentHash{$field}){
if (! defined $dataCommentHash{$field}{'values'}){
#special treatment for field , adding to comment the switched name
if ( $field =~ /^[po_]*[BP]_/){
if ($SV_type eq "DEL" ){
$correctFieldCom = $field =~ s/gain|ins|inv/loss/r;
}elsif ($SV_type eq "DUP" ){
$correctFieldCom = $field =~ s/loss|ins|inv/gain/r;
}else{
$correctFieldCom = $field;
}
$commentDuplicate{$correctFieldCom} += 1;
#add in first line of comment
$dataCommentHash{$field}{'values'} .= "<span class=\"commentTitle\">".$correctFieldCom . " :</span> ".$dataHash{$correctFieldCom};
}
foreach my $fieldCom (@{$dataCommentHash{$field}{'commentFieldList'}}){
#skip this field if it doesn't belong to annotation mode
if (defined $colNameMode{$fieldCom}){
if ($dataHash{"Annotation_mode"} eq "full"){
if ($colNameMode{$fieldCom} =~ /^split/){
next;
}
}else{
if ($colNameMode{$fieldCom} =~ /full$/){
next;
}
}
}
if (defined $dataHash{$fieldCom}){
if ( $fieldCom =~ /^[po_]*[BP]_/){
if ($SV_type eq "DEL" ){
$correctFieldCom = $fieldCom =~ s/gain|ins|inv/loss/r;
}elsif ($SV_type eq "DUP" ){
$correctFieldCom = $fieldCom =~ s/loss|ins|inv/gain/r;
}else{
$correctFieldCom = $fieldCom;
}
$commentDuplicate{$correctFieldCom} += 1;
if (defined $commentDuplicate{$correctFieldCom} && $commentDuplicate{$correctFieldCom} > 1){
next;
}
#print $field."_".$correctFieldCom."\n";
$dataCommentHash{$field}{'values'} .= "<br><span class=\"commentTitle\">".$correctFieldCom . " :</span> ".$dataHash{$correctFieldCom};
}else{
if($fieldCom eq "AnnotSV_ranking_criteria" && $dataHash{$fieldCom} ne "." ){
$dataCommentHash{$field}{'values'} .= "<br><span class=\"commentTitle\">".$fieldCom . " :</span><br>";
@criteria = split( /; /, $dataHash{$fieldCom} );
foreach my $crit (@criteria){
$crit =~ /^([1-5]\w\-?\d?\d?)\s?\(?/;
#print "DEBUG2 : ".$crit."_____".$1."\n";
if ($SV_type eq "DEL" ){
if(defined $lossRankCriteria{$1}){
$dataCommentHash{$field}{'values'} .= $crit.": ".$lossRankCriteria{$1}."<br>";
}else{
$dataCommentHash{$field}{'values'} .= $crit.": NA<br>";
}
}elsif ($SV_type eq "DUP" ){
if(defined $gainRankCriteria{$1}){
$dataCommentHash{$field}{'values'} .= $crit.": ".$gainRankCriteria{$1}."<br>";
}else{
$dataCommentHash{$field}{'values'} .= $crit.": NA<br>";
}
}else{
$dataCommentHash{$field}{'values'} .= $dataHash{$fieldCom};
}
}
}else{
$dataCommentHash{$field}{'values'} .= "<br><span class=\"commentTitle\">".$fieldCom . " :</span> ".$dataHash{$fieldCom};
}
}
}else{
if (defined $debugHash{$fieldCom."_".$field}){
#Do nothing
}else{
$debugHash{$fieldCom."_".$field} = 1;
print "Undefined field (typo error in config file or absent in annotation file (ex: exomiser): ".$fieldCom." in ".$field."\n";
}
$dataCommentHash{$field}{'values'} .= "<br><span class=\"commentTitle\">".$fieldCom . " :</span> NA";
}
#print $field.":\t".$fieldCom.":\t".$dataCommentHash{'Gene name'}{'values'}."\n";
}
}
# add ranking decision as comment of AnnotSV ranking field
#if (defined $dataCommentHash{$field}{'SVrank'}){
# if (defined $SVrankHash{$dataHash{'AnnotSV ID'}."_".$dataHash{'Gene name'}}){
# if (! defined $dataCommentHash{$field}{'values'}){
# $dataCommentHash{$field}{'values'}= "<br><b>Ranking :</b> " . $SVrankHash{$dataHash{'AnnotSV ID'}."_".$dataHash{'Gene name'}} ;
# }else{
# $dataCommentHash{$field}{'values'} = "<br><b>Ranking :</b> " .$SVrankHash{$dataHash{'AnnotSV ID'}."_".$dataHash{'Gene name'}} . $dataCommentHash{$field}{'values'};
# }
# }
#}
}
}
my $correctField;
#fill finalSortData array (try to invert foreach with NameColHash for external name)
foreach my $field (keys %dataHash){
if (defined $NameColHash{$field} && $NameColHash{$field} != 0){
if ( $field =~ /^[PB]_/){
if ($SV_type eq "DEL" ){
$correctField = $field =~ s/gain|ins|inv/loss/r;
$finalSortData[$NameColHash{$field} - 1] = $dataHash{$correctField};
}elsif ($SV_type eq "DUP" ){
$correctField = $field =~ s/loss|ins|inv/gain/r;
$finalSortData[$NameColHash{$field} - 1] = $dataHash{$correctField};
}else{
$finalSortData[$NameColHash{$field} - 1] = $dataHash{$field};
}
}else{
$finalSortData[$NameColHash{$field} - 1] = $dataHash{$field};
}
}
}
#check missing fields (typo or error) and fill finalSortData array
foreach my $field (keys %NameColHash){
if (! defined $dataHash{$field}){
$finalSortData[$NameColHash{$field} - 1] = "NA";
}
}
#fill color LOEUF bin (old=pLI)
foreach my $field (keys %dataHash){
#if (defined $dataHash{'pLI_ExAC'} ){
if (defined $dataHash{'LOEUF_bin'} ){
foreach my $bin (sort {$b <=> $a} keys %LOEUF_ColorHash){
if ( $dataHash{'LOEUF_bin'} eq "."){
$LOEUF_Color = '#FFFFFF';
last;
}
if ( $dataHash{'LOEUF_bin'} >= $bin){
$LOEUF_Color = $LOEUF_ColorHash{$bin};
last;
}
}
}else{
$LOEUF_Color = '#FFFFFF';
}
}
#change LOEUF color if ACMG gene
if (defined $ACMGgene{$dataHash{'Gene_name'}}){
$LOEUF_Color = '#808080';
}
# check if column names and data have the same size
#if (scalar @finalSortData != keys %OutColHash){
if (scalar @finalSortData != $OutColCounter){
print "\nError in config file: it seems that some POSITION are missing.\nPlease correct config file with continuous 'POSITION' number.\n\n";
exit 1;
}
# print Dumper(\@finalSortData);
#############################################################################
######### FILL HASH STRUCTURE WITH COMMENTS
$variantID = $line[0];
#key for good sorting should be rank concatenated with annotSV_ID
#
#grant full line to be first
if ($dataHash{"Annotation_mode"} eq "full"){
#TODO compute CNV penalty
$scorePenalty = 0;
if(defined $dataHash{"ACMG_class"}){
if($dataHash{"ACMG_class"} ne "." && $dataHash{"ACMG_class"} ne "NA" ){
$scorePenalty = $dataHash{"ACMG_class"}."_" ;
}else{
$scorePenalty .= "_" ;
}
if($SV_type eq "DEL"){
$scorePenalty .= "3_";
}elsif($SV_type eq "DUP"){
$scorePenalty .= "2_";
}else{
$scorePenalty .= "1_";
}
if($dataHash{"Gene_count"} ne "."){
$scorePenalty .= $dataHash{"Gene_count"}."_";
}else{
$scorePenalty .= "0_";
}
if (defined $dataHash{"Exomiser_gene_pheno_score"} && $dataHash{"Exomiser_gene_pheno_score"} ne "-1.0" && $dataHash{"Exomiser_gene_pheno_score"} ne "NA"){
$scorePenalty .= $dataHash{"Exomiser_gene_pheno_score"}."_";
}else {
$scorePenalty .= "0.0000_";
}
if(defined $dataHash{"OMIM_morbid"} && $dataHash{"OMIM_morbid"} eq "yes"){
$scorePenalty .= "1_" ;
}else{
$scorePenalty .= "0_" ;
}
}
$SV_ID{$dataHash{'AnnotSV_ID'}}{'finalScore'} = $scorePenalty;
$fullSplitScore = 1000;
}else{
#TODO compute gene penalty exomiser > OMIM_morbid > LOEUF_bin
$fullSplitScore = 10;
if (defined $dataHash{"Exomiser_gene_pheno_score"} && $dataHash{"Exomiser_gene_pheno_score"} ne "-1" && $dataHash{"Exomiser_gene_pheno_score"} ne "NA"){
$fullSplitScore += (20 * $dataHash{"Exomiser_gene_pheno_score"});
}
if(defined $dataHash{"OMIM_morbid"} && $dataHash{"OMIM_morbid"} eq "yes"){
$fullSplitScore += 10;
}
if(defined $dataHash{"LOEUF_bin"} && $dataHash{"LOEUF_bin"} ne "."){
$fullSplitScore += (10 - $dataHash{"LOEUF_bin"}) ;
}
}
#finalsortData assigment according to full or split
$hashFinalSortData{$SV_ID{$dataHash{'AnnotSV_ID'}}{'finalScore'}."_".$variantID}{$dataHash{'AnnotSV_ID'}}{$fullSplitScore}{$count}{'finalArray'} = [@finalSortData] ;
#url to UCSC for SV , highlight in blue and zoomout x1.5
$hashFinalSortData{$SV_ID{$dataHash{'AnnotSV_ID'}}{'finalScore'}."_".$variantID}{$dataHash{'AnnotSV_ID'}}{$fullSplitScore}{$count}{'url2UCSC'} = "http://genome.ucsc.edu/cgi-bin/hgTracks?db=".$genomeBuild."&position=chr".$dataHash{"SV_chrom"}.":".$dataHash{"SV_start"}."-".$dataHash{"SV_end"}."&hgt.out1=submit&highlight=".$genomeBuild.".chr".$dataHash{"SV_chrom"}.":".$dataHash{"SV_start"}."-".$dataHash{"SV_end"}."#aaedff\" target=\"_blank\" rel=\"noopener noreferrer\"" ;
#URL to HUGO HGNC for split line only
$hashFinalSortData{$SV_ID{$dataHash{'AnnotSV_ID'}}{'finalScore'}."_".$variantID}{$dataHash{'AnnotSV_ID'}}{$fullSplitScore}{$count}{'GeneName_short'} = $GeneName_link_string ;
#url to OMIM
#$hashFinalSortData{$SV_ID{$dataHash{'AnnotSV_ID'}}{'finalScore'}."_".$variantID}{$dataHash{'AnnotSV_ID'}}{$fullSplitScore}{$count}{'url2OMIM'} = "https://www.omim.org/entry/".$dataHash{"OMIM_ID"} ;
$hashFinalSortData{$SV_ID{$dataHash{'AnnotSV_ID'}}{'finalScore'}."_".$variantID}{$dataHash{'AnnotSV_ID'}}{$fullSplitScore}{$count}{'OMIM_ID_short'} = $OMIM_ID_link_string ;
$hashFinalSortData{$SV_ID{$dataHash{'AnnotSV_ID'}}{'finalScore'}."_".$variantID}{$dataHash{'AnnotSV_ID'}}{$fullSplitScore}{$count}{'OMIM_phen_short'} = $OMIM_phen_link_string ;
#comment assigment
foreach my $fieldCom (keys %dataCommentHash){
$hashFinalSortData{$SV_ID{$dataHash{'AnnotSV_ID'}}{'finalScore'}."_".$variantID}{$dataHash{'AnnotSV_ID'}}{$fullSplitScore}{$count}{'hashComments'}{$NameColHash{$fieldCom} -1} = $dataCommentHash{$fieldCom}{'values'} ;
#print $dataCommentHash{'Gene name'}{'values'}."\n\n";
#TODO check color for gene according to output position of gene field
}
#assign color to Gene Name
$hashFinalSortData{$SV_ID{$dataHash{'AnnotSV_ID'}}{'finalScore'}."_".$variantID}{$dataHash{'AnnotSV_ID'}}{$fullSplitScore}{$count}{'hashColor'}{$NameColHash{'Gene_name'}-1} = $LOEUF_Color ;