# HG changeset patch # User Assaf Gordon # Date 1416706784 18000 # Node ID 48bbe512639eab753750f69acb6fb1bf3a5d7a58 # Parent 22080cbb0e2a147c23e0db2b928c84bfdf7dff0d add datamash-reverse tool. diff -r 22080cbb0e2a -r 48bbe512639e datamash-reverse.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/datamash-reverse.xml Sat Nov 22 20:39:44 2014 -0500 @@ -0,0 +1,64 @@ + + columns in a tabular file + + + datamash + + + + datamash -W reverse < $in_file > $out_file + + + + + + + + + + + + + + + +.. class:: infomark + +**TIP:** Input data must be TAB delimited. If the desired dataset does not appear in the input list, use *Text Manipulation->Convert* to convert it to **Tabular** type. + +----- + +**Syntax** + +This tools reverses the order of columns in a tabular input file. + +----- + +**Example** + +Input file:: + + Genes Sample Counts + NOX1 A1 514 + DcP A2 542 + HH B3 490 + +Output file:: + + Counts Sample Genes + 514 A1 NOX1 + 542 A2 DcP + 490 B3 HH + +----- + +**GNU Datamash** is a Free and Open Source Software, see more details on the Datamash_ Website. + +**GNU Datamash** is also available as a command-line program, see http://www.gnu.org/software/datamash/download/ . + +For more details about supported statistical operations, see Datamash_ website. + +.. _Datamash: http://www.gnu.org/software/datamash/ + + + diff -r 22080cbb0e2a -r 48bbe512639e test-data/datamash_reverse_input.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test-data/datamash_reverse_input.txt Sat Nov 22 20:39:44 2014 -0500 @@ -0,0 +1,4 @@ +Genes Sample Counts +NOX1 A1 514 +DcP A2 542 +HH B3 490 diff -r 22080cbb0e2a -r 48bbe512639e test-data/datamash_reverse_output.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test-data/datamash_reverse_output.txt Sat Nov 22 20:39:44 2014 -0500 @@ -0,0 +1,4 @@ +Counts Sample Genes +514 A1 NOX1 +542 A2 DcP +490 B3 HH