Skip to content

Commit 2235eed

Browse files
committed
maf2maf: Remove only one anchor bp if found, not all of them
1 parent 317fa2c commit 2235eed

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

maf2maf.pl

+2-2
Original file line numberDiff line numberDiff line change
@@ -274,8 +274,8 @@
274274
# Prefer Tumor_Seq_Allele2 over Tumor_Seq_Allele1 if both are non-REF
275275
my $var = (( defined $al2 and $al2 and $al2 ne $ref ) ? $al2 : $al1 );
276276

277-
# Remove any prefixed reference bps from alleles, using "-" for simple indels
278-
while( $ref and $var and substr( $ref, 0, 1 ) eq substr( $var, 0, 1 ) and $ref ne $var ) {
277+
# Remove (only one) prefixed reference bp from alleles, using "-" for simple indels
278+
if( $ref and $var and substr( $ref, 0, 1 ) eq substr( $var, 0, 1 ) and $ref ne $var ) {
279279
( $ref, $var ) = map{$_ = substr( $_, 1 ); ( $_ ? $_ : "-" )} ( $ref, $var );
280280
++$pos unless( $ref eq "-" );
281281
}

0 commit comments

Comments
 (0)