-
Notifications
You must be signed in to change notification settings - Fork 23
rename_keys
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.
... | rename_keys [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.
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
Martin Asser Hansen - Copyright (C) - All rights reserved.
August 2007
GNU General Public License version 2
http://www.gnu.org/copyleft/gpl.html
rename_keys is part of the Biopieces framework.