[BioRuby] the bio-table tool

George Githinji georgkam at gmail.com
Tue Jul 17 11:09:44 UTC 2012


Hi,
I have been writing awk scripts to deal with CSV data when i need to.
Having something in Ruby is totally cool! How good is it at handling
tables with hundreds of thousands of lines?
thanks PJ.


On Tue, Jul 17, 2012 at 1:56 PM, Pjotr Prins <pjotr.public14 at thebird.nl> wrote:
> 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.
> _______________________________________________
> BioRuby Project - http://www.bioruby.org/
> BioRuby mailing list
> BioRuby at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/bioruby



-- 
---------------
Sincerely
George
Skype: george_g2
Blog: http://biorelated.wordpress.com/
Twitter: http://twitter.com/#!/george_l



More information about the BioRuby mailing list