diff --git a/wwwachab.pl b/wwwachab.pl index be2fd7e..b680f42 100644 --- a/wwwachab.pl +++ b/wwwachab.pl @@ -54,7 +54,7 @@ \n--hideACMG (ACMG tab will be empty but information will be reported in the gene comment) \n--gnomadGenome \n--gnomadExome -\n--MDAPIkey +\n--MDAPIkey \n\n-v|--version < return version number and exit > "; my $versionOut = "achab version www:1.0.13"; @@ -961,16 +961,21 @@ } open( MDAPIKEY , "<$mdAPIkey") or do {print "Didn't find any MoBiDetails APIkey file, expected: ".$mdAPIkey."\n"; $mdAPIkey = ""; } ; -if ($mdAPIkey ne ""){ - print STDERR "Processing MDAPIKEY file ... \n" ; - while( ){ - $md_line = $_; - chomp $md_line; - if ($md_line eq ""){ - $mdAPIkey = ""; - #print "DEBUG: ".$mdAPIkey."\n"; - }else{ - $mdAPIkey = "https://mobidetails.iurc.montp.inserm.fr/MD/api/variant/create_vcf_str?genome_version=hg19&api_key=".$md_line."&vcf_str="; +#checkif file is empty +if (-z $mdAPIkey){ + $mdAPIkey = ""; + print "The MoBiDetails APIkey file: ".$mdAPIkey. " is empty. Please fill it"; +}else{ + if ($mdAPIkey ne ""){ + print STDERR "Processing MDAPIKEY file ... \n" ; + while( ){ + $md_line = $_; + chomp $md_line; + if ($md_line eq ""){ + $mdAPIkey = ""; + }else{ + $mdAPIkey = "https://mobidetails.iurc.montp.inserm.fr/MD/api/variant/create_vcf_str?genome_version=hg19&api_key=".$md_line."&vcf_str="; + } } } } @@ -978,8 +983,6 @@ - - #Hash of 81 ACMG incidentalome genes secondary findings SF v3.2 according to https://www.ncbi.nlm.nih.gov/clinvar/docs/acmg/ my %ACMGgene = ("ACTA2" =>1,"ACTC1" =>1,"ACVRL1" =>1,"APC" =>1,"APOB" =>1,"ATP7B" =>1,"BAG3" =>1,"BMPR1A" =>1,"BRCA1" =>1,"BRCA2" =>1,"BTD" =>1,"CACNA1S" =>1,"CALM1" =>1,"CALM2" =>1,"CALM3" =>1,"CASQ2" =>1,"COL3A1" =>1,"DES" =>1,"DSC2" =>1,"DSG2" =>1,"DSP" =>1,"ENG" =>1,"FBN1" =>1,"FLNC" =>1,"GAA" =>1,"GLA" =>1,"HFE" =>1,"HNF1A" =>1,"KCNH2" =>1,"KCNQ1" =>1,"LDLR" =>1,"LMNA" =>1,"MAX" =>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,"PALB2" =>1,"PCSK9" =>1,"PKP2" =>1,"PMS2" =>1,"PRKAG2" =>1,"PTEN" =>1,"RB1" =>1,"RBM20" =>1,"RET" =>1,"RPE65" =>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,"TMEM127" =>1,"TMEM43" =>1,"TNNC1" =>1,"TNNI3" =>1,"TNNT2" =>1,"TP53" =>1,"TPM1" =>1,"TRDN" =>1,"TSC1" =>1,"TSC2" =>1,"TTN" =>1,"TTR" =>1,"VHL" =>1,"WT1" =>1);