From: martinahansen <martinahansen@74ccb610-7750-0410-82ae-013aeee3265d>
Date: Fri, 29 Aug 2008 07:36:32 +0000 (+0000)
Subject: fixed bug in remove_adaptor
X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=ddc8ea04afe06f6501e9fb6caad52685ee49d6e1;p=biopieces.git

fixed bug in remove_adaptor

git-svn-id: http://biopieces.googlecode.com/svn/trunk@234 74ccb610-7750-0410-82ae-013aeee3265d
---

diff --git a/code_perl/Maasha/Biopieces.pm b/code_perl/Maasha/Biopieces.pm
index 18bd446..453bc24 100644
--- a/code_perl/Maasha/Biopieces.pm
+++ b/code_perl/Maasha/Biopieces.pm
@@ -4590,16 +4590,13 @@ sub script_remove_adaptor
 
             $record->{ "ADAPTOR_POS" } = $pos;
 
-            if ( $pos >= 0 )
+            if ( $pos >= 0 and not $options->{ "no_remove" } )
             {
-                if ( not $options->{ "no_remove" } )
-                {
-                    $record->{ "SEQ" }     = substr $record->{ "SEQ" }, 0, $pos;
-                    $record->{ "SEQ_LEN" } = $pos;
-                }
-
-                put_record( $record, $out );
+                $record->{ "SEQ" }     = substr $record->{ "SEQ" }, 0, $pos;
+                $record->{ "SEQ_LEN" } = $pos;
             }
+
+            put_record( $record, $out );
         }
         else
         {