]> git.donarmstrong.com Git - biopieces.git/commitdiff
polished read_sam
authormartinahansen <martinahansen@74ccb610-7750-0410-82ae-013aeee3265d>
Tue, 19 Feb 2013 13:40:21 +0000 (13:40 +0000)
committermartinahansen <martinahansen@74ccb610-7750-0410-82ae-013aeee3265d>
Tue, 19 Feb 2013 13:40:21 +0000 (13:40 +0000)
git-svn-id: http://biopieces.googlecode.com/svn/trunk@2092 74ccb610-7750-0410-82ae-013aeee3265d

bp_bin/read_sam

index 69cbf64e0b792cf5b4749effaa222a46fa3fa9b2..1da5ff58535aef7be08647dcb7a13942aa99a111 100755 (executable)
@@ -45,14 +45,14 @@ Biopieces.open(options[:stream_in], options[:stream_out]) do |input, output|
     output.puts record
   end
 
-  if options.has_key? :data_in
+  if options[:data_in]
     options[:data_in].each do |file|
-      Sam.open(file, mode='r') do |sam|
+      Sam.open(file, 'r') do |sam|
         sam.each do |entry|
           output.puts Sam.to_bp(entry)
           num += 1
 
-          if options.has_key? :num and options[:num] == num
+          if options[:num] and options[:num] == num
             last = true
             break
           end