Skip to content
Martin Asser Hansen edited this page Oct 2, 2015 · 5 revisions

Biopiece: sort_records

Description

sort_records sort records in the data stream using the values of a list of given keys. If values from the first key collides, then the next key's value is used, and so on.

Usage

... | sort_records [options]

Options

[-?         | --help]               #  Print full usage description.
[-k <list>  | --keys=<list>]        #  Comma separated list of keys to sort by. Append n for numeric sorting instead of alphabetic.
[-r         | --reverse]            #  Reverse sort order.
[-I <file!> | --stream_in=<file!>]  #  Read input from stream file  -  Default=STDIN
[-O <file>  | --stream_out=<file>]  #  Write output to stream file  -  Default=STDOUT
[-v         | --verbose]            #  Verbose output.

Examples

Sort records alphabetically according to SEQ:

... | sort_records -k SEQ

Sort records numerically according to SEQ_LEN:

... | sort_records -k SEQ_LENn

Output records in reverse order sorted according to SEQ_LEN and SEQ:

... | sort_records -k SEQ_LENn,SEQ -r

See also

Author

Martin Asser Hansen - Copyright (C) - All rights reserved.

[email protected]

August 2007

License

GNU General Public License version 2

http://www.gnu.org/copyleft/gpl.html

Help

sort_records is part of the Biopieces framework.

http://www.biopieces.org

Clone this wiki locally