|
2 | 2 |
|
3 | 3 | ##### wwwachab.pl #### |
4 | 4 |
|
5 | | -# Author : Thomas Guignard 2022 |
| 5 | +# Author : Thomas Guignard 2023 |
6 | 6 |
|
7 | 7 | # Description : |
8 | 8 | # Create an User friendly Excel file from an MPA annotated VCF file. |
|
24 | 24 | \n--outPrefix <output file prelifx (default = \"\")> |
25 | 25 | \n--candidates <file with end-of-line separated gene symbols of interest (it will create more tabs, if '#myPathology' is present in the file, a 'myPathology' tab will be created) > |
26 | 26 | \n--phenolyzerFile <phenolyzer output file suffixed by predicted_gene_scores (it will contribute to the final ranking and top50 genes will be added in METADATA tab) > |
27 | | -\n--popFreqThr <allelic frequency threshold from 0 to 1 default=0.01 (based on gnomAD_genome_ALL) > |
| 27 | +\n--popFreqThr <allelic frequency threshold from 0 to 1 default=0.01 (based on gnomAD_genome_ALL or on the first field of gnomadGenome argument) > |
28 | 28 | \n--trio (requires case dad and mum option to be filled, but if case dad and mum option are filled, trio mode is automatically activated) |
29 | 29 | \n\t--case <index_sample_name> (required with trio option) |
30 | 30 | \n\t--dad <father_sample_name> (required with trio option) |
|
51 | 51 | \n--genemap2File <OMIM genemap2 file (it will help to annotate OMIM genes in poor coverage file ) > |
52 | 52 | \n--skipCaseWT (only if trio mode is activated, it will skip variant if case genotype is 0/0 ) |
53 | 53 | \n--hideACMG (ACMG tab will be empty but information will be reported in the gene comment) |
| 54 | +\n--gnomadGenome <comma separated list of gnomad genome annotation fields that will be displayed as gnomAD comments. First field of the list will be filtered regarding to popFreqThr argument, and it will be considered as column name, but it must be different from the exome one. (default fields are hard-coded gnomAD_genome_ALL like) > |
| 55 | +\n--gnomadExome <comma separated list of gnomad exome annotation fields that will be displayed as gnomAD comments. First field of the list will be treated as column name, but it must be different from the genome one. (default fields are hard-coded gnomAD_exome_ALL like) > |
54 | 56 | \n\n-v|--version < return version number and exit > "; |
55 | 57 |
|
56 | | -my $versionOut = "achab version www:1.0.6"; |
| 58 | +my $versionOut = "achab version www:1.0.7"; |
57 | 59 |
|
58 | 60 | #################################### VARIABLES INIT ######################## |
59 | 61 |
|
|
181 | 183 | my @poorCoverage_List; |
182 | 184 | my %poorCoverage_variant; |
183 | 185 |
|
| 186 | +#adapt gnomAD names |
| 187 | +my $gnomadGenome_names = ""; |
| 188 | +my @gnomadGenome_List; |
| 189 | +my $gnomadGenomeColumn = "gnomAD_genome_ALL"; |
| 190 | +my $gnomadExome_names = ""; |
| 191 | +my @gnomadExome_List; |
| 192 | +my $gnomadExomeColumn = "gnomAD_exome_ALL"; |
184 | 193 |
|
185 | 194 | my $hideACMG; |
186 | 195 |
|
|
231 | 240 | "genemap2File:s" => \$genemap2_File, |
232 | 241 | "skipCaseWT" => \$skipCaseWT, |
233 | 242 | "hideACMG" => \$hideACMG, |
234 | | - "help|h" => \$help, |
235 | | - "version|v" => \$version); |
| 243 | + "gnomadGenome:s" => \$gnomadGenome_names, |
| 244 | + "gnomadExome:s" => \$gnomadExome_names, |
| 245 | + "help|h" => \$help, |
| 246 | + "version|v" => \$version); |
236 | 247 |
|
237 | 248 |
|
238 | 249 |
|
|
350 | 361 | } |
351 | 362 | } |
352 | 363 |
|
| 364 | +#gnomad names |
| 365 | +if ($gnomadGenome_names ne ""){ |
| 366 | + chomp $gnomadGenome_names; |
| 367 | + @gnomadGenome_List = split(/,/ , $gnomadGenome_names); |
| 368 | + $gnomadGenomeColumn = $gnomadGenome_List[0]; |
| 369 | +} |
| 370 | +if ($gnomadExome_names ne ""){ |
| 371 | + chomp $gnomadExome_names; |
| 372 | + @gnomadExome_List = split(/,/ , $gnomadExome_names); |
| 373 | + $gnomadExomeColumn = $gnomadExome_List[0]; |
| 374 | +} |
| 375 | + |
353 | 376 |
|
354 | 377 |
|
355 | 378 | #Samples subset |
|
933 | 956 | $dicoColumnNbr{'Phenolyzer'}= 2; #Phenolyzer raw score + comment Normalized score |
934 | 957 | $dicoColumnNbr{'Gene.'.$refGene}= 3; #Gene Name + comment LOEUF / Function_description / tissue specificity |
935 | 958 | $dicoColumnNbr{'Phenotypes.'.$refGene}= 4; #OMIM + comment Disease_description |
936 | | -$dicoColumnNbr{'gnomAD_genome_ALL'}= 5; #Pop Freq + comment ethny |
937 | | -$dicoColumnNbr{'gnomAD_exome_ALL'}= 6; #as well |
| 959 | +$dicoColumnNbr{$gnomadGenomeColumn}= 5; #Pop Freq + comment ethny |
| 960 | +$dicoColumnNbr{$gnomadExomeColumn}= 6; #as well |
938 | 961 | $dicoColumnNbr{'CLNSIG'}= 7; #CLinvar |
939 | 962 | $dicoColumnNbr{'InterVar_automated'}= 8; #+ comment ACMG status |
940 | 963 | $dicoColumnNbr{'SecondHit-CNV'}= 9; #TODO |
|
1129 | 1152 |
|
1130 | 1153 | my $pLI_Comment = "pLI - the probability of being loss-of-function intolerant (intolerant of both heterozygous and homozygous lof variants)\npRec - the probability of being intolerant of homozygous, but not heterozygous lof variants\npNull - the probability of being tolerant of both heterozygous and homozygous lof variants"; |
1131 | 1154 |
|
1132 | | -my @CommentGnomadGenome = ('gnomAD_genome_ALL', |
| 1155 | +my @CommentGnomadGenome; |
| 1156 | +if ($gnomadGenome_names ne ""){ |
| 1157 | + @CommentGnomadGenome = @gnomadGenome_List; |
| 1158 | +}else{ |
| 1159 | + @CommentGnomadGenome = ('gnomAD_genome_ALL', |
1133 | 1160 | 'gnomAD_genome_AFR', |
1134 | 1161 | 'gnomAD_genome_AMR', |
1135 | 1162 | 'gnomAD_genome_ASJ', |
1136 | 1163 | 'gnomAD_genome_EAS', |
1137 | 1164 | 'gnomAD_genome_FIN', |
1138 | 1165 | 'gnomAD_genome_NFE', |
1139 | 1166 | 'gnomAD_genome_OTH'); |
| 1167 | +} |
1140 | 1168 |
|
1141 | | - |
1142 | | - |
1143 | | - |
1144 | | - |
1145 | | -my @CommentGnomadExome = ('gnomAD_exome_ALL', |
| 1169 | +my @CommentGnomadExome; |
| 1170 | +if ($gnomadExome_names ne ""){ |
| 1171 | + @CommentGnomadExome = @gnomadExome_List; |
| 1172 | +}else{ |
| 1173 | + @CommentGnomadExome = ('gnomAD_exome_ALL', |
1146 | 1174 | 'gnomAD_exome_AFR', |
1147 | 1175 | 'gnomAD_exome_AMR', |
1148 | 1176 | 'gnomAD_exome_ASJ', |
1149 | 1177 | 'gnomAD_exome_EAS', |
1150 | 1178 | 'gnomAD_exome_FIN', |
1151 | 1179 | 'gnomAD_exome_NFE', |
1152 | 1180 | 'gnomAD_exome_OTH'); |
| 1181 | +} |
1153 | 1182 |
|
1154 | 1183 |
|
1155 | 1184 | my %CommentInterVar = ( |
|
1427 | 1456 |
|
1428 | 1457 | #select only x% pop freq |
1429 | 1458 | #Use pop freq threshold as an input parameter (default = 1%) |
1430 | | - next if(( $dicoInfo{'gnomAD_genome_ALL'} ne ".") && ($dicoInfo{'gnomAD_genome_ALL'} > $popFreqThr)); |
1431 | 1459 |
|
1432 | 1460 | #convert gnomad freq "." to zero |
1433 | | - if( $dicoInfo{'gnomAD_genome_ALL'} eq "."){ |
1434 | | - $dicoInfo{'gnomAD_genome_ALL'} = 0; |
| 1461 | + if( $dicoInfo{$gnomadGenomeColumn} eq "."){ |
| 1462 | + $dicoInfo{$gnomadGenomeColumn} = 0; |
1435 | 1463 | } |
1436 | | - if( $dicoInfo{'gnomAD_exome_ALL'} eq "."){ |
1437 | | - $dicoInfo{'gnomAD_exome_ALL'} = 0; |
| 1464 | + if( $dicoInfo{$gnomadExomeColumn} eq "."){ |
| 1465 | + $dicoInfo{$gnomadExomeColumn} = 0; |
1438 | 1466 | } |
1439 | 1467 |
|
1440 | 1468 | #FILTERING according to newHope option and filterList option |
|
1486 | 1514 | #print "dicoInfo\t".$dicoInfo{$keys}."\n"; |
1487 | 1515 | #print "keys\t".$keys."\n"; |
1488 | 1516 | }else{ |
1489 | | - #check if custom INFO exists in VCF |
1490 | | - if($dicoColumnNbr{$keys} > (16+$cmpt)){ |
| 1517 | + #check if custom INFO exists in VCF or gnomad_genome or gnomad_exome names |
| 1518 | + if($dicoColumnNbr{$keys} > (16+$cmpt) || $dicoColumnNbr{$keys} == 5 || $dicoColumnNbr{$keys} == 6 ){ |
1491 | 1519 | $finalSortData[$dicoColumnNbr{$keys}] = "INFO not found"; |
1492 | 1520 | } |
1493 | 1521 | } |
@@ -3411,8 +3439,8 @@ sub writeThisSheet { |
3411 | 3439 |
|
3412 | 3440 | $worksheet->write_row( $worksheetLine, 0, $hashTemp{'finalArray'} ); |
3413 | 3441 | $worksheet->write_comment( $worksheetLine,$hashColumn{'MPA_ranking'}, $hashTemp{'commentMPAscore'} ,x_scale => 2, y_scale => 5 ); |
3414 | | - $worksheet->write_comment( $worksheetLine,$hashColumn{'gnomAD_genome_ALL'}, $hashTemp{'commentGnomADgenome'} ,x_scale => 3, y_scale => 2 ); |
3415 | | - $worksheet->write_comment( $worksheetLine,$hashColumn{'gnomAD_exome_ALL'}, $hashTemp{'commentGnomADexome'} ,x_scale => 3, y_scale => 2 ); |
| 3442 | + $worksheet->write_comment( $worksheetLine,$hashColumn{$gnomadGenomeColumn}, $hashTemp{'commentGnomADgenome'} ,x_scale => 3, y_scale => 2 ); |
| 3443 | + $worksheet->write_comment( $worksheetLine,$hashColumn{$gnomadExomeColumn}, $hashTemp{'commentGnomADexome'} ,x_scale => 3, y_scale => 2 ); |
3416 | 3444 | $worksheet->write_comment( $worksheetLine,$hashColumn{'Genotype-'.$case}, $hashTemp{'commentGenotype'} ,x_scale => 2, y_scale => $hashTemp{'nbSample'} ); |
3417 | 3445 | $worksheet->write_comment( $worksheetLine,$hashColumn{'Func.'.$refGene}, $hashTemp{'commentFunc'} ,x_scale => 3, y_scale => 3 ); |
3418 | 3446 |
|
|
0 commit comments