# Returns nothing.
- my ( $record, $eval_key, $eval_val, $check, @keys );
+ my ( $record, $eval_key, $eval_val );
while ( $record = get_record( $in ) )
{
$eval_val = $2;
}
- if ( not $check )
- {
- @keys = split /\W+/, $eval_val;
- @keys = grep { ! /^\d+$/ } @keys;
-
- $check = 1;
- }
-
- map { $eval_val =~ s/$_/$record->{ $_ }/g } @keys;
+ map { $eval_val =~ s/\Q$_\E/$record->{ $_ }/g } keys %{ $record };
$record->{ $eval_key } = eval "$eval_val" or Maasha::Common::error( "eval failed -> $@" );
}
$char_hash{ $char } += $char_hash{ lc $char };
- $analysis{ "RES:$char" } = $char_hash{ $char };
+ $analysis{ "RES[$char]" } = $char_hash{ $char };
$max = $char_hash{ $char } if $char_hash{ $char } > $max;
$analysis{ "RES_SUM" } += $char_hash{ $char };
}
- map { $analysis{ "RES:$_" } = $indel_hash{ $_ } } @indels;
+ map { $analysis{ "RES[$_]" } = $indel_hash{ $_ } } @indels;
$analysis{ "MIX_INDEX" } = sprintf( "%.2f", $max / $analysis{ "SEQ_LEN" } );
$analysis{ "MELT_TEMP" } = sprintf( "%.2f", 4 * $gc + 2 * $at );