Skip to content

Commit

Permalink
maf2maf: Remove only one anchor bp if found, not all of them
Browse files Browse the repository at this point in the history
  • Loading branch information
ckandoth committed Mar 29, 2021
1 parent 317fa2c commit 2235eed
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions maf2maf.pl
Expand Up @@ -274,8 +274,8 @@
# Prefer Tumor_Seq_Allele2 over Tumor_Seq_Allele1 if both are non-REF
my $var = (( defined $al2 and $al2 and $al2 ne $ref ) ? $al2 : $al1 );

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

0 comments on commit 2235eed

Please sign in to comment.