From 778d55ed5b3fd9c023252be71f6a13855e118e17 Mon Sep 17 00:00:00 2001 From: chaopower Date: Mon, 26 Feb 2024 10:06:23 +0800 Subject: [PATCH] =?UTF-8?q?hgvs=20=E9=87=87=E7=94=A8=E6=A0=87=E5=87=86?= =?UTF-8?q?=E8=BD=AC=E5=BD=95=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- codes/filter_snpindel.pl | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/codes/filter_snpindel.pl b/codes/filter_snpindel.pl index 5a7b453..c95b8a4 100755 --- a/codes/filter_snpindel.pl +++ b/codes/filter_snpindel.pl @@ -189,18 +189,22 @@ while () { push @reason, 'not_need_spl_inron'; } my @hgvs = split(/,/, $line[9]); - my $hgvs = $hgvs[0]; + # my $hgvs = $hgvs[0]; my $transcript_gene; $transcript_gene = $transcript{$gene} if (exists $transcript{$gene}); + my $hgvs; if (grep {/$transcript_gene/} @hgvs) { $hgvs = (grep {/$transcript_gene/} @hgvs)[0]; - } - $line[9] = $hgvs; + $line[9] = $hgvs; - $hgvs =~ /:(NM_\d+):exon\d+:(c\.\S+):p\.(\S+)$/; - $protein = $3; - if ($protein =~ /\d+X$|\d+\*$/ or $line[8] eq 'stopgain' or $line[8] eq 'frameshift deletion' or $line[8] eq 'frameshift insertion') { - $protein = 'Truncating Mutations'; + $hgvs =~ /:(NM_\d+):exon\d+:(c\.\S+):p\.(\S+)$/; + $protein = $3; + if ($protein =~ /\d+X$|\d+\*$/ or $line[8] eq 'stopgain' or $line[8] eq 'frameshift deletion' or $line[8] eq 'frameshift insertion') { + $protein = 'Truncating Mutations'; + } + } + else { + push @reason, 'not_correct_hgvs'; } }