Skip to content

Commit

Permalink
update to add alt_cHGVS fix for gene flanking region too
Browse files Browse the repository at this point in the history
  • Loading branch information
liutao committed Apr 15, 2021
1 parent c619b62 commit 0f5cc57
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/BedAnno.pm
Original file line number Diff line number Diff line change
Expand Up @@ -2848,13 +2848,17 @@ sub finaliseAnno {
# 1.23 add standard_cHGVS for gene flanking numbering cHGVS.
if ( exists $trAnnoEnt->{c} and $trAnnoEnt->{c} =~ /-u|\+d/ ) {
$trAnnoEnt->{standard_cHGVS} = $trAnnoEnt->{c};

}
if ( exists $trAnnoEnt->{standard_cHGVS} ) {
$trAnnoEnt->{standard_cHGVS} =~ s/(?<=\*|-)(\d+)(-u|\+d)(\d+)/$1+$3/eg;
$trAnnoEnt->{standard_cHGVS} =~ s/\d+-u/-/g; # for no-5'utr case
$trAnnoEnt->{standard_cHGVS} =~ s/\d+\+d/*/g; # for no-3'utr case
}
if ( exists $trAnnoEnt->{alt_cHGVS} and $trAnnoEnt->{alt_cHGVS} =~ /-u|\+d/ ) {
$trAnnoEnt->{alt_cHGVS} =~ s/(?<=\*|-)(\d+)(-u|\+d)(\d+)/$1+$3/eg;
$trAnnoEnt->{alt_cHGVS} =~ s/\d+-u/-/g; # for no-5'utr case
$trAnnoEnt->{alt_cHGVS} =~ s/\d+\+d/*/g; # for no-3'utr case
}

$trAnnoEnt->{trVarName} = _getTrVarName( $tid, $trAnnoEnt );
}
Expand Down

0 comments on commit 0f5cc57

Please sign in to comment.