Ensembl / ensembl-vep

The Ensembl Variant Effect Predictor predicts the functional effects of genomic variants
https://www.ensembl.org/vep
Apache License 2.0
445 stars 151 forks source link

G2P for "BOTH monoallelic and biallelic" genes in PanelApp panels #1746

Open MikeHala opened 3 weeks ago

MikeHala commented 3 weeks ago

Hi Team,

Some genes have "BOTH monoallelic and biallelic" Model_Of_Inheritance values in PanelApp panels.

The current G2P.pm code

          ....
          my @ars = ();
          my $allelic_requirement_panel_app = $tmp{"Model_Of_Inheritance"};
          if ($allelic_requirement_panel_app =~ m/MONOALLELIC|BOTH/) {
            push @ars, 'monoallelic';
          } elsif ($allelic_requirement_panel_app =~ m/BIALLELIC|BOTH/) {
            push @ars, 'biallelic';
          } elsif ($allelic_requirement_panel_app eq 'X-LINKED: hemizygous mutation in males, biallelic mutations in females') {
            push @ars, 'hemizygous';
          } elsif ($allelic_requirement_panel_app eq 'X-LINKED: hemizygous mutation in males, monoallelic mutations in females may cause disease (may be less severe, later onset than males)') {
            push @ars, 'x-linked dominant';
          } else {
            $self->write_report('log', "no allelelic_requirement for $ensembl_gene_id");
          }
          foreach my $ar (@ars) {
            push @{$gene_data{$ensembl_gene_id}->{"allelic requirement"}}, $ar;
          }
          ...

incorrectly leads to considering such genes as monoallelic only.

We have applied the following fix to the code

          ....
          my @ars = ();
          my $allelic_requirement_panel_app = $tmp{"Model_Of_Inheritance"};
          if ($allelic_requirement_panel_app =~ m/BOTH monoallelic and biallelic/) {
            push @ars, 'monoallelic';
            push @ars, 'biallelic';
          } elsif ($allelic_requirement_panel_app =~ m/MONOALLELIC/) {
            push @ars, 'monoallelic';
          } elsif ($allelic_requirement_panel_app =~ m/BIALLELIC/) {
            push @ars, 'biallelic';
          } elsif ($allelic_requirement_panel_app eq 'X-LINKED: hemizygous mutation in males, biallelic mutations in females') {
            push @ars, 'hemizygous';
          } elsif ($allelic_requirement_panel_app eq 'X-LINKED: hemizygous mutation in males, monoallelic mutations in females may cause disease (may be less severe, later onset than males)') {
            push @ars, 'x-linked dominant';
          } else {
            $self->write_report('log', "no allelelic_requirement for $ensembl_gene_id");
          }
          foreach my $ar (@ars) {
            push @{$gene_data{$ensembl_gene_id}->{"allelic requirement"}}, $ar;
          }
          ...

which leads to considering such genes as both monoallelic and biallelic.

We have tested our fix on a single such gene and now G2P produces the expected results. Is this fix acceptable? Are we overlooking something?

Kind reagrds, Mike

dglemos commented 2 weeks ago

Hi @MikeHala, Thanks for reporting this issue. We plan to update how the plugin identifies the allelic requirement from PanelApp. There are some inconsistencies in the plugin such as the one you reported. For the time being your fix seems correct - but I'll let you know once we update the plugin.

Best wishes, Diana