[BioRuby] the bio-table tool

Pjotr Prins pjotr.public14 at thebird.nl
Tue Jul 17 10:56:59 UTC 2012


I just want to share the release of one of the most useful tools I
have come up with in a while :). 

Most of us have to deal with tabular data, delivered through
spreadsheets, SQL output etc. I found I was repeating myself too
often, writing one-off scripts. So I have come up with a command-line
tool which allows you to transform and edit(!) tables on the fly,
using one-liners. 

Just now I was wanted to find overlapping marker/geneset combinations
in two files. The command was

   bio-table --overlap 0,2 NA.SUMMARY.RESULTS.REPORT.1.txt gsea_report_for_1_1342469955711.csv > overlap.1.tab

where the columns to compare were 0 and 2. You can diff on columns:

  bio-table --diff 0,3 table2.csv table1.csv 

and merge tables (side by side). You can filter on values 

  bio-table table1.csv --num-filter "values[3]-values[6] >= 0.05"

and regex

  bio-table table1.csv --filter "rowname =~ /BGT/ and field[1] =~ /BGT/" 

and rewrite values

  bio-table table1.csv --rewrite 'rowname.upcase!; field[1]=nil if field[2].to_f<0.25'

See https://github.com/pjotrp/bioruby-table for more examples.

Pj.



More information about the BioRuby mailing list