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

Biopiece: rename_keys

Description

Sometimes it is necessary to rename record keys to allow biopieces, who require specific record keys, to operate on the records. This could e.g. be BLAST records where there is both a subject ID (S_ID) and a subject sequence (S_SEQ) as well as a query ID (Q_ID) and and a query sequence (Q_SEQ). If you want to write either the query sequence or the subject sequence as FASTA output, you will have to rename the record keys accordingly.

Usage

... | rename_keys [options]

Options

[-?         | --help]               #  Print full usage description.
[-k <list>  | --keys=<list>]        #  Find and replace key tuple   -  <search,replace>.
[-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 rename all record key Q_ID to SEQ_NAME do:

... | rename_keys -k Q_ID,SEQ_NAME

If you need to rename more than one key, then pipe the stream though rename_keys twice:

... | rename_keys -k Q_ID,SEQ_NAME | rename_keys -k  Q_SEQ,SEQ

See also

blast_seq

Author

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

mail@maasha.dk

August 2007

License

GNU General Public License version 2

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

Help

rename_keys is part of the Biopieces framework.

http://www.biopieces.org

Clone this wiki locally