]> git.donarmstrong.com Git - biopieces.git/blobdiff - bp_bin/median_vals
refactoring of assemble_pairs
[biopieces.git] / bp_bin / median_vals
index b999665e57d23b216dc813b77acc22272f783846..e32415ca05094bb872cf4d193c70fbae1e378a52 100755 (executable)
@@ -78,10 +78,10 @@ foreach $key ( @{ $options->{ "keys" } } )
         $median = "N/A";
     }
 
-    $new_record->{ $key . "_MEDIAN" } = $mean
+    $new_record->{ $key . "_MEDIAN" } = $median;
 }
 
-if ( $options->{ "keys" } )
+if ( $options->{ "keys" } and $new_record )
 {
     $new_record->{ 'REC_TYPE' } = "MEDIAN";