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

Biopiece: remove_keys

Description

If you want to remove certain keys from records in the stream you can use remove_keys which will remove a given list of keys - or given a list of keys to retain - remove all other keys. If all keys in a record are removed, the record is removed.

Usage

... | remove_keys [options]

Options

[-?         | --help]               #  Print full usage description.
[-k <list>  | --keys=<list>]        #  Comma separeted list of keys to remove.
[-K <list>  | --save_keys=<list>]   #  Remove all save these comma separeted keys.
[-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

To remove SEQ_NAME and SEQ from all records in stream, do:

... | remove_keys -k 'SEQ_NAME,SEQ'

To removes all keys except SEQ_NAME and SEQ, do:

... | remove_keys -K 'SEQ_NAME,SEQ'

See also

rename_keys

merge_vals

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

remove_keys is part of the Biopieces framework.

http://www.biopieces.org

Clone this wiki locally