From d494e9437afbed18d485f67ad73c7d46b1112882 Mon Sep 17 00:00:00 2001 From: Raphael Poujol Date: Tue, 21 Jun 2022 12:34:30 -0400 Subject: [PATCH] Update pileup2baseindel.pl to avoid a bug when mpileup contain the refrence ($ref do not change with the position) --- pileup2baseindel.pl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pileup2baseindel.pl b/pileup2baseindel.pl index 7dadecb..cc50e03 100644 --- a/pileup2baseindel.pl +++ b/pileup2baseindel.pl @@ -72,7 +72,7 @@ my @region=(3*($i-1),3*($i-1)+1,3*($i-1)+2); my ($dp,$bases,$bq) = @dp_bases_bq[@region]; - my $str = parsePileup($bases,$bq,$BQcut,$offset); + my $str = parsePileup($bases,$bq,$BQcut,$offset,$ref); if($str ne "*"){ print $fh join "\t",($chr,$loc,$ref,$str); @@ -88,7 +88,7 @@ my $fh = $files{$i}; my @region=(3*($i-1),3*($i-1)+1,3*($i-1)+2); my ($dp,$bases,$bq) = @dp_bases_bq[@region]; - my $str = parsePileup($bases,$bq,$BQcut,$offset); + my $str = parsePileup($bases,$bq,$BQcut,$offset,$ref); if($str ne "*"){ print $fh join "\t",($chr,$loc,$ref,$str); } @@ -103,7 +103,7 @@ sub parsePileup{ - my ($bases,$bq,$BQcut,$offset) = @_; + my ($bases,$bq,$BQcut,$offset,$ref) = @_; if($bases eq "*"){ return "*";