]> git.donarmstrong.com Git - biopieces.git/blobdiff - bp_bin/length_seq
refactoring of ruby code s/has_key?/[]/
[biopieces.git] / bp_bin / length_seq
index e9f87269e0a5d944e31a7e3296bfd02af36ef896..04384db3660c7762ccb1b99f9500d8a2e4bd3dc5 100755 (executable)
@@ -37,7 +37,7 @@ options = Biopieces.options_parse(ARGV, casts)
 
 Biopieces.open(options[:stream_in], options[:stream_out]) do |input, output|
   input.each_record do |record|
-    record[:SEQ_LEN] = record[:SEQ].length if record.has_key? :SEQ
+    record[:SEQ_LEN] = record[:SEQ].length if record[:SEQ]
     output.puts record
   end
 end