pjotrp/bioruby-table

Problem with lazy values (example in README)

Closed this issue · 1 comments

bio-table --merge pos_count.tab ../without/pos_count.tab --num-filter "values.compact.size == values.size" > merged.tab
bio-table 0.8.1-pre1 Copyright (C) 2012 Pjotr Prins pjotr.prins@thebird.nl

INFO bio-table: Array: [{:show_help=>false, :write_header=>true, :skip=>0, :merge=>true, :num_filter=>"values.compact.size == values.size"}]
INFO bio-table: Parsing pos_count.tab
INFO bio-table: Array: ["41245251", "30"]
Failed to evaluate ["35"] with values.compact.size == values.size
/home/wrk/izip/git/opensource/ruby/bioruby-table/lib/bio-table/filter.rb:149:in eval': undefined methodsize' for #BioTable::LazyValues:0x00000002b67f90 (NoMethodError)

This can be fixed by using values.to_a.size, realising the lazy values into an array. Fixed in README.