From 7ee33cf1658130af656df19e60953b52c0c7bdaa Mon Sep 17 00:00:00 2001 From: martinahansen Date: Wed, 8 Sep 2010 07:21:41 +0000 Subject: [PATCH] fixed minor bug in write_align of pairwise protein alignments git-svn-id: http://biopieces.googlecode.com/svn/trunk@1077 74ccb610-7750-0410-82ae-013aeee3265d --- code_perl/Maasha/Align.pm | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/code_perl/Maasha/Align.pm b/code_perl/Maasha/Align.pm index a01ec4b..262ee48 100644 --- a/code_perl/Maasha/Align.pm +++ b/code_perl/Maasha/Align.pm @@ -272,18 +272,18 @@ sub align_pins $type ||= Maasha::Seq::seq_guess_type( $entry1->[ SEQ ] ); - $blosum = blosum_read() if $type eq "PROTEIN"; + $blosum = blosum_read() if $type =~ "PROTEIN"; for ( $i = 0; $i < length $entry1->[ SEQ ]; $i++ ) { - $char1 = substr $entry1->[ SEQ ], $i, 1; - $char2 = substr $entry2->[ SEQ ], $i, 1; + $char1 = uc substr $entry1->[ SEQ ], $i, 1; + $char2 = uc substr $entry2->[ SEQ ], $i, 1; if ( $blosum and $char1 eq $char2 ) { $pins .= $char1; - } elsif ( uc $char1 eq uc $char2 ) { + } elsif ( $char1 eq $char2 ) { $pins .= "|"; - } elsif ( $blosum and $blosum->{ $char1 }->{ $char2 } > 0 ) { + } elsif ( $blosum and defined $blosum->{ $char1 }->{ $char2 } and $blosum->{ $char1 }->{ $char2 } > 0 ) { $pins .= "+"; } else { $pins .= " "; -- 2.39.2