]> git.donarmstrong.com Git - biopieces.git/blobdiff - bp_bin/compute
fixed pipes for adaptor removal
[biopieces.git] / bp_bin / compute
index 359becd34640a9b04859d5f0adc0accecbb4f80e..93206f06d5f5380bdbd30f1b8805fce989040c9c 100755 (executable)
@@ -26,6 +26,7 @@
 # >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
 
 
+use warnings;
 use strict;
 use Maasha::Common;
 use Maasha::Biopieces;
@@ -38,7 +39,8 @@ my ( $options, $in, $out, $record, $eval_key, @keys, $eval_val );
 
 $options = Maasha::Biopieces::parse_options(
     [
-        { long => 'eval', short => 'e', type => 'string', mandatory => 'yes', default => undef, allowed => undef, disallowed => undef },
+        { long => 'eval',   short => 'e', type => 'string', mandatory => 'yes', default => undef, allowed => undef, disallowed => undef },
+        { long => 'format', short => 'f', type => 'string', mandatory => 'no',  default => undef, allowed => undef, disallowed => undef },
     ]   
 );
 
@@ -63,6 +65,7 @@ while ( $record = Maasha::Biopieces::get_record( $in ) )
 
         $record->{ $eval_key } = eval "$eval_val";
         Maasha::Common::error( qq(eval "$eval_key = $eval_val" failed -> $@) ) if $@;
+        $record->{ $eval_key } = sprintf( $options->{ 'format' }, $record->{ $eval_key } ) if $options->{ 'format' };
     }
     else
     {