arq5x/bedtools — pull request #25 by brentp (2012-08-24 16:10:27+00:00)
Title: Groupby columns specified like cut (but retaining order)

Here's an initial go at it. You can specifiy -g 1-3 and -g 3-1, and in the latter case, the columns will be ordered in reverse as requested.
Can also mix "," and "-", e.g. 1,2-4,6.