]> git.donarmstrong.com Git - biopieces.git/blobdiff - bp_bin/remove_indels
fixed seq qual length check
[biopieces.git] / bp_bin / remove_indels
index 5d350e09851c8a81dd0b807f0256666d0ffa3ac2..9a1ad033a0fbe508f4f12891ba06885179040814 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/env perl -w
+#!/usr/bin/env perl
 
 # Copyright (C) 2007-2009 Martin A. Hansen.
 
@@ -26,6 +26,7 @@
 # >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
 
 
+use warnings;
 use strict;
 use Maasha::Biopieces;
 
@@ -42,7 +43,8 @@ $out = Maasha::Biopieces::write_stream( $options->{ "stream_out" } );
 
 while ( $record = Maasha::Biopieces::get_record( $in ) ) 
 {
-    $record->{ 'SEQ' } =~ tr/-~.//d if $record->{ "SEQ" };
+    $record->{ 'SEQ' }     =~ tr/-~.//d if $record->{ "SEQ" };
+    $record->{ 'SEQ_LEN' } = length $record->{ "SEQ" };
 
     Maasha::Biopieces::put_record( $record, $out );
 }